|
From: Eric K. <ek...@cs...> - 2008-09-22 14:21:36
|
Greetings, I'm interested in using RESTEasy, but having runtime problems. I downloaded the beta and installed a deep copy of directory "resteasy-jaxrs.war" to /server/default/deploy. I've tried to test the installation via existing RESTEasy components and from what I could glean from the source distribution (in resteasy/test/smoke), it seems the URL "http://localhost:8080/resteasy-jaxrs/basic" should return some text, like "basic". It seems the war deploys cleanly but when I exercise the server with the above URL I get the following exception: 2008-09-22 09:26:47,640 ERROR [STDERR] 11469 [http-0.0.0.0-8080-1] ERROR org.jboss.resteasy.core.SynchronousDispatcher - Failed executing GET /basic 2008-09-22 09:26:47,640 ERROR [STDERR] org.jboss.resteasy.spi.LoggableFailure: Failed processing arguments of public org.jboss.resteasy.core.AsynchronousDispatcher(org.jboss.resteasy.spi.ResteasyProviderFactory) 2008-09-22 09:26:47,640 ERROR [STDERR] at org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:79) 2008-09-22 09:26:47,640 ERROR [STDERR] at org.jboss.resteasy.plugins.server.resourcefactory.POJOResourceFactory.createResource(POJOResourceFactory.java:38) 2008-09-22 09:26:47,640 ERROR [STDERR] at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:122) 2008-09-22 09:26:47,656 ERROR [STDERR] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:348) 2008-09-22 09:26:47,656 ERROR [STDERR] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:182) 2008-09-22 09:26:47,656 ERROR [STDERR] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:90) 2008-09-22 09:26:47,656 ERROR [STDERR] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:66) 2008-09-22 09:26:47,656 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) 2008-09-22 09:26:47,671 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 2008-09-22 09:26:47,671 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 2008-09-22 09:26:47,671 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) 2008-09-22 09:26:47,671 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 2008-09-22 09:26:47,671 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 2008-09-22 09:26:47,687 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) 2008-09-22 09:26:47,687 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) 2008-09-22 09:26:47,687 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182) 2008-09-22 09:26:47,687 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) 2008-09-22 09:26:47,687 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 2008-09-22 09:26:47,703 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 2008-09-22 09:26:47,703 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) 2008-09-22 09:26:47,703 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 2008-09-22 09:26:47,703 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262) 2008-09-22 09:26:47,718 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) 2008-09-22 09:26:47,718 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) 2008-09-22 09:26:47,718 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446) 2008-09-22 09:26:47,718 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619) 2008-09-22 09:26:47,718 ERROR [STDERR] Caused by: org.jboss.resteasy.spi.LoggableFailure: content-type was null and expecting to extract a body 2008-09-22 09:26:47,718 ERROR [STDERR] at org.jboss.resteasy.core.MessageBodyParameterInjector.inject(MessageBodyParameterInjector.java:41) 2008-09-22 09:26:47,734 ERROR [STDERR] at org.jboss.resteasy.core.ConstructorInjectorImpl.injectableArguments(ConstructorInjectorImpl.java:49) 2008-09-22 09:26:47,734 ERROR [STDERR] at org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:75) 2008-09-22 09:26:47,734 ERROR [STDERR] ... 25 more I was using my browser to issue the request. Thinking Mozilla might be introducing something unwanted in the HTTP header, I also tried telnet to port 8080 and issuing a plain-vanilla GET on /resteasy-jaxrs/basic but I arrived at the same exception server side. Looking at this in the debugger, it seems that the root cause is org.jboss.resteasy.core.MessageBodyParameter line 38: MediaType mediaType = request.getHttpHeaders().getMediaType(); mediaType is coming back "null". However, if I use the debugger to assign a new MediaType() with "text/plain" the immediate lines pass but then I get other exceptions later. I've had this same experience on RESTEasy Beta's 5 and 7, using JBoss 4.2.1, 4.2.2, and 4.2.3, with either JDK 1.5 or 1.6. I'm open to suggestions and helping further the effort: If I'm performing an operation incorrectly please advise. If I can be of further assistance, please let me know. Best, Eric Kahler |