Hi,
I have a problem on a new server where we deploy a website that also partly
serves as a jaxrs webservice using cxf
The site works fine one development in Windows and on a test server in
Ubuntu but on our production server Ubuntu (more stringent firewall control
and privileges) it doesn't. It fails with an a vague error (I think it eats
the real error).
The relevant config portion is this:
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import
resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml"
/>
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<context:component-scan base-package="nl.msw.compraventa.ws"/>
<jaxrs:server id="restContainer" address="/">
<jaxrs:inInterceptors>
<bean
class="org.apache.cxf.interceptor.LoggingInInterceptor">
<constructor-arg value="write"/>
</bean>
</jaxrs:inInterceptors>
<jaxrs:properties>
<entry key="attachment-memory-threshold"
value="1500000"/>
</jaxrs:properties>
<jaxrs:serviceBeans>
<ref bean="contentImport"/>
</jaxrs:serviceBeans>
</jaxrs:server>
If we disable this portion, everything works fine. If not, the following
error occurs. Any ideas why?
ContextLoader.initWebApplicationContext(220) | Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.apache.cxf.transport.servlet.ServletTransportFactory' defined
in class path resource [META-INF/cxf/cxf-servlet.xml]: Error setting
property values; nested exception is
org.springframework.beans.PropertyBatchUpdateException; nested
PropertyAccessExceptions (2) are:
PropertyAccessException 1:
org.springframework.beans.MethodInvocationException: Property 'bus' threw
exception; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'entityManagerFactory' defined in URL
[jar:file:/var/lib/tomcat6/webapps/ROOT/WEB-INF/lib/MSA-core-1.0-SNAPSHOT.jar!/applicationContext.xml]:
Invocation of init method failed; nested exception is
javax.persistence.PersistenceException: [PersistenceUnit:
ApplicationEntityManager] Unable to build EntityManagerFactory
PropertyAccessException 2:
org.springframework.beans.MethodInvocationException: Property 'transportIds'
threw exception; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'entityManagerFactory' defined in URL
[jar:file:/var/lib/tomcat6/webapps/ROOT/WEB-INF/lib/MSA-core-1.0-SNAPSHOT.jar!/applicationContext.xml]:
Invocation of init method failed; nested exception is
javax.persistence.PersistenceException: [PersistenceUnit:
ApplicationEntityManager] Unable to build EntityManagerFactory
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1361)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
at
org.apache.catalina.core.StandardService.start(StandardService.java:519)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
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:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.springframework.beans.PropertyBatchUpdateException; nested
PropertyAccessExceptions (2) are:
PropertyAccessException 1:
org.springframework.beans.MethodInvocationException: Property 'bus' threw
exception; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'entityManagerFactory' defined in URL
[jar:file:/var/lib/tomcat6/webapps/ROOT/WEB-INF/lib/MercadoTotal-core-1.0-SNAPSHOT.jar!/applicationContext.xml]:
Invocation of init method failed; nested exception is
javax.persistence.PersistenceException: [PersistenceUnit:
ApplicationEntityManager] Unable to build EntityManagerFactory
PropertyAccessException 2:
org.springframework.beans.MethodInvocationException: Property 'transportIds'
threw exception; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'entityManagerFactory' defined in URL
[jar:file:/var/lib/tomcat6/webapps/ROOT/WEB-INF/lib/MercadoTotal-core-1.0-SNAPSHOT.jar!/applicationContext.xml]:
Invocation of init method failed; nested exception is
javax.persistence.PersistenceException: [PersistenceUnit:
ApplicationEntityManager] Unable to build EntityManagerFactory
at
org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:102)
at
org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:58)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1358)
... 37 more
--
View this message in context:
http://cxf.547215.n5.nabble.com/CXF-Not-starting-up-tp3338583p3338583.html
Sent from the cxf-user mailing list archive at Nabble.com.