tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: Tomee 1.6.0 2013.10.05 + Jersey 2.3.X -> openejb class loader error
Date Sun, 13 Oct 2013 13:49:39 GMT
you didn't configure jersey to use a provided bean manager (see -D
com.sun.jersey.server.impl.cdi.lookupExtensionInBeanManager)

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/10/13 zmirc <m_chirac@yahoo.com>

> Hi!
>
> Here it is the updated source:
> https://github.com/zmirc/tomee-jersey-bug
>
>
> I stopped trying Jersey JAX-RS 2, and I downgraded, but now I get:
> Oct 13, 2013 3:07:08 PM org.apache.catalina.core.ApplicationContext log
> SEVERE: StandardWrapper.Throwable
> java.lang.RuntimeException: javax.naming.NameNotFoundException: Name [com]
> is not bound in this Context. Unable to find [com].
> at
> com.sun.jersey.server.impl.cdi.CDIExtension.getInitializedExtension(CDIExtension.java:177)
> at
> com.sun.jersey.server.impl.cdi.CDIComponentProviderFactory.<init>(CDIComponentProviderFactory.java:92)
> at
> com.sun.jersey.server.impl.cdi.CDIComponentProviderFactoryInitializer.initialize(CDIComponentProviderFactoryInitializer.java:75)
> at
> com.sun.jersey.spi.container.servlet.WebComponent.configure(WebComponent.java:572)
> at
> com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.configure(ServletContainer.java:312)
> at
> com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:604)
> at
> com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:210)
> at
> com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:374)
> at
> com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:557)
> at javax.servlet.GenericServlet.init(GenericServlet.java:160)
> at
> org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
> at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
> at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
> at
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5033)
> at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5317)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
> at
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:657)
> at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:536)
> at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1462)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at
> org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
> at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
> at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
> at
> org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1445)
> at
> org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:860)
> at
> org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:357)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
> 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
> org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
> 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:581)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
> at
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
> at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
> at
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:724)
> Caused by: javax.naming.NameNotFoundException: Name [com] is not bound in
> this Context. Unable to find [com].
> at org.apache.naming.NamingContext.lookup(NamingContext.java:820)
> at org.apache.naming.NamingContext.lookup(NamingContext.java:168)
> at org.apache.naming.SelectorContext.lookup(SelectorContext.java:158)
> at javax.naming.InitialContext.lookup(InitialContext.java:411)
> at
> com.sun.jersey.server.impl.cdi.CDIExtension$2.stepInto(CDIExtension.java:290)
> at
> com.sun.jersey.server.impl.cdi.CDIExtension.diveIntoJNDIContext(CDIExtension.java:267)
> at
> com.sun.jersey.server.impl.cdi.CDIExtension.lookupJerseyConfigJNDIContext(CDIExtension.java:287)
> at
> com.sun.jersey.server.impl.cdi.CDIExtension.getInitializedExtension(CDIExtension.java:175)
> ... 53 more
>
> Oct 13, 2013 3:07:08 PM org.apache.catalina.core.StandardContext
> loadOnStartup
> SEVERE: Servlet /TomeeJersey threw load() exception
> javax.naming.NameNotFoundException: Name [com] is not bound in this
> Context. Unable to find [com].
> at org.apache.naming.NamingContext.lookup(NamingContext.java:820)
> at org.apache.naming.NamingContext.lookup(NamingContext.java:168)
> at org.apache.naming.SelectorContext.lookup(SelectorContext.java:158)
> at javax.naming.InitialContext.lookup(InitialContext.java:411)
> at
> com.sun.jersey.server.impl.cdi.CDIExtension$2.stepInto(CDIExtension.java:290)
> at
> com.sun.jersey.server.impl.cdi.CDIExtension.diveIntoJNDIContext(CDIExtension.java:267)
> at
> com.sun.jersey.server.impl.cdi.CDIExtension.lookupJerseyConfigJNDIContext(CDIExtension.java:287)
> at
> com.sun.jersey.server.impl.cdi.CDIExtension.getInitializedExtension(CDIExtension.java:175)
> at
> com.sun.jersey.server.impl.cdi.CDIComponentProviderFactory.<init>(CDIComponentProviderFactory.java:92)
> at
> com.sun.jersey.server.impl.cdi.CDIComponentProviderFactoryInitializer.initialize(CDIComponentProviderFactoryInitializer.java:75)
> at
> com.sun.jersey.spi.container.servlet.WebComponent.configure(WebComponent.java:572)
> at
> com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.configure(ServletContainer.java:312)
> at
> com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:604)
> at
> com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:210)
> at
> com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:374)
> at
> com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:557)
> at javax.servlet.GenericServlet.init(GenericServlet.java:160)
> at
> org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
> at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
> at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
> at
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5033)
> at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5317)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
> at
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:657)
> at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:536)
> at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1462)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at
> org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
> at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
> at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
> at
> org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1445)
> at
> org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:860)
> at
> org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:357)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
> 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
> org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
> 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:581)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
> at
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
> at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
> at
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:724)
>
>
>
> ________________________________
>  From: Romain Manni-Bucau [via OpenEJB] <
> ml-node+s979440n4665574h58@n4.nabble.com>
> To: zmirc <m_chirac@yahoo.com>
> Sent: Sunday, October 13, 2013 1:47 PM
> Subject: Re: Tomee 1.6.0 2013.10.05 + Jersey 2.3.X -> openejb class loader
> error
>
>
>
> Hi
>
> I don't get the NPE.
>
> About your issues:
> 1) why just extending Application should work if you use jersey? You want
> to use jersey so you do it yourself
> 2) you need to specify your Application class in web.xml as per the spec
>
> Here is a sample
>
> http://svn.apache.org/repos/asf/tomee/tomee/trunk/examples/tomee-jersey-eclipselink/src/main/webapp/WEB-INF/web.xml
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<
> http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
>
>
>
> 2013/10/13 zmirc <[hidden email]>
>
>
> > Moreover, if I don't specify JAX-RS in web.xml and I try to extend JAX-RS
> > Application, Tomee doesn't do anything at all, and returns 404.
> > Yet...this example works on plain Tomcat 7.0.42.
> >
> > I've attached both maven projects, for easier access.
> > tomee-jersey-bug-extending-Application.zip
> > <
> >
> http://openejb.979440.n4.nabble.com/file/n4665573/tomee-jersey-bug-extending-Application.zip
> > >
> > tomee-jersey-bug-web.xml.zip
> > <
> >
> http://openejb.979440.n4.nabble.com/file/n4665573/tomee-jersey-bug-web.xml.zip
> > >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://openejb.979440.n4.nabble.com/Tomee-1-6-0-2013-10-05-Jersey-2-3-X-openejb-class-loader-error-tp4665572p4665573.html
> > Sent from the OpenEJB User mailing list archive at Nabble.com.
> >
>
>
> ________________________________
>
> If you reply to this email, your message will be added to the discussion
> below:
> http://openejb.979440.n4.nabble.com/Tomee-1-6-0-2013-10-05-Jersey-2-3-X-openejb-class-loader-error-tp4665572p4665574.html
> To unsubscribe from Tomee 1.6.0 2013.10.05 + Jersey 2.3.X -> openejb class
> loader error, click here.
> NAML
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Tomee-1-6-0-2013-10-05-Jersey-2-3-X-openejb-class-loader-error-tp4665572p4665575.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message