问题描述
- 项目在eclipse上运行报错,在myeclipse上没有问题
-
2015-04-28 11:16:55.704 |05KXN3W7T8U842C| [main] ERROR org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'eChannel': Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420) ~[org.springframework.beans-3.1.0.M1.jar:3.1.0.M1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) ~[org.springframework.beans-3.1.0.M1.jar:3.1.0.M1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) ~[org.springframework.beans-3.1.0.M1.jar:3.1.0.M1]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295) ~[org.springframework.beans-3.1.0.M1.jar:3.1.0.M1]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[org.springframework.beans-3.1.0.M1.jar:3.1.0.M1]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292) ~[org.springframework.beans-3.1.0.M1.jar:3.1.0.M1]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) ~[org.springframework.beans-3.1.0.M1.jar:3.1.0.M1]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580) ~[org.springframework.beans-3.1.0.M1.jar:3.1.0.M1]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:900) ~[org.springframework.context-3.1.0.M1.jar:3.1.0.M1]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:455) ~[org.springframework.context-3.1.0.M1.jar:3.1.0.M1]
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:294) ~[org.springframework.web-3.1.0.M1.jar:3.1.0.M1]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:215) ~[org.springframework.web-3.1.0.M1.jar:3.1.0.M1]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) [org.springframework.web-3.1.0.M1.jar:3.1.0.M1]
at com.google.code.lightssh.project.web.listener.StartupListener.contextInitialized(StartupListener.java:36) [StartupListener.class:na]
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830) [catalina.jar:na]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337) [catalina.jar:na]
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) [catalina.jar:na]
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) [catalina.jar:na]
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) [catalina.jar:na]
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) [catalina.jar:na]
at org.apache.catalina.core.StandardService.start(StandardService.java:516) [catalina.jar:na]
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) [catalina.jar:na]
at org.apache.catalina.startup.Catalina.start(Catalina.java:566) [catalina.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_07]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_07]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_07]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_07]
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) [bootstrap.jar:na]
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) [bootstrap.jar:na]
Caused by: javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:343) ~[cxf-2.3.7.jar:2.3.7]
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:239) ~[cxf-2.3.7.jar:2.3.7]
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:489) ~[cxf-2.3.7.jar:2.3.7]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_07]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_07]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_07]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_07]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1546) ~[org.springframework.beans-3.1.0.M1.jar:3.1.0.M1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1487) ~[org.springframework.beans-3.1.0.M1.jar:3.1.0.M1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417) ~[org.springframework.beans-3.1.0.M1.jar:3.1.0.M1]
... 28 common frames omitted
Caused by: org.apache.cxf.service.factory.ServiceConstructionException: null
at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:341) ~[cxf-2.3.7.jar:2.3.7]
at org.apache.cxf.service.factory.AbstractServiceFactoryBean.initializeDataBindings(AbstractServiceFactoryBean.java:86) ~[cxf-2.3.7.jar:2.3.7]
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:442) ~[cxf-2.3.7.jar:2.3.7]
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:682) ~[cxf-2.3.7.jar:2.3.7]
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:505) ~[cxf-2.3.7.jar:2.3.7]
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:242) ~[cxf-2.3.7.jar:2.3.7]
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:202) ~[cxf-2.3.7.jar:2.3.7]
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101) ~[cxf-2.3.7.jar:2.3.7]
at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:148) ~[cxf-2.3.7.jar:2.3.7]
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:183) ~[cxf-2.3.7.jar:2.3.7]
at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:415) ~[cxf-2.3.7.jar:2.3.7]
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:315) ~[cxf-2.3.7.jar:2.3.7]
... 37 common frames omitted
Caused by: javax.xml.bind.JAXBException: null
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:195) ~[na:na]
at javax.xml.bind.ContextFinder.find(ContextFinder.java:381) ~[na:na]
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574) ~[na:na]
at org.apache.cxf.jaxb.JAXBDataBinding.createContext(JAXBDataBinding.java:557) ~[cxf-2.3.7.jar:2.3.7]
at org.apache.cxf.jaxb.JAXBDataBinding.createJAXBContextAndSchemas(JAXBDataBinding.java:497) ~[cxf-2.3.7.jar:2.3.7]
at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:324) ~[cxf-2.3.7.jar:2.3.7]
... 48 common frames omitted
Caused by: java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358) ~[catalina.jar:na]
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204) ~[catalina.jar:na]
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:191) ~[na:na]
... 53 common frames omitted
解决方案
ERROR org.springframework.web.context.ContextLoader - Context initialization failed ,这个错报的貌似好像是JAR的问题的错,应该是JAR包冲突的问题
时间: 2024-12-31 19:30:50