You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by cri_sys <se...@gmail.com> on 2013/12/02 21:12:27 UTC

No root resource matching request path

Hello,
I just updated tomee from 1.5.2 to 1.6.0 and i get the following error with
files inside webapps, js, css, images...

WARNING: No root resource matching request path images/bg.jpg has been
found, Relative Path: /images/bg.jpg. Please enable FINE/TRACE log level for
more details.
Dec 2, 2013 8:58:07 PM
org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper toResponse
WARNING: javax.ws.rs.WebApplicationException
	at
org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:162)
	at
org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:91)
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)
	at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
	at
org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:237)
	at
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.onMessage(CxfRsHttpListener.java:170)
	at org.apache.openejb.server.rest.RsServlet.service(RsServlet.java:53)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:145)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at com.polyglong.filters.LoginFilter.doFilter(LoginFilter.java:120)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:145)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at
org.apache.catalina.filters.ExpiresFilter.doFilter(ExpiresFilter.java:1179)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
	at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
	at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
	at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
	at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
	at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
	at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)

Its there an extra configuration in Tomee 1.6.0 that i should be aware of.

Thanks



--
View this message in context: http://openejb.979440.n4.nabble.com/No-root-resource-matching-request-path-tp4666495.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: No root resource matching request path

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

you should either use a subcontext for rest part (the best practise
IMO) or exclude static resources
(https://issues.apache.org/jira/browse/TOMEE-728)
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2013/12/2 cri_sys <se...@gmail.com>:
> Hello,
> I just updated tomee from 1.5.2 to 1.6.0 and i get the following error with
> files inside webapps, js, css, images...
>
> WARNING: No root resource matching request path images/bg.jpg has been
> found, Relative Path: /images/bg.jpg. Please enable FINE/TRACE log level for
> more details.
> Dec 2, 2013 8:58:07 PM
> org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper toResponse
> WARNING: javax.ws.rs.WebApplicationException
>         at
> org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:162)
>         at
> org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:91)
>         at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)
>         at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
>         at
> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:237)
>         at
> org.apache.openejb.server.cxf.rs.CxfRsHttpListener.onMessage(CxfRsHttpListener.java:170)
>         at org.apache.openejb.server.rest.RsServlet.service(RsServlet.java:53)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>         at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:145)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>         at com.polyglong.filters.LoginFilter.doFilter(LoginFilter.java:120)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>         at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:145)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>         at
> org.apache.catalina.filters.ExpiresFilter.doFilter(ExpiresFilter.java:1179)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
>         at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
>         at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
>         at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
>         at
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
>         at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
>         at
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:662)
>
> Its there an extra configuration in Tomee 1.6.0 that i should be aware of.
>
> Thanks
>
>
>
> --
> View this message in context: http://openejb.979440.n4.nabble.com/No-root-resource-matching-request-path-tp4666495.html
> Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: No root resource matching request path

Posted by cri_sys <se...@gmail.com>.
Thanks!
I added a ApplicationConfig as suggested, and evth works properly now.
some further info here:
https://jersey.java.net/documentation/latest/deployment.html




--
View this message in context: http://openejb.979440.n4.nabble.com/No-root-resource-matching-request-path-tp4666495p4666547.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: No root resource matching request path

Posted by Romain Manni-Bucau <rm...@gmail.com>.
there is a single test for it + a lot of routing features of JAXRS are
not supported + the config is far more verbose than using application

That said it shouldnt deploy/undeploy. Just deploy each endpoint separately.
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2013/12/3 cri_sys <se...@gmail.com>:
> What it would be the disavantage exactly using the system.properties?
> I would like to dont change the Endpoint and update the project using it.
>
>
>
> --
> View this message in context: http://openejb.979440.n4.nabble.com/No-root-resource-matching-request-path-tp4666495p4666531.html
> Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: No root resource matching request path

Posted by cri_sys <se...@gmail.com>.
What it would be the disavantage exactly using the system.properties?
I would like to dont change the Endpoint and update the project using it.



--
View this message in context: http://openejb.979440.n4.nabble.com/No-root-resource-matching-request-path-tp4666495p4666531.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: No root resource matching request path

Posted by Loïc Rodier <lo...@gmail.com>.
As Romain, I would suggest to put soomething like :

@ApplicationPath("/rest")
public class ApplicationConfig extends Application {
    public Set<Class<?>> getClasses() {
        return new HashSet<Class<?>>(Arrays.asList(MyService.class));
    }
}

Will probably have to adapt your endpoint URI  but it should work better


2013/12/3 Romain Manni-Bucau <rm...@gmail.com>

> 1.6.0 uses application oriented deployment to be jaxrs compliant, the mode
> you use is a degraded mode kept for compatibility only
> Le 3 déc. 2013 11:04, "cri_sys" <se...@gmail.com> a écrit :
>
> > Thanks i have fixed the issue, adding the following to the
> > system.properties:
> >
> > openejb.jaxrs.application = false
> >
> > Now my application its running, but something strange its that it runs
> > twice
> > before really starting, so it runs then destroys, then runs again, taking
> > longer the startup time, its there any change in  1.6.0 for this as well?
> >
> >
> >
> > --
> > View this message in context:
> >
> http://openejb.979440.n4.nabble.com/No-root-resource-matching-request-path-tp4666495p4666507.html
> > Sent from the OpenEJB Dev mailing list archive at Nabble.com.
> >
>

Re: No root resource matching request path

Posted by Romain Manni-Bucau <rm...@gmail.com>.
1.6.0 uses application oriented deployment to be jaxrs compliant, the mode
you use is a degraded mode kept for compatibility only
Le 3 déc. 2013 11:04, "cri_sys" <se...@gmail.com> a écrit :

> Thanks i have fixed the issue, adding the following to the
> system.properties:
>
> openejb.jaxrs.application = false
>
> Now my application its running, but something strange its that it runs
> twice
> before really starting, so it runs then destroys, then runs again, taking
> longer the startup time, its there any change in  1.6.0 for this as well?
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/No-root-resource-matching-request-path-tp4666495p4666507.html
> Sent from the OpenEJB Dev mailing list archive at Nabble.com.
>

Re: No root resource matching request path

Posted by cri_sys <se...@gmail.com>.
Thanks i have fixed the issue, adding the following to the system.properties:

openejb.jaxrs.application = false

Now my application its running, but something strange its that it runs twice
before really starting, so it runs then destroys, then runs again, taking
longer the startup time, its there any change in  1.6.0 for this as well?



--
View this message in context: http://openejb.979440.n4.nabble.com/No-root-resource-matching-request-path-tp4666495p4666507.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.