The context.xml file is packaged with the webapp's WAR file. This error happens whenever I start the server ... from within Eclipse as well as when deployed as a WAR file using the terminal.
Going through the startup log messages only the following stand out: WARNING: <Deployments dir="null"> - Does not exist: /home/user/apache-tomee-plus-1.5.1-SNAPSHOT/apps ... INFO: Deploying web application archive /home/user/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/ROOT.war ... WARNING: WARN ... WebModule{moduleId='', contextRoot=''}: Incorrect location of file file:/home/user/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/ROOT/META-INF/beans.xml The file should be in WEB-INF directory Dec 03, 2012 11:04:49 PM org.apache.openejb.config.ReportValidationResults logResults WARNING: 1 warning for WebModule(path=) ... INFO: using context file /home/user/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/ROOT/META-INF/context.xml Dec 03, 2012 11:04:51 PM org.apache.openejb.assembler.classic.Assembler createApplication INFO: Deployed Application(path=/home/deependra/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/ROOT) ... Dec 03, 2012 11:04:53 PM org.apache.openejb.server.rest.RESTService afterApplicationCreated INFO: REST application deployed: com.qlicket.adserv.helpers.RestUrlInitializer Dec 03, 2012 11:04:53 PM org.apache.openejb.observer.ObserverManager fireEvent SEVERE: error invoking org.apache.openejb.observer.ObserverManager$Observer@5d18daf6 java.lang.reflect.InvocationTargetException 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:601) at org.apache.openejb.observer.ObserverManager$Observer.invoke(ObserverManager.java:145) at org.apache.openejb.observer.ObserverManager.fireEvent(ObserverManager.java:69) at org.apache.openejb.loader.SystemInstance.fireEvent(SystemInstance.java:107) at org.apache.tomee.catalina.TomcatWebAppBuilder.afterStart(TomcatWebAppBuilder.java:1290) at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:104) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:168) 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.deployWAR(HostConfig.java:977) at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1655) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 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: java.lang.IllegalStateException: Invalid context '/rest'. Cannot find context in host localhost at org.apache.tomee.webservices.TomcatRsRegistry.createRsHttpListener(TomcatRsRegistry.java:105) at org.apache.openejb.server.rest.RESTService.deployEJB(RESTService.java:386) at org.apache.openejb.server.rest.RESTService.afterApplicationCreated(RESTService.java:230) at org.apache.tomee.webservices.TomeeJaxRsService.afterApplicationCreated(TomeeJaxRsService.java:51) ... 24 more META-INF folder has 4 files... beans.xml, persistence.xml, context.xml & MANIFEST.MF If needed I would be happy to do a screen sharing session using teamviewer or Skype or any other Linux compatible technique. I love this server because of the simplicity and so would love to spend time figuring out this issue. Using TomE, now I have this thought process that if something seems very complicated on TomEE I'm not doing it right :) Cheers -- View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4659062.html Sent from the OpenEJB User mailing list archive at Nabble.com.