2 wujie cnhn123456 wujie_cnhn123456 于 2016.04.04 15:27 提问

bubbo消费端在工具中启动报错打包后tomcat下正常

2016-04-04 15:12:03,845 ERROR [ContextLoader.java:336] : Context initialization failed
java.lang.NoClassDefFoundError: Lvaolon/facade/user/service/UserFacade;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2397)
at java.lang.Class.getDeclaredFields(Class.java:1806)
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:392)
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(PersistenceAnnotationBeanPostProcessor.java:332)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:908)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:703)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5077)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5591)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.ClassNotFoundException: vaolon.facade.user.service.UserFacade
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1856)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1705)
... 27 more
四月 04, 2016 3:12:03 下午 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
java.lang.NoClassDefFoundError: Lvaolon/facade/user/service/UserFacade;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2397)
at java.lang.Class.getDeclaredFields(Class.java:1806)
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:392)
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(PersistenceAnnotationBeanPostProcessor.java:332)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:908)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:703)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5077)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5591)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.ClassNotFoundException: vaolon.facade.user.service.UserFacade
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1856)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1705)
... 27 more

四月 04, 2016 3:12:03 下午 org.apache.catalina.core.StandardContext startInternal
严重: One or more listeners failed to start. Full details will be found in the appropriate container log file
四月 04, 2016 3:12:03 下午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/vaolon-web-vaolonMall] startup failed due to previous errors
四月 04, 2016 3:12:03 下午 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
2016-04-04 15:12:03,857 INFO [AbstractApplicationContext.java:873] : Closing Root WebApplicationContext: startup date [Mon Apr 04 15:12:03 CST 2016]; root of context hierarchy
2016-04-04 15:12:03,867 WARN [AbstractApplicationContext.java:891] : Exception thrown from LifecycleProcessor on context close
java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: Root WebApplicationContext: startup date [Mon Apr 04 15:12:03 CST 2016]; root of context hierarchy
at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:359)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:888)
at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:841)
at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:579)
at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:115)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:5124)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5786)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
四月 04, 2016 3:12:03 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-80"]
四月 04, 2016 3:12:03 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-bio-8010"]
四月 04, 2016 3:12:03 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 2602 ms

  1. 一个服务端一个消费端,同时消费端pom中加了服务端的依赖
  2. 在eclipse中先启动服务端,再启动消费端上面的错误信息
  3. 我将两个项目分开运行,一个在eclipse中启动,一个打成war包放到tomcat下启动却可以正常运行

希望有大神指教!!!

2个回答

wujie_cnhn123456
wujie_cnhn123456   2016.04.12 16:25
已采纳

将接口service和接口service实现分开、不要放同一个项目中。

wujie_cnhn123456
wujie_cnhn123456   2016.04.04 15:33

在eclipse中启动zookeeper控制台可以看到服务端已经注册成功,但是消费端没有注册上去,不知道是不是因为消费端先调用的我本地依赖,就不去注册中心找了是不是存在优先级的问题?

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!
其他相关推荐
MyEclipse启动Tomcat正常,Tomcat自启动报错
今天碰到一个很抓狂的问题,在MyEclipse里启动Tomcat不报错,项目正常运行,但是部署到服务器端时莫名奇妙的出现了Caused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type错误。     起初以为是Tomcat的问题,测试了半天,发现不
SpringBoot项目打包发布到外部tomcat时,出现各种异常的解决fang
先说遇到问题的情景: 初次尝试使用spring boot框架写了个小web项目,在Intellij IDEA中能正常启动运行。使用maven 运行install,生成war包,发布到本机的tomcat下,出现异常,主要的异常信息是  .......LifeCycleException。经各种搜索,找到答案。 spring boot因为内嵌tomcat容器,所以可以通过打包为ja
Eclipse 中Tomcat debug启动报错,启动不了
报错如下: 1 ERROR:transport error 202: gethostbyname: unknown host 2 A configuration error occurred during startup. Please verify the preference field with the prompt: ERROR: transport error 202: gethos
导入项目后tomcat无法正常启动--项目初始化报错
1.原因: https://passport.csdn.net/account/fpwd?action=resetpassword&username=u010935333&active=960ad683172b45d4403d8dca9e842805&service=http://my.csdn.net/u010935333
在Eclipse中tomcat不部署项目启动正常,部署一个项目启动报异常
console窗口错误输出:严重: A child container failed during start java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost
springboot打包war,tomcat运行及常见问题
一、修改打包形式为war在pom.xml里设置 <packaging>war</packaging>二、过滤springboot默认嵌入式tomcat插件<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <!-- 过滤s
关于一个在Intellij Idea中打包正常,tomcat启动也正常,但在浏览器中访问出404的问题的原因分析
我今天在做测试的时候,项目打包正常 ,tomcat启动看起来也是正常,但是在浏览器中访问的时候就出现了404的错误提示,我一开始还以为是项目的问题,但后来想了一下,觉得应该看看tomcat的日志文件,果真一看问题就出来了,还好自己有这个意识,出错了的话,要多看tomcat的日志文件以及自己在程序中写的日志,因为我们的项目经理说了,一旦项目上线了的话,日后排除的话都是靠日志文件的了,可见日志文件对
没有在tomcat中部署项目启动报错
在学校做了小一年的项目,很久没有自己搭框架了,昨天兴致勃勃的跟着教程熟悉下ssh框架却发现tomcat启动报错,网上很多帖子都说缺jar包,可是我还没加入ssh的架构怎么会缺jar包呢,后来发现是tomcat的问题,我的tomcat服务器里面已经部署了很多项目,可能彼此之间有冲突,换了一个新的tomcat服务器解决了~ 这只是个开始,继续努力~ PS:这是我第一次用博客记录程序员的点滴,以后要
关于新建包目录以后,tomcat项目启动报错问题
工作记录
eclipse启动tomcat后浏览器游览报404
eclipse启动tomcat后浏览器游览报404 情况:Eclipse里启动tomcat后 访问http://localhost:8080报404 对比日志可知:通过eclipse启动时,缺少部署的部分。  后来让eclipse接管tomcat就可以了,双击server会弹出设置页面,选择takes control of tomcat installation 参考:ht