Hi first with jaxrs or plus distributions you don't need jersey to do REST services.
then about jersey we have this sample (with some config in the pom IIRC): http://svn.apache.org/repos/asf/tomee/tomee/trunk/examples/tomee-jersey-eclipselink/pom.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/8/4 emgsilva <[email protected]> > Hi, > > I have a RESTful web service which uses Jersey (1.14) running in Tomcat. > However, I want to support some Java EE features on my web service (namely > Container-managed EntityManager, and other things that are to be added in > the near future)... To achieve that I see TomEE as a very interesting path, > given that I really like Tomcat. I use TomEE 1.5.2 in my first attempts, > however I am getting an error for which I cannot find a solution (I found > some similar reports, but no systematic solution nor a solution that works > in my case). I get the following error when I try to launch TomEE (from > Eclipse): > > Aug 04, 2013 4:33:34 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:576) > at > > com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.configure(ServletContainer.java:312) > at > > com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:608) > 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$StartChild.call(ContainerBase.java:1559) > at > > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) > at > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) > at java.util.concurrent.FutureTask.run(FutureTask.java:166) > at > > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) > at > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) > at java.lang.Thread.run(Thread.java:722) > 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) > ... 22 more > > My API resources get detected and listed (like I use to have with Tomcat > "alone"), however right after that I get this error. > > I am using TomEE Web profile, but already tried JAX-RS and Plus, and could > not get it working... > > Some people refer they had better luck with RestEasy and TomEE... but I > would like to avoid make changes on that. > > Any clues on why this takes place and how to solve it? > > Cheers! > > > > -- > View this message in context: > http://openejb.979440.n4.nabble.com/TomEE-and-Jersey-Issue-tp4664515.html > Sent from the OpenEJB User mailing list archive at Nabble.com. >
