On Apr 11, 2013, at 4:13 PM, Daniel Kulp <[email protected]> wrote: > > What's interesting is that it works fine for me with Tomcat when using Java6, > but not with Java7. Not sure what that means yet.
And I cannot reproduce it at all if I update to CXF 2.7.4. Please update and try again. Dan > > Dan > > > > On Apr 11, 2013, at 4:06 PM, Al Forbes <[email protected]> wrote: > >> Hi, >> >> I have spent 2 days on this so any ideas on how to debug this further would >> be appreciated. >> >> I'm using JDK 1.7, Spring 3.2, and CXF 2.7.3. With Spring I'm using the >> Java config (not xml). >> >> I keep getting the error >> WARNING: Can't find the the request for >> http://localhost:8080/rest/api/people's Observer >> >> I think the error is related to some interaction between Tomcat and the >> CXFServlet. I had this working for a couple of weeks, so I suspect it has >> something to do with the order of the classpath and not the configuration. >> >> I found this project which I can use to reproduce the problem. It works >> correctly with the embedded Jetty server, but NOT with Tomcat. >> >> git clone -b tomcat-embedded https://github.com/reta/spring-one-jar.git >> mvn package >> java -jar target/spring-one-jar-0.0.1-SNAPSHOT.one-jar.jar >> >> This fails with: >> curl http://localhost:8080/rest/api/people?page=2 >> >> But the same procedure with Jetty works. >> git clone -b jetty-embedded https://github.com/reta/spring-one-jar.git >> >> >> With Tomcat the application path (@ApplicationPath) is correctly printed, >> so I think it must be related to the CXFServlet and the url-pattern. >> "INFO: Setting the server's publish address to be /api" >> >> @Bean >> public Server jaxRsServer() { >> JAXRSServerFactoryBean factory = >> RuntimeDelegate.getInstance().createEndpoint( jaxRsApiApplication(), >> JAXRSServerFactoryBean.class ); >> factory.setServiceBeans( Arrays.< Object >asList( >> peopleRestService() ) ); >> factory.setAddress( "/" + factory.getAddress() ); >> factory.setProviders( Arrays.< Object >asList( >> jsonProvider() ) ); >> return factory.create(); >> } >> >> Thanks, >> Al > > -- > Daniel Kulp > [email protected] - http://dankulp.com/blog > Talend Community Coder - http://coders.talend.com > -- Daniel Kulp [email protected] - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
