cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Chow <eric...@gmail.com>
Subject Re: JAX-RS with CXF in Tomcat + Spring
Date Tue, 04 Dec 2012 08:45:19 GMT
And the Tomcat startup exception is as following:




>
資訊: Starting Servlet Engine: Apache Tomcat/6.0.20
2012/12/4 下午 04:43:38 org.apache.catalina.loader.WebappClassLoader
validateJarFile
資訊:
validateJarFile(D:\Projects\workspace\practice\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\wtpwebapps\TestCXF\WEB-INF\lib\geronimo-servlet_3.0_spec-1.0.jar)
- jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
javax/servlet/Servlet.class
2012/12/4 下午 04:43:38
org.springframework.context.support.AbstractApplicationContext
prepareRefresh
資訊: Refreshing Root WebApplicationContext: startup date [Tue Dec 04
16:43:38 CST 2012]; root of context hierarchy
2012/12/4 下午 04:43:38
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
loadBeanDefinitions
資訊: Loading XML bean definitions from class path resource
[META-INF/cxf/cxf.xml]
2012/12/4 下午 04:43:39
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
loadBeanDefinitions
資訊: Loading XML bean definitions from URL
[jndi:/localhost/TestCXF/WEB-INF/resources.xml]
2012/12/4 下午 04:43:39
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
loadBeanDefinitions
資訊: Loading XML bean definitions from class path resource
[META-INF/cxf/cxf.xml]
2012/12/4 下午 04:43:39
org.springframework.beans.factory.support.DefaultListableBeanFactory
registerBeanDefinition
資訊: Overriding bean definition for bean 'cxf': replacing [Generic bean:
class [org.apache.cxf.bus.spring.SpringBus]; scope=; abstract=false;
lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true;
primary=false; factoryBeanName=null; factoryMethodName=null;
initMethodName=null; destroyMethodName=shutdown; defined in class path
resource [META-INF/cxf/cxf.xml]] with [Generic bean: class
[org.apache.cxf.bus.spring.SpringBus]; scope=; abstract=false;
lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true;
primary=false; factoryBeanName=null; factoryMethodName=null;
initMethodName=null; destroyMethodName=shutdown; defined in class path
resource [META-INF/cxf/cxf.xml]]
2012/12/4 下午 04:43:39
org.springframework.beans.factory.support.DefaultListableBeanFactory
registerBeanDefinition
資訊: Overriding bean definition for bean
'org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor': replacing
[Generic bean: class
[org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor]; scope=;
abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
autowireCandidate=true; primary=false; factoryBeanName=null;
factoryMethodName=null; initMethodName=null; destroyMethodName=null;
defined in class path resource [META-INF/cxf/cxf.xml]] with [Generic bean:
class [org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor];
scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
autowireCandidate=true; primary=false; factoryBeanName=null;
factoryMethodName=null; initMethodName=null; destroyMethodName=null;
defined in class path resource [META-INF/cxf/cxf.xml]]
2012/12/4 下午 04:43:39
org.springframework.beans.factory.support.DefaultListableBeanFactory
registerBeanDefinition
資訊: Overriding bean definition for bean
'org.apache.cxf.bus.spring.Jsr250BeanPostProcessor': replacing [Generic
bean: class [org.apache.cxf.bus.spring.Jsr250BeanPostProcessor]; scope=;
abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
autowireCandidate=true; primary=false; factoryBeanName=null;
factoryMethodName=null; initMethodName=null; destroyMethodName=null;
defined in class path resource [META-INF/cxf/cxf.xml]] with [Generic bean:
class [org.apache.cxf.bus.spring.Jsr250BeanPostProcessor]; scope=;
abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
autowireCandidate=true; primary=false; factoryBeanName=null;
factoryMethodName=null; initMethodName=null; destroyMethodName=null;
defined in class path resource [META-INF/cxf/cxf.xml]]
2012/12/4 下午 04:43:39
org.springframework.beans.factory.support.DefaultListableBeanFactory
registerBeanDefinition
資訊: Overriding bean definition for bean
'org.apache.cxf.bus.spring.BusExtensionPostProcessor': replacing [Generic
bean: class [org.apache.cxf.bus.spring.BusExtensionPostProcessor]; scope=;
abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
autowireCandidate=true; primary=false; factoryBeanName=null;
factoryMethodName=null; initMethodName=null; destroyMethodName=null;
defined in class path resource [META-INF/cxf/cxf.xml]] with [Generic bean:
class [org.apache.cxf.bus.spring.BusExtensionPostProcessor]; scope=;
abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
autowireCandidate=true; primary=false; factoryBeanName=null;
factoryMethodName=null; initMethodName=null; destroyMethodName=null;
defined in class path resource [META-INF/cxf/cxf.xml]]
2012/12/4 下午 04:43:39
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
loadBeanDefinitions
資訊: Loading XML bean definitions from class path resource
[META-INF/cxf/cxf-servlet.xml]
2012/12/4 下午 04:43:39
org.springframework.beans.factory.support.DefaultListableBeanFactory
preInstantiateSingletons
資訊: Pre-instantiating singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@1353154:
defining beans
[cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,userService,customerBean];
root of factory hierarchy
2012/12/4 下午 04:43:39 org.apache.cxf.endpoint.ServerImpl initDestination
資訊: Setting the server's publish address to be /userService
2012/12/4 下午 04:43:39
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry
destroySingletons
資訊: Destroying singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@1353154:
defining beans
[cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,userService,customerBean];
root of factory hierarchy
2012/12/4 下午 04:43:39 org.apache.catalina.core.ApplicationContext log
嚴重的: StandardWrapper.Throwable
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'userService': Invocation of init method failed; nested
exception is org.apache.cxf.service.factory.ServiceConstructionException
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1422)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:518)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
    at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
    at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
    at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
    at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
    at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
    at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
    at
org.apache.cxf.transport.servlet.CXFServlet.createSpringContext(CXFServlet.java:160)
    at
org.apache.cxf.transport.servlet.CXFServlet.loadBus(CXFServlet.java:74)
    at
org.apache.cxf.transport.servlet.CXFNonSpringServlet.init(CXFNonSpringServlet.java:71)
    at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
    at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
    at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4149)
    at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4458)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at
org.apache.catalina.core.StandardService.start(StandardService.java:516)
    at
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.apache.cxf.service.factory.ServiceConstructionException
    at
org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:201)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1546)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1487)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1419)
    ... 29 more
Caused by: java.lang.NullPointerException
    at
org.apache.cxf.ws.discovery.listeners.WSDiscoveryServerListener.startServer(WSDiscoveryServerListener.java:64)
    at
org.apache.cxf.bus.managers.ServerLifeCycleManagerImpl.startServer(ServerLifeCycleManagerImpl.java:61)
    at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:146)
    at
org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:192)
    ... 36 more
2012/12/4 下午 04:43:39 org.apache.catalina.core.StandardContext loadOnStartup
嚴重的: Servlet /TestCXF threw load() exception
java.lang.NullPointerException
    at
org.apache.cxf.ws.discovery.listeners.WSDiscoveryServerListener.startServer(WSDiscoveryServerListener.java:64)
    at
org.apache.cxf.bus.managers.ServerLifeCycleManagerImpl.startServer(ServerLifeCycleManagerImpl.java:61)
    at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:146)
    at
org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:192)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1546)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1487)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1419)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:518)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
    at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
    at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
    at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
    at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
    at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
    at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
    at
org.apache.cxf.transport.servlet.CXFServlet.createSpringContext(CXFServlet.java:160)
    at
org.apache.cxf.transport.servlet.CXFServlet.loadBus(CXFServlet.java:74)
    at
org.apache.cxf.transport.servlet.CXFNonSpringServlet.init(CXFNonSpringServlet.java:71)
    at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
    at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
    at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4149)
    at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4458)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at
org.apache.catalina.core.StandardService.start(StandardService.java:516)
    at
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2012/12/4 下午 04:43:39
org.springframework.context.support.AbstractApplicationContext
prepareRefresh



>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message