On Mon, Oct 15, 2012 at 8:07 AM, Sergey Beryozkin <sberyoz...@gmail.com> wrote: > On 15/10/12 12:52, Todd Deshane wrote: >> >> On Mon, Oct 15, 2012 at 4:54 AM, Sergey Beryozkin<sberyoz...@gmail.com> >> wrote: >>> >>> Hi >>> >>> On 12/10/12 17:01, Todd Deshane wrote: >>>> >>>> >>>> Hi, >>>> >>>> I'm trying to test an example from the RESTful Java book on CXF 2.7.0 >>>> >>>> The code worked on TomEE fine, but on CXF I am getting the following >>>> exception. >>>> >>>> (The JAXRSSpringSecurity sample from CXF runs fine.) >>>> >>>> Any suggestions? >>>> >>> I can only think of CXF 2.7.0 replacing a jsr311-api dependency with >>> >>> <dependency> >>> <groupId>javax.ws.rs</groupId> >>> <artifactId>javax.ws.rs-api</artifactId> >>> <version>2.0-m10</version> >>> </dependency> >>> >>> Can you try with a new dependency please ? >> >> >> Added it, but now getting a 404 on the first POST from the client >> code. Nothing in the logs. Where do I turn up the logging to try to >> debug this further? >> > In 2.7.0 an exception trace will be reported by default again - if 404 is > what the runtime produces. So in this case it appears to be an exception at > the container level, i.e, CXF is not even invoked, can you confirm it please > ?
I'm seeing very little in the Tomcat logs Oct 15, 2012 8:20:23 AM org.apache.catalina.core.AprLifecycleListener init INFO: Loaded APR based Apache Tomcat Native library 1.1.22. Oct 15, 2012 8:20:23 AM org.apache.catalina.core.AprLifecycleListener init INFO: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], random [true]. Oct 15, 2012 8:20:23 AM org.apache.coyote.http11.Http11AprProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Oct 15, 2012 8:20:23 AM org.apache.coyote.ajp.AjpAprProtocol init INFO: Initializing Coyote AJP/1.3 on ajp-8009 Oct 15, 2012 8:20:23 AM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 740 ms Oct 15, 2012 8:20:23 AM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Oct 15, 2012 8:20:23 AM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.35 Oct 15, 2012 8:20:23 AM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deploying configuration descriptor host-manager.xml Oct 15, 2012 8:20:23 AM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deploying configuration descriptor manager.xml Oct 15, 2012 8:20:23 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive workbook-ex03_1-1.0.war Oct 15, 2012 8:20:24 AM org.apache.cxf.endpoint.ServerImpl initDestination INFO: Setting the server's publish address to be / Oct 15, 2012 8:20:24 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory docs Oct 15, 2012 8:20:24 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory examples Oct 15, 2012 8:20:24 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory ROOT Oct 15, 2012 8:20:24 AM org.apache.coyote.http11.Http11AprProtocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Oct 15, 2012 8:20:24 AM org.apache.coyote.ajp.AjpAprProtocol start INFO: Starting Coyote AJP/1.3 on ajp-8009 Oct 15, 2012 8:20:24 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 1239 ms Oct 15, 2012 8:20:36 AM org.apache.catalina.core.AprLifecycleListener init INFO: Loaded APR based Apache Tomcat Native library 1.1.22. Oct 15, 2012 8:20:36 AM org.apache.catalina.core.AprLifecycleListener init INFO: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], random [true]. Oct 15, 2012 8:20:37 AM org.apache.coyote.http11.Http11AprProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Oct 15, 2012 8:20:37 AM org.apache.coyote.ajp.AjpAprProtocol init INFO: Initializing Coyote AJP/1.3 on ajp-8009 Oct 15, 2012 8:20:37 AM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 719 ms Oct 15, 2012 8:20:37 AM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Oct 15, 2012 8:20:37 AM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.35 Oct 15, 2012 8:20:37 AM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deploying configuration descriptor host-manager.xml Oct 15, 2012 8:20:37 AM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deploying configuration descriptor manager.xml Oct 15, 2012 8:20:37 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive workbook-ex03_1-1.0.war Oct 15, 2012 8:20:37 AM org.apache.cxf.endpoint.ServerImpl initDestination INFO: Setting the server's publish address to be / Oct 15, 2012 8:20:38 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory docs Oct 15, 2012 8:20:38 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory examples Oct 15, 2012 8:20:38 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory ROOT Oct 15, 2012 8:20:38 AM org.apache.coyote.http11.Http11AprProtocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Oct 15, 2012 8:20:38 AM org.apache.coyote.ajp.AjpAprProtocol start INFO: Starting Coyote AJP/1.3 on ajp-8009 Oct 15, 2012 8:20:38 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 872 ms and Oct 15, 2012 8:20:24 AM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextInitialized() Oct 15, 2012 8:20:24 AM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextInitialized() Oct 15, 2012 8:20:38 AM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextInitialized() Oct 15, 2012 8:20:38 AM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextInitialized() Does that indicate an issue? Is there any tomcat configuration needed to allow it to work? On the other hand, am I doing anything wrong with my pom.xml dependencies or otherwise? <dependencies> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-transports-http</artifactId> <version>2.7.0</version> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-frontend-jaxrs</artifactId> <version>2.7.0</version> </dependency> <dependency> <groupId>commons-httpclient</groupId> <artifactId>commons-httpclient</artifactId> <version>${httpclient.version}</version> </dependency> <dependency> <groupId>javax.ejb</groupId> <artifactId>ejb-api</artifactId> <version>3.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.ws.rs</groupId> <artifactId>javax.ws.rs-api</artifactId> <version>2.0-m10</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.10</version> <scope>test</scope> </dependency> </dependencies> Thanks, Todd