tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Schuett (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TOMEE-1743) JAX-RS goes away
Date Thu, 21 Dec 2017 10:09:00 GMT

    [ https://issues.apache.org/jira/browse/TOMEE-1743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16299826#comment-16299826
] 

Thomas Schuett commented on TOMEE-1743:
---------------------------------------

I am suffering from this problem too, with TomEE 1.7.4. Unfortunatelly I can not add additional
details besides what was reported before already.

> JAX-RS goes away
> ----------------
>
>                 Key: TOMEE-1743
>                 URL: https://issues.apache.org/jira/browse/TOMEE-1743
>             Project: TomEE
>          Issue Type: Bug
>          Components: TomEE Core Server
>    Affects Versions: 1.7.4
>            Reporter: Matthew Broadhead
>
> While developing I keep getting the following error and having to restart the server
to make everything work again.  it is getting quite frustrating.
> {noformat}
> Mar 20, 2016 10:39:18 AM org.apache.catalina.core.StandardWrapperValve invoke
> SEVERE: Servlet.service() for servlet [default] in context with path [/rest] threw exception
[Error processing webservice request] with root cause
> java.lang.NullPointerException
> 	at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:240)
> 	at org.apache.openejb.server.cxf.rs.CxfRsHttpListener.doInvoke(CxfRsHttpListener.java:227)
> 	at org.apache.tomee.webservices.CXFJAXRSFilter.doFilter(CXFJAXRSFilter.java:94)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
> 	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
> 	at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
> 	at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
> 	at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
> 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
> 	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
> 	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
> 	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
> 	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> 	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
> 	at java.lang.Thread.run(Thread.java:745)
> {noformat}
> there is a rest application defined by
> {code}
> @ApplicationPath("/rest")
> public class ApplicationConfig extends Application {
> 	public Set<Class<?>> getClasses() {
> 		return new HashSet<Class<?>>(
> 				Arrays.asList(ApplicationService.class, DirectoryService.class, SearchService.class));
> 	}
> }
> {code}
> with for example
> {code}
> @Path("/application")
> @Produces(MediaType.APPLICATION_JSON)
> public class ApplicationService {
> 	@EJB
> 	private ApplicationBean applicationBean;
> 	@Path("/getdata")
> 	@GET
> 	public Response getdata(@QueryParam("name") String name) {
> 		String result = applicationBean.getData(name);
> 		return Response.ok(result).build();
> 	}
> }
> {code}
> which is accessed by
> {code}
> public String getData(User user, String name) {
> 		return WebClient.create(Utility.baseAddress(), user.getUserName(), user.getPassword(),
null)
> 				.path("/rest/rest/application/getdata").query("name", name).accept(MediaType.APPLICATION_JSON_TYPE)
> 				.get(String.class);
> 	}
> {code}
> if I navigate to http://localhost:8080/rest/rest/application/getdata it shows
> {noformat}
> javax.servlet.ServletException: Error processing webservice request
> 	org.apache.tomee.webservices.CXFJAXRSFilter.doFilter(CXFJAXRSFilter.java:98)
> 	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
> java.io.IOException: Failed to invoke AbstractHTTPDestination
> 	org.apache.openejb.server.cxf.rs.CxfRsHttpListener.doInvoke(CxfRsHttpListener.java:229)
> 	org.apache.tomee.webservices.CXFJAXRSFilter.doFilter(CXFJAXRSFilter.java:94)
> 	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
> java.lang.NullPointerException
> 	org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:240)
> 	org.apache.openejb.server.cxf.rs.CxfRsHttpListener.doInvoke(CxfRsHttpListener.java:227)
> 	org.apache.tomee.webservices.CXFJAXRSFilter.doFilter(CXFJAXRSFilter.java:94)
> 	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message