Hi Dan - looks like that must be it... thanks, Sergey On 31/07/13 23:46, Daniel Kulp wrote:
Did you also add the jaxrs-api jar to the "my-libs" dir? It LOOKS to me like the annotation classes couldn't be loaded from the class loader of your API's. Dan On Jul 31, 2013, at 2:08 PM, Tom Hartwell <[email protected]> wrote:I'm using CXF 2.6.6 for JAX-RS services. Because I would like to expose the service interface to be usable by other webapps, I've separated the serviceBean interface and implementation into 2 different jars: service-api.jar and service.jar In order for other webapps to utilize the api jar, I've deployed the jar to tomcat/lib/my-libs and added an entry in catalina.properties: common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.home}/lib/my-libs/*.jar However this does not work when CXF/Spring try to load the XML definition of my service. If I place the API jar into my webapp's lib directory there is no problem, but that defeats the purpose of having an API jar that can be shared across webapps. TIA for any input on the matter, Tom The following is the error in my startup logs: 2013-07-31 10:58:48,759 [main] ERROR org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean - No resource classes found 2013-07-31 10:58:48,764 [main] ERROR com.awarepoint.service.servlet.SpringApplicationContext - FAILURE invoking create of org.apache.cxf.jaxrs.spring.JAXRSServerFactoryBeanDefinitionParser$SpringJAXRSServerFactoryBean java.lang.reflect.InvocationTargetException 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 com.awarepoint.service.servlet.SpringApplicationContext.invokeInitMethod(SpringApplicationContext.java:83) at com.awarepoint.service.servlet.SpringApplicationContext.refresh(SpringApplicationContext.java:70) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057) at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) 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.apache.cxf.service.factory.ServiceConstructionException at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:194) ... 24 more Caused by: javax.ws.rs.WebApplicationException at org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.checkResources(AbstractJAXRSFactoryBean.java:315) at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:144) ... 24 more
-- Sergey Beryozkin Talend Community Coders http://coders.talend.com/ Blog: http://sberyozkin.blogspot.com
