You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by deetewari <de...@hotmail.com> on 2012/12/03 14:20:25 UTC

JAX-RS webservices do not work on TomEE if webapp context is "/"

Hi,I'm using Tomee 1.5 Plus. I do the development in Eclipse based
SpringSource Tools Suite (STS). Currently I'm using only Eclipse to generate
the WAR file and hence most settings are done from within Eclipse. So here's
the issue I'm facing...I have a Java web application using JPA for
persistence, EJB (mostly stateless session beans). Some of the EJBs also
serve as JAX-RS services generating JSON. All this works perfectly if I
deploy my web application with the context path set to any string like
"/app" ... so the web application can then be reached at
http://localhost/app/.However, when I deploy my app as ROOT.war with the
context path set as "/" then everything else works fine except JAX-RS
services don't start and I get this message on the console:INFO: REST
application deployed: com.foo.app.helpers.RestUrlInitializerDec 03, 2012
6:42:04 PM org.apache.openejb.observer.ObserverManager fireEventSEVERE:
error invoking
org.apache.openejb.observer.ObserverManager$Observer@3e4282f4java.lang.reflect.InvocationTargetException...Caused
by: java.lang.IllegalStateException: Invalid context '/rest'.  Cannot find
context in host localhost"/rest" is the path I want the JAX-RS services to
be available under. This is set by a Simple class like:
@ApplicationPath("/rest")public class RestUrlInitializer extends Application
{}So what am I missing? How can I start the JAX-RS webservice without any
context path like http://localhost/app/rest.Thanks



--
View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by deetewari <de...@hotmail.com>.
Hi Romain,

Any progress on this issue of WAR deployments not working from within
Eclipse. It is really frustrating and painful to keep generating a WAR and
copying to the webaps folder of TomEE running in a separate JVM!

I really want to get this fixed so tell me how can I help. I have followed
all the instructions in the Documentation but still I have this issue with
1.5.1-plus!

Thanks



--
View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4660702.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by Romain Manni-Bucau <rm...@gmail.com>.
opened https://issues.apache.org/jira/browse/TOMEE-771

i hope the title is "google friendly" even if a little wrong (in fact the
issue was the overriding of the context through context.xml was ignored in
some circumstances).



*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/2/11 deetewari <de...@hotmail.com>

> Exact same error as previous post on Eclipse-JEE-JUNOSR1 with
> 1.5.2-SNAPSHOT-20130211.041121-66-plus.
> Where and what should I look into?
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4660715.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by deetewari <de...@hotmail.com>.
Exact same error as previous post on Eclipse-JEE-JUNOSR1 with
1.5.2-SNAPSHOT-20130211.041121-66-plus.
Where and what should I look into?



--
View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4660715.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by deetewari <de...@hotmail.com>.
Yeah, just tried with apache-tomee-1.5.2-20130211.041121-66-plus and the same
issue is cropping up! I'm currently using SpringSource Tools Suite (STS)
Version: 2.9.2.RELEASE and that is fiarly upto date. I'm currently
downloading stock Eclipse for JavaEE (JUNOSR1) and will try on it as well.
Will post an update about how things are on it shortly!

Here's the actual error for reference:
=====================================
...
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting
property 'source' to 'org.eclipse.jst.jee.server:WebApp1' did not find a
matching property.
...
INFO: using context file
/home/user/Documents/workspace-sts/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/WebApp1/META-INF/context.xml
Feb 12, 2013 1:49:37 AM org.apache.openejb.assembler.classic.Assembler
createApplication
INFO: Deployed
Application(path=/home/user/Documents/workspace-sts/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/WebApp1)
Feb 12, 2013 1:49:37 AM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
	at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
	at java.util.concurrent.FutureTask.get(FutureTask.java:111)
	at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
	at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)
	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: org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	... 7 more
Caused by: java.lang.IllegalArgumentException: can't find path under current
webapp deployment []
	at
org.apache.tomee.catalina.OpenEJBContextConfig.processAnnotationsUrl(OpenEJBContextConfig.java:362)
	at
org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1307)
	at
org.apache.tomee.catalina.OpenEJBContextConfig.webConfig(OpenEJBContextConfig.java:249)
	at
org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
	at
org.apache.tomee.catalina.OpenEJBContextConfig.configureStart(OpenEJBContextConfig.java:86)
	at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
	at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5179)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 7 more

...
INFO: Deployed
Application(path=/home/user/apache-tomee-plus-1.5.2-SNAPSHOT/webapps/tomee)
Feb 12, 2013 1:49:38 AM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost]]
	at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
	at java.util.concurrent.FutureTask.get(FutureTask.java:111)
	at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
	at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:684)
	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.catalina.startup.Bootstrap.start(Bootstrap.java:322)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:456)
Caused by: org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	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: org.apache.catalina.LifecycleException: A child container failed
during start
	at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
	at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 7 more

Feb 12, 2013 1:49:38 AM org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start: 
org.apache.catalina.LifecycleException: Failed to start component
[StandardServer[8005]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:684)
	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.catalina.startup.Bootstrap.start(Bootstrap.java:322)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:456)
Caused by: org.apache.catalina.LifecycleException: Failed to start component
[StandardService[Catalina]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed
during start
	at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
	at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 11 more




--
View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4660713.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by Romain Manni-Bucau <rm...@gmail.com>.
1.5.1? did you try 1.5.2 snapshot? i thought it was fixed

btw to avoid the copy paste process you can use tomee maven plugin but if
there is still an issue it should be fixed.

*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/2/11 deetewari <de...@hotmail.com>

> Hi Romain,
>
> Any progress on this issue of WAR deployments not working from within
> Eclipse. It is really frustrating and painful to keep generating a WAR and
> copying to the webaps folder of TomEE running in a separate JVM!
>
> I really want to get this fixed so tell me how can I help. I have followed
> all the instructions in the Documentation but still I have this issue with
> 1.5.1-plus!
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4660703.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by deetewari <de...@hotmail.com>.
Hi Romain,

Any progress on this issue of WAR deployments not working from within
Eclipse. It is really frustrating and painful to keep generating a WAR and
copying to the webaps folder of TomEE running in a separate JVM!

I really want to get this fixed so tell me how can I help. I have followed
all the instructions in the Documentation but still I have this issue with
1.5.1-plus!




--
View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4660703.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

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

still the same issue

btw i tested on a project from my own using @WebXXX in eclipse and it seems fine

if you still encouter github issues maybe create another repo to push
the project

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



2013/1/2 zeeman <ha...@fastmail.us>:
> Somehow github was not getting latest pom.xml
>
> Could you please sync my test project https://github.com/z00 and try again.
> I can reproduce the issue with snapshot.
>
> I configure Tomee snapshot in pom.xml from tomee maven plugin.
>
> Thanks!
>
>
>
> --
> View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4660024.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by zeeman <ha...@fastmail.us>.
Somehow github was not getting latest pom.xml 

Could you please sync my test project https://github.com/z00 and try again.
I can reproduce the issue with snapshot. 

I configure Tomee snapshot in pom.xml from tomee maven plugin.

Thanks!



--
View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4660024.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by Romain Manni-Bucau <rm...@gmail.com>.
I wasnt with 1.5.2 snapshot
Le 2 janv. 2013 10:27, "zeeman" <ha...@fastmail.us> a écrit :

> I have already updated it https://github.com/z00
> You should be able to reproduce it with 1.5.1 release.
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4660008.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by zeeman <ha...@fastmail.us>.
I have already updated it https://github.com/z00
You should be able to reproduce it with 1.5.1 release.



--
View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4660008.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by Romain Manni-Bucau <rm...@gmail.com>.
With your sample i get issues with seam, can you update it please?

I have an idea of the issue, will look tomorrow
Le 2 janv. 2013 00:21, "zeeman" <ha...@fastmail.us> a écrit :

> Thanks for looking into this. I have same kept the same Eclipse (3.7). If I
> use Tomee 1.5.1 or snapshot I get "can't find path under current webapp
> deployment" error. If I revert to Tomee 1.5.0 everything works fine.
>
> The only variable that changed here is Tomee, not eclipse.
>
> If I can take the war, deploy it outside of Eclipse in Tomee, it works
> fine.
> So there is something between Eclipse and Tomee 1.5.1 that's causing this.
> Latest stack trace is below:
>
>
> SEVERE: A child container failed during start
> java.util.concurrent.ExecutionException:
> org.apache.catalina.LifecycleException: Failed to start component
> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
>         at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
>         at java.util.concurrent.FutureTask.get(Unknown Source)
>         at
>
> org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
>         at
> org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)
>         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(Unknown Source)
>         at java.util.concurrent.FutureTask.run(Unknown Source)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
> Source)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
> Source)
>         at java.lang.Thread.run(Unknown Source)
> Caused by: org.apache.catalina.LifecycleException: Failed to start
> component
> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
>         ... 7 more
> Caused by: java.lang.IllegalArgumentException: can't find path under
> current
> webapp deployment []
>         at
>
> org.apache.tomee.catalina.OpenEJBContextConfig.processAnnotationsUrl(OpenEJBContextConfig.java:297)
>         at
>
> org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1306)
>         at
>
> org.apache.tomee.catalina.OpenEJBContextConfig.webConfig(OpenEJBContextConfig.java:188)
>         at
>
> org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
>         at
>
> org.apache.tomee.catalina.OpenEJBContextConfig.configureStart(OpenEJBContextConfig.java:76)
>         at
>
> org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369)
>         at
>
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>         at
>
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>         at
>
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         ... 7 more
> Jan 1, 2013 7:15:15 PM org.apache.catalina.core.ContainerBase startInternal
> SEVERE: A child container failed during start
> java.util.concurrent.ExecutionException:
> org.apache.catalina.LifecycleException: Failed to start component
> [StandardEngine[Catalina].StandardHost[localhost]]
>         at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
>         at java.util.concurrent.FutureTask.get(Unknown Source)
>         at
>
> org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
>         at
>
> org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         at
>
> org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         at
>
> org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:684)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>         at java.lang.reflect.Method.invoke(Unknown Source)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:451)
> Caused by: org.apache.catalina.LifecycleException: Failed to start
> component
> [StandardEngine[Catalina].StandardHost[localhost]]
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
>         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(Unknown Source)
>         at java.util.concurrent.FutureTask.run(Unknown Source)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
> Source)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
> Source)
>         at java.lang.Thread.run(Unknown Source)
> Caused by: org.apache.catalina.LifecycleException: A child container failed
> during start
>         at
>
> org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
>         at
> org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         ... 7 more
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4660004.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by zeeman <ha...@fastmail.us>.
Thanks for looking into this. I have same kept the same Eclipse (3.7). If I
use Tomee 1.5.1 or snapshot I get "can't find path under current webapp
deployment" error. If I revert to Tomee 1.5.0 everything works fine.

The only variable that changed here is Tomee, not eclipse.

If I can take the war, deploy it outside of Eclipse in Tomee, it works fine.
So there is something between Eclipse and Tomee 1.5.1 that's causing this.
Latest stack trace is below:


SEVERE: A child container failed during start
java.util.concurrent.ExecutionException:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
	at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
	at java.util.concurrent.FutureTask.get(Unknown Source)
	at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
	at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)
	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(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	... 7 more
Caused by: java.lang.IllegalArgumentException: can't find path under current
webapp deployment []
	at
org.apache.tomee.catalina.OpenEJBContextConfig.processAnnotationsUrl(OpenEJBContextConfig.java:297)
	at
org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1306)
	at
org.apache.tomee.catalina.OpenEJBContextConfig.webConfig(OpenEJBContextConfig.java:188)
	at
org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
	at
org.apache.tomee.catalina.OpenEJBContextConfig.configureStart(OpenEJBContextConfig.java:76)
	at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
	at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 7 more
Jan 1, 2013 7:15:15 PM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost]]
	at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
	at java.util.concurrent.FutureTask.get(Unknown Source)
	at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
	at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:684)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:451)
Caused by: org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	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(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.catalina.LifecycleException: A child container failed
during start
	at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
	at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 7 more



--
View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4660004.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by Romain Manni-Bucau <rm...@gmail.com>.
did you read https://bugs.eclipse.org/bugs/show_bug.cgi?id=145701?

seems a kind of bug in wtp

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



2012/12/31 zeeman <ha...@fastmail.us>:
> Whenver I remove webapps/ROOT, eclipse recreate is when I publish. ROOT only
> has an empty WEB-INF/web.xml in it. Do I need to turn that off somewhere? I
> don't know why eclipse is creating it.
>
>
>
> --
> View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4659989.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by zeeman <ha...@fastmail.us>.
Whenver I remove webapps/ROOT, eclipse recreate is when I publish. ROOT only
has an empty WEB-INF/web.xml in it. Do I need to turn that off somewhere? I
don't know why eclipse is creating it.



--
View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4659989.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by Romain Manni-Bucau <rm...@gmail.com>.
can you try removing root please?

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



2012/12/31 zeeman <ha...@fastmail.us>:
> Yes, in webapps. I have 2 folders under webapps, ROOT and sportivity. From
> Eclipse, I sat context path to /
>
>
>
> --
> View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4659967.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by zeeman <ha...@fastmail.us>.
Yes, in webapps. I have 2 folders under webapps, ROOT and sportivity. From
Eclipse, I sat context path to /



--
View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4659967.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Just to be sure: did you keep root app in webapps/?
Le 28 déc. 2012 07:39, "zeeman" <ha...@fastmail.us> a écrit :

> Update:
>
> I updated Eclipse and plugins and using / context root from Eclipse still
> does not work with 1.5.1 and the snapshot.
>
> The sample project link above should let you reproduce it.
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4659912.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by zeeman <ha...@fastmail.us>.
Update:

I updated Eclipse and plugins and using / context root from Eclipse still
does not work with 1.5.1 and the snapshot.

The sample project link above should let you reproduce it.



--
View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4659912.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by zeeman <ha...@fastmail.us>.
removeTomeeWebapp, that's the flag. Good documentation on plugin page ;)

Please let me know what you find out after you test to fix / eclipse issue.



--
View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4659908.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Tomee webapp can be removed with another attribute (cant remember the exact
name right now).
Le 27 déc. 2012 13:27, "zeeman" <ha...@fastmail.us> a écrit :

> I tried with the 1.5.2 snapshot. Still the same exact error. If I don't
> use /
> as root context things work fine from eclipse.
>
> So it looks like something broke it in 1.5.1 release and forward when it
> comes to using / as context root.
>
> If I revert things work fine, so must be something must have changed.
>
> I update my test project https://github.com/z00
>
> you can get Tomee by running the plugin and test with /
>
> BTW, mvn plugin no longer deletes tomee folder under webapps. I have
> removeDefaultWebapps = true.
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4659905.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by zeeman <ha...@fastmail.us>.
I tried with the 1.5.2 snapshot. Still the same exact error. If I don't use /
as root context things work fine from eclipse.

So it looks like something broke it in 1.5.1 release and forward when it
comes to using / as context root.

If I revert things work fine, so must be something must have changed. 

I update my test project https://github.com/z00

you can get Tomee by running the plugin and test with /

BTW, mvn plugin no longer deletes tomee folder under webapps. I have
removeDefaultWebapps = true. 



--
View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4659905.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

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

Well please try the snapshot to be sure it wasnt fixed then if it doesnt
work please share something reproducing it since it worked last time i
tried so thats hard to work on it for us
Le 27 déc. 2012 05:44, "zeeman" <ha...@fastmail.us> a écrit :

> Hi Romain,
>
> I have the same exact issue with 1.5.1 release (final one). I downloaded
> today. I cannot start Tomee from Eclipse.
>
> In my Eclipse server.xml:
>
> <Context docBase="sportivity" path="/" reloadable="false"
> source="org.eclipse.jst.jee.server:sportivity"/></Host>
>
> With 1.5.0 it used to work fine with Eclipse. I'm blocked on this,
> otherwise, I have to revert to old one.
>
> Thanks!
> Z
>
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4659897.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by zeeman <ha...@fastmail.us>.
Hi Romain,

I have the same exact issue with 1.5.1 release (final one). I downloaded
today. I cannot start Tomee from Eclipse.

In my Eclipse server.xml:

<Context docBase="sportivity" path="/" reloadable="false"
source="org.eclipse.jst.jee.server:sportivity"/></Host>

With 1.5.0 it used to work fine with Eclipse. I'm blocked on this,
otherwise, I have to revert to old one.

Thanks!
Z





--
View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4659897.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

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

tried <Context docBase="JAXRS" path="/" reloadable="true"
source="org.eclipse.jst.jee.server:JAXRS"/> and it works fine (default
generated by eclipse)

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



2012/12/5 deetewari <de...@hotmail.com>:
> The actual server.xml entry for Context is
>
>  <Context
> docBase="/home/user/Documents/workspace-sts/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/WebApp"
> path="" reloadable="true" source="org.eclipse.jst.jee.server:WebApp">
>
> Secondly, in Eclipse if I need to make a webapp default, I set the context
> path to "/" as it doesn't allow for an empty string. The deployed Context
> entry's path attribute used to work ok with "/". Even if I manually edit and
> set it to "", the error is still occurring.
>
> Thanks.
>
>
>
> --
> View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4659112.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by deetewari <de...@hotmail.com>.
The actual server.xml entry for Context is 

 <Context
docBase="/home/user/Documents/workspace-sts/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/WebApp"
path="" reloadable="true" source="org.eclipse.jst.jee.server:WebApp">

Secondly, in Eclipse if I need to make a webapp default, I set the context
path to "/" as it doesn't allow for an empty string. The deployed Context
entry's path attribute used to work ok with "/". Even if I manually edit and
set it to "", the error is still occurring.

Thanks.



--
View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4659112.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by Romain Manni-Bucau <rm...@gmail.com>.
wonder if <Context docBase="WebApp" path="/" reloadable="true"
source="org.eclipse.jst.jee.server:WebApp"/> shouldnt be <Context
docBase="WebApp" path="" reloadable="true"
source="org.eclipse.jst.jee.server:WebApp"/>

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



2012/12/5 deetewari <de...@hotmail.com>:
> <Context docBase="WebApp" path="/" reloadable="true"
> source="org.eclipse.jst.jee.server:WebApp"/></Host>

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by deetewari <de...@hotmail.com>.
Hi,

When i try to deploy the project from within Eclipse, then I get the
following errors:

Dec 05, 2012 3:16:17 PM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
	at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
	at java.util.concurrent.FutureTask.get(FutureTask.java:111)
	at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
	at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)
	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: org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	... 7 more
Caused by: java.lang.IllegalArgumentException: can't find path under current
webapp deployment []
	at
org.apache.tomee.catalina.OpenEJBContextConfig.processAnnotationsUrl(OpenEJBContextConfig.java:297)
	at
org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1306)
	at
org.apache.tomee.catalina.OpenEJBContextConfig.webConfig(OpenEJBContextConfig.java:188)
	at
org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
	at
org.apache.tomee.catalina.OpenEJBContextConfig.configureStart(OpenEJBContextConfig.java:76)
	at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
	at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 7 more

Dec 05, 2012 3:16:17 PM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost]]
	at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
	at java.util.concurrent.FutureTask.get(FutureTask.java:111)
	at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
	at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:684)
	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.catalina.startup.Bootstrap.start(Bootstrap.java:322)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:451)
Caused by: org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	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: org.apache.catalina.LifecycleException: A child container failed
during start
	at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
	at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 7 more

Dec 05, 2012 3:16:17 PM org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start: 
org.apache.catalina.LifecycleException: Failed to start component
[StandardServer[8005]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:684)
	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.catalina.startup.Bootstrap.start(Bootstrap.java:322)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:451)
Caused by: org.apache.catalina.LifecycleException: Failed to start component
[StandardService[Catalina]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed
during start
	at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
	at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 11 more

Eclipse is set to not modify the tomcat installation. However, when I try to
deploy the webapp directly as a WAR file and start TomEE from the terminal
everything works just fine. Hence I think it's definitely an Eclipse
configuration issue. However, I'm unable to chase it as to where or which
specific point is it failing. Can you point me in the right direction so
that I can diagnose further. It is definitely happening before the WAR is
inflated into a separate folder ... I tested this using the server.xml that
Eclipse generates and uses. Here's that for reference:

<?xml version="1.0" encoding="UTF-8"?>
<Server port="8005" shutdown="SHUTDOWN">
  
  <Listener className="org.apache.tomee.catalina.ServerListener"/>
  
  
  <Listener SSLEngine="on"
className="org.apache.catalina.core.AprLifecycleListener"/>
  
  <Listener className="org.apache.catalina.core.JasperListener"/>
  
  <Listener
className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>
  <Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
  <Listener
className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/>

  
  <GlobalNamingResources>
    
    <Resource auth="Container" description="User database that can be
updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
name="UserDatabase" pathname="conf/tomcat-users.xml"
type="org.apache.catalina.UserDatabase"/>
  </GlobalNamingResources>

  
  <Service name="Catalina">

    
    


    
    <Connector connectionTimeout="20000" port="80" protocol="HTTP/1.1"
redirectPort="8443"/>
    
    
    
    

    
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/>


    

    
    <Engine defaultHost="localhost" name="Catalina">

      
      

      
      <Realm className="org.apache.catalina.realm.LockOutRealm">
        
        <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
      </Realm>

      <Host appBase="webapps" autoDeploy="true" name="localhost"
unpackWARs="true">

        
        

        
        <Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" pattern="%h %l %u %t &quot;%r&quot; %s %b"
prefix="localhost_access_log." suffix=".txt"/>

      <Context docBase="WebApp" path="/" reloadable="true"
source="org.eclipse.jst.jee.server:WebApp"/></Host>
    </Engine>
  </Service>
</Server>

Thanks.



--
View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4659110.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by deetewari <de...@hotmail.com>.
Hi Romain,

Tried it with snapshot apache-tomee-1.5.1-20121205.041514-100-plus and
everything looks good. I'll be using this snapshot for sometime in
development and report anymore issues if I find. When can I expect the next
stable release? I know little about up-voting (term I read about on the web)
so if I can do anything to speed up a release kindly let me know and I'll
love to do it :)

Awesome community and awesome work ... will stick to TomEE over JBoss AS7 :)




--
View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4659109.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by deetewari <de...@hotmail.com>.
Awesome, I'll be waiting for an update eagerly :)
Thanks.



--
View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4659088.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

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

this was from a commit later in the night

normally that's fixed on trunk

not sure the last deploy i triggered contains it but tmr you'll get it for sure

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



2012/12/4 deetewari <de...@hotmail.com>:
> So I downloaded the SNAPSHOT from the link you sent ... and on a clean
> install and deploy of ROOT.war as attached in an earlier reply here's what
> I'm getting.
>
> WARNING: <Deployments dir="null"> - Does not exist:
> /home/user/apache-tomee-plus-1.5.1-SNAPSHOT/apps
> Dec 04, 2012 6:32:02 PM org.apache.openejb.util.OptionsLog info
> INFO: Using 'openejb.system.apps=true'
> Dec 04, 2012 6:32:02 PM org.apache.openejb.util.OpenEJBErrorHandler
> handleUnknownError
> SEVERE: FATAL ERROR: Unknown error in Assembler.  Please send the following
> stack trace and this message to users@openejb.apache.org :
>  java.lang.NullPointerException
>         at
> org.apache.openejb.config.DeploymentModule$ID.<init>(DeploymentModule.java:73)
>         at org.apache.openejb.config.EjbModule.<init>(EjbModule.java:73)
>         at org.apache.openejb.config.EjbModule.<init>(EjbModule.java:81)
>         at org.apache.openejb.config.EjbModule.<init>(EjbModule.java:58)
>         at org.apache.openejb.config.SystemApps.getSystemModule(SystemApps.java:41)
>         at
> org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:487)
>         at
> org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:364)
>         at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:343)
>         at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:144)
>         at org.apache.openejb.OpenEJB.init(OpenEJB.java:290)
>         at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:233)
>         at org.apache.tomee.catalina.TomcatLoader.init(TomcatLoader.java:130)
>         at
> org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:121)
>         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.init(LifecycleBase.java:110)
>         at org.apache.catalina.startup.Catalina.load(Catalina.java:633)
>         at org.apache.catalina.startup.Catalina.load(Catalina.java:658)
>         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.catalina.startup.Bootstrap.load(Bootstrap.java:281)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
>
> Dec 04, 2012 6:32:02 PM org.apache.openejb.OpenEJB$Instance <init>
> SEVERE: OpenEJB has encountered a fatal error and cannot be started:
> Assembler failed to build the container system.
> org.apache.openejb.OpenEJBException: java.lang.NullPointerException: null
>         at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:357)
>         at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:144)
>         at org.apache.openejb.OpenEJB.init(OpenEJB.java:290)
>         at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:233)
>         at org.apache.tomee.catalina.TomcatLoader.init(TomcatLoader.java:130)
>         at
> org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:121)
>         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.init(LifecycleBase.java:110)
>         at org.apache.catalina.startup.Catalina.load(Catalina.java:633)
>         at org.apache.catalina.startup.Catalina.load(Catalina.java:658)
>         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.catalina.startup.Bootstrap.load(Bootstrap.java:281)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
> Caused by: java.lang.NullPointerException
>         at
> org.apache.openejb.config.DeploymentModule$ID.<init>(DeploymentModule.java:73)
>         at org.apache.openejb.config.EjbModule.<init>(EjbModule.java:73)
>         at org.apache.openejb.config.EjbModule.<init>(EjbModule.java:81)
>         at org.apache.openejb.config.EjbModule.<init>(EjbModule.java:58)
>         at org.apache.openejb.config.SystemApps.getSystemModule(SystemApps.java:41)
>         at
> org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:487)
>         at
> org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:364)
>         at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:343)
>         ... 17 more
>
> Dec 04, 2012 6:32:02 PM org.apache.tomee.catalina.ServerListener
> lifecycleEvent
> SEVERE: TomEE Listener can't start OpenEJB
> org.apache.openejb.OpenEJBException: java.lang.NullPointerException: null
>         at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:357)
>         at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:144)
>         at org.apache.openejb.OpenEJB.init(OpenEJB.java:290)
>         at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:233)
>         at org.apache.tomee.catalina.TomcatLoader.init(TomcatLoader.java:130)
>         at
> org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:121)
>         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.init(LifecycleBase.java:110)
>         at org.apache.catalina.startup.Catalina.load(Catalina.java:633)
>         at org.apache.catalina.startup.Catalina.load(Catalina.java:658)
>         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.catalina.startup.Bootstrap.load(Bootstrap.java:281)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
> Caused by: java.lang.NullPointerException
>         at
> org.apache.openejb.config.DeploymentModule$ID.<init>(DeploymentModule.java:73)
>         at org.apache.openejb.config.EjbModule.<init>(EjbModule.java:73)
>         at org.apache.openejb.config.EjbModule.<init>(EjbModule.java:81)
>         at org.apache.openejb.config.EjbModule.<init>(EjbModule.java:58)
>         at org.apache.openejb.config.SystemApps.getSystemModule(SystemApps.java:41)
>         at
> org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:487)
>         at
> org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:364)
>         at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:343)
>         ... 17 more
>
> Dec 04, 2012 6:32:02 PM org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 3452 ms
> Dec 04, 2012 6:32:02 PM org.apache.catalina.core.StandardService
> startInternal
> INFO: Starting service Catalina
> Dec 04, 2012 6:32:02 PM org.apache.catalina.core.StandardEngine
> startInternal
> INFO: Starting Servlet Engine: Apache Tomcat (TomEE)/7.0.33
> Dec 04, 2012 6:32:02 PM org.apache.catalina.startup.HostConfig deployWAR
> INFO: Deploying web application archive
> /home/user/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/ROOT.war
> Dec 04, 2012 6:32:02 PM org.apache.tomee.catalina.TomcatWebAppBuilder init
> INFO: -------------------------
> TomcatWebAppBuilder.init
> Dec 04, 2012 6:32:02 PM org.apache.openejb.util.JarExtractor extract
> INFO: Extracting jar:
> /home/user/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/ROOT.war
> Dec 04, 2012 6:32:02 PM org.apache.openejb.util.JarExtractor extract
> INFO: Extracted path:
> /home/user/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/ROOT
> Dec 04, 2012 6:32:02 PM org.apache.openejb.config.ConfigurationFactory
> configureApplication
> INFO: Configuring enterprise application:
> /home/user/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/ROOT
> Dec 04, 2012 6:32:02 PM org.apache.openejb.config.InitEjbDeployments deploy
> INFO: Auto-deploying ejb WebService: EjbDeployment(deployment-id=WebService)
> Dec 04, 2012 6:32:02 PM org.apache.openejb.config.ConfigurationFactory
> configureService
> INFO: Configuring Service(id=Default Stateless Container, type=Container,
> provider-id=Default Stateless Container)
> Dec 04, 2012 6:32:02 PM org.apache.openejb.config.AutoConfig createContainer
> INFO: Auto-creating a container for bean WebService:
> Container(type=STATELESS, id=Default Stateless Container)
> Dec 04, 2012 6:32:02 PM org.apache.openejb.assembler.classic.Assembler
> createRecipe
> INFO: Creating Container(id=Default Stateless Container)
> Dec 04, 2012 6:32:03 PM org.apache.openejb.config.AppInfoBuilder build
> INFO: Enterprise application
> "/home/user/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/ROOT" loaded.
> Dec 04, 2012 6:32:03 PM org.apache.openejb.assembler.classic.Assembler
> createApplication
> INFO: Assembling app:
> /home/user/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/ROOT
> Dec 04, 2012 6:32:03 PM org.apache.openejb.assembler.classic.Assembler
> destroyApplication
> INFO: Undeploying app:
> /home/user/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/ROOT
> Dec 04, 2012 6:32:03 PM org.apache.catalina.core.ContainerBase removeChild
> SEVERE: ContainerBase.removeChild: destroy:
> org.apache.catalina.LifecycleException: An invalid Lifecycle transition was
> attempted ([before_destroy]) for component
> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]] in
> state [STARTING_PREP]
>         at
> org.apache.catalina.util.LifecycleBase.invalidTransition(LifecycleBase.java:409)
>         at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:299)
>         at
> org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1041)
>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1159)
>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1140)
>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.undeployWebApps(TomcatWebAppBuilder.java:627)
>         at
> org.apache.openejb.assembler.classic.Assembler.destroyApplication(Assembler.java:1275)
>         at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:955)
>         at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:537)
>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:974)
>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:893)
>         at
> org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:118)
>         at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>         at
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>         at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
>         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.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)
>
> Dec 04, 2012 6:32:03 PM org.apache.tomee.catalina.TomcatWebAppBuilder
> startInternal
> SEVERE: Unable to deploy collapsed ear in war
> StandardEngine[Catalina].StandardHost[localhost].StandardContext[]
> org.apache.openejb.OpenEJBException: Creating application failed:
> /home/user/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/ROOT:
> PolicyConfigurationFactory class not found: Property
> javax.security.jacc.PolicyConfigurationFactory.provider not set
>         at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:959)
>         at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:537)
>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:974)
>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:893)
>         at
> org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:118)
>         at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>         at
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>         at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
>         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.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: org.apache.openejb.OpenEJBException: PolicyConfigurationFactory
> class not found: Property
> javax.security.jacc.PolicyConfigurationFactory.provider not set
>         at
> org.apache.openejb.assembler.classic.JaccPermissionsBuilder.install(JaccPermissionsBuilder.java:69)
>         at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:717)
>         ... 19 more
> Caused by: java.lang.ClassNotFoundException: Property
> javax.security.jacc.PolicyConfigurationFactory.provider not set
>         at
> javax.security.jacc.PolicyConfigurationFactory$1.run(PolicyConfigurationFactory.java:86)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at
> javax.security.jacc.PolicyConfigurationFactory.getPolicyConfigurationFactory(PolicyConfigurationFactory.java:80)
>         at
> org.apache.openejb.assembler.classic.JaccPermissionsBuilder.install(JaccPermissionsBuilder.java:55)
>         ... 20 more
>
> Dec 04, 2012 6:32:03 PM org.apache.catalina.core.ContainerBase
> addChildInternal
> SEVERE: ContainerBase.addChild: start:
> org.apache.catalina.LifecycleException: Failed to start component
> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
>         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
>         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: org.apache.tomee.catalina.TomEERuntimeException:
> org.apache.openejb.OpenEJBException: Creating application failed:
> /home/user/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/ROOT:
> PolicyConfigurationFactory class not found: Property
> javax.security.jacc.PolicyConfigurationFactory.provider not set
>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:981)
>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:893)
>         at
> org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:118)
>         at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>         at
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>         at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
>         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         ... 11 more
> Caused by: org.apache.openejb.OpenEJBException: Creating application failed:
> /home/user/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/ROOT:
> PolicyConfigurationFactory class not found: Property
> javax.security.jacc.PolicyConfigurationFactory.provider not set
>         at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:959)
>         at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:537)
>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:974)
>         ... 17 more
> Caused by: org.apache.openejb.OpenEJBException: PolicyConfigurationFactory
> class not found: Property
> javax.security.jacc.PolicyConfigurationFactory.provider not set
>         at
> org.apache.openejb.assembler.classic.JaccPermissionsBuilder.install(JaccPermissionsBuilder.java:69)
>         at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:717)
>         ... 19 more
> Caused by: java.lang.ClassNotFoundException: Property
> javax.security.jacc.PolicyConfigurationFactory.provider not set
>         at
> javax.security.jacc.PolicyConfigurationFactory$1.run(PolicyConfigurationFactory.java:86)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at
> javax.security.jacc.PolicyConfigurationFactory.getPolicyConfigurationFactory(PolicyConfigurationFactory.java:80)
>         at
> org.apache.openejb.assembler.classic.JaccPermissionsBuilder.install(JaccPermissionsBuilder.java:55)
>         ... 20 more
>
> Dec 04, 2012 6:32:03 PM org.apache.catalina.startup.HostConfig deployWAR
> SEVERE: Error deploying web application archive
> /home/user/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/ROOT.war
> java.lang.IllegalStateException: ContainerBase.addChild: start:
> org.apache.catalina.LifecycleException: Failed to start component
> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
>         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)
>
> Any leads? The other project which has entity and other stateless session
> bean using PU and EM are also running into trouble with this build ... the
> extra errors are
>
> INFO: Undeploying app:
> /home/user/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/ROOT
> Dec 04, 2012 6:40:46 PM org.apache.catalina.core.ContainerBase removeChild
> SEVERE: ContainerBase.removeChild: destroy:
> org.apache.catalina.LifecycleException: An invalid Lifecycle transition was
> attempted ([before_destroy]) for component
> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]] in
> state [STARTING_PREP]
>         at
> org.apache.catalina.util.LifecycleBase.invalidTransition(LifecycleBase.java:409)
>         at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:299)
>         at
> org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1041)
>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1159)
>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1140)
>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.undeployWebApps(TomcatWebAppBuilder.java:627)
>         at
> org.apache.openejb.assembler.classic.Assembler.destroyApplication(Assembler.java:1275)
>         at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:955)
>         at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:537)
>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:974)
>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:893)
>         at
> org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:118)
>         at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>         at
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>         at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
>         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.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)
>
> ...
>
> SEVERE: Unable to deploy collapsed ear in war
> StandardEngine[Catalina].StandardHost[localhost].StandardContext[]
> org.apache.openejb.OpenEJBException: Creating application failed:
> /home/user/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/ROOT: Error building
> bean 'SomeService'.  Exception: class java.lang.NullPointerException:
> registry is null: registry is null
>         at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:959)
>         at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:537)
>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:974)
>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:893)
>         at
> org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:118)
>         at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>         at
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>         at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
>         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.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: org.apache.openejb.OpenEJBException: Error building bean
> 'SomeService'.  Exception: class java.lang.NullPointerException: registry is
> null: registry is null
>         at
> org.apache.openejb.assembler.classic.EjbJarBuilder.build(EjbJarBuilder.java:81)
>         at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:713)
>         ... 19 more
> Caused by: java.lang.NullPointerException: registry is null
>         at
> org.apache.openejb.persistence.JtaEntityManager.<init>(JtaEntityManager.java:69)
>         at
> org.apache.openejb.assembler.classic.JndiEncBuilder.buildMap(JndiEncBuilder.java:406)
>         at
> org.apache.openejb.assembler.classic.JndiEncBuilder.buildBindings(JndiEncBuilder.java:163)
>         at
> org.apache.openejb.assembler.classic.JndiEncBuilder.build(JndiEncBuilder.java:147)
>         at
> org.apache.openejb.assembler.classic.EnterpriseBeanBuilder.build(EnterpriseBeanBuilder.java:145)
>         at
> org.apache.openejb.assembler.classic.EjbJarBuilder.build(EjbJarBuilder.java:66)
>         ... 20 more
>
> Thanks.
>
>
>
> --
> View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4659085.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by deetewari <de...@hotmail.com>.
So I downloaded the SNAPSHOT from the link you sent ... and on a clean
install and deploy of ROOT.war as attached in an earlier reply here's what
I'm getting.

WARNING: <Deployments dir="null"> - Does not exist:
/home/user/apache-tomee-plus-1.5.1-SNAPSHOT/apps
Dec 04, 2012 6:32:02 PM org.apache.openejb.util.OptionsLog info
INFO: Using 'openejb.system.apps=true'
Dec 04, 2012 6:32:02 PM org.apache.openejb.util.OpenEJBErrorHandler
handleUnknownError
SEVERE: FATAL ERROR: Unknown error in Assembler.  Please send the following
stack trace and this message to users@openejb.apache.org :
 java.lang.NullPointerException
	at
org.apache.openejb.config.DeploymentModule$ID.<init>(DeploymentModule.java:73)
	at org.apache.openejb.config.EjbModule.<init>(EjbModule.java:73)
	at org.apache.openejb.config.EjbModule.<init>(EjbModule.java:81)
	at org.apache.openejb.config.EjbModule.<init>(EjbModule.java:58)
	at org.apache.openejb.config.SystemApps.getSystemModule(SystemApps.java:41)
	at
org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:487)
	at
org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:364)
	at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:343)
	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:144)
	at org.apache.openejb.OpenEJB.init(OpenEJB.java:290)
	at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:233)
	at org.apache.tomee.catalina.TomcatLoader.init(TomcatLoader.java:130)
	at
org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:121)
	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.init(LifecycleBase.java:110)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:633)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:658)
	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.catalina.startup.Bootstrap.load(Bootstrap.java:281)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)

Dec 04, 2012 6:32:02 PM org.apache.openejb.OpenEJB$Instance <init>
SEVERE: OpenEJB has encountered a fatal error and cannot be started:
Assembler failed to build the container system.
org.apache.openejb.OpenEJBException: java.lang.NullPointerException: null
	at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:357)
	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:144)
	at org.apache.openejb.OpenEJB.init(OpenEJB.java:290)
	at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:233)
	at org.apache.tomee.catalina.TomcatLoader.init(TomcatLoader.java:130)
	at
org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:121)
	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.init(LifecycleBase.java:110)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:633)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:658)
	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.catalina.startup.Bootstrap.load(Bootstrap.java:281)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
Caused by: java.lang.NullPointerException
	at
org.apache.openejb.config.DeploymentModule$ID.<init>(DeploymentModule.java:73)
	at org.apache.openejb.config.EjbModule.<init>(EjbModule.java:73)
	at org.apache.openejb.config.EjbModule.<init>(EjbModule.java:81)
	at org.apache.openejb.config.EjbModule.<init>(EjbModule.java:58)
	at org.apache.openejb.config.SystemApps.getSystemModule(SystemApps.java:41)
	at
org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:487)
	at
org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:364)
	at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:343)
	... 17 more

Dec 04, 2012 6:32:02 PM org.apache.tomee.catalina.ServerListener
lifecycleEvent
SEVERE: TomEE Listener can't start OpenEJB
org.apache.openejb.OpenEJBException: java.lang.NullPointerException: null
	at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:357)
	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:144)
	at org.apache.openejb.OpenEJB.init(OpenEJB.java:290)
	at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:233)
	at org.apache.tomee.catalina.TomcatLoader.init(TomcatLoader.java:130)
	at
org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:121)
	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.init(LifecycleBase.java:110)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:633)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:658)
	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.catalina.startup.Bootstrap.load(Bootstrap.java:281)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
Caused by: java.lang.NullPointerException
	at
org.apache.openejb.config.DeploymentModule$ID.<init>(DeploymentModule.java:73)
	at org.apache.openejb.config.EjbModule.<init>(EjbModule.java:73)
	at org.apache.openejb.config.EjbModule.<init>(EjbModule.java:81)
	at org.apache.openejb.config.EjbModule.<init>(EjbModule.java:58)
	at org.apache.openejb.config.SystemApps.getSystemModule(SystemApps.java:41)
	at
org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:487)
	at
org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:364)
	at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:343)
	... 17 more

Dec 04, 2012 6:32:02 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 3452 ms
Dec 04, 2012 6:32:02 PM org.apache.catalina.core.StandardService
startInternal
INFO: Starting service Catalina
Dec 04, 2012 6:32:02 PM org.apache.catalina.core.StandardEngine
startInternal
INFO: Starting Servlet Engine: Apache Tomcat (TomEE)/7.0.33
Dec 04, 2012 6:32:02 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive
/home/user/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/ROOT.war
Dec 04, 2012 6:32:02 PM org.apache.tomee.catalina.TomcatWebAppBuilder init
INFO: -------------------------
TomcatWebAppBuilder.init 
Dec 04, 2012 6:32:02 PM org.apache.openejb.util.JarExtractor extract
INFO: Extracting jar:
/home/user/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/ROOT.war
Dec 04, 2012 6:32:02 PM org.apache.openejb.util.JarExtractor extract
INFO: Extracted path:
/home/user/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/ROOT
Dec 04, 2012 6:32:02 PM org.apache.openejb.config.ConfigurationFactory
configureApplication
INFO: Configuring enterprise application:
/home/user/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/ROOT
Dec 04, 2012 6:32:02 PM org.apache.openejb.config.InitEjbDeployments deploy
INFO: Auto-deploying ejb WebService: EjbDeployment(deployment-id=WebService)
Dec 04, 2012 6:32:02 PM org.apache.openejb.config.ConfigurationFactory
configureService
INFO: Configuring Service(id=Default Stateless Container, type=Container,
provider-id=Default Stateless Container)
Dec 04, 2012 6:32:02 PM org.apache.openejb.config.AutoConfig createContainer
INFO: Auto-creating a container for bean WebService:
Container(type=STATELESS, id=Default Stateless Container)
Dec 04, 2012 6:32:02 PM org.apache.openejb.assembler.classic.Assembler
createRecipe
INFO: Creating Container(id=Default Stateless Container)
Dec 04, 2012 6:32:03 PM org.apache.openejb.config.AppInfoBuilder build
INFO: Enterprise application
"/home/user/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/ROOT" loaded.
Dec 04, 2012 6:32:03 PM org.apache.openejb.assembler.classic.Assembler
createApplication
INFO: Assembling app:
/home/user/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/ROOT
Dec 04, 2012 6:32:03 PM org.apache.openejb.assembler.classic.Assembler
destroyApplication
INFO: Undeploying app:
/home/user/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/ROOT
Dec 04, 2012 6:32:03 PM org.apache.catalina.core.ContainerBase removeChild
SEVERE: ContainerBase.removeChild: destroy: 
org.apache.catalina.LifecycleException: An invalid Lifecycle transition was
attempted ([before_destroy]) for component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[]] in
state [STARTING_PREP]
	at
org.apache.catalina.util.LifecycleBase.invalidTransition(LifecycleBase.java:409)
	at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:299)
	at
org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1041)
	at
org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1159)
	at
org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1140)
	at
org.apache.tomee.catalina.TomcatWebAppBuilder.undeployWebApps(TomcatWebAppBuilder.java:627)
	at
org.apache.openejb.assembler.classic.Assembler.destroyApplication(Assembler.java:1275)
	at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:955)
	at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:537)
	at
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:974)
	at
org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:893)
	at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:118)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
	at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
	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.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)

Dec 04, 2012 6:32:03 PM org.apache.tomee.catalina.TomcatWebAppBuilder
startInternal
SEVERE: Unable to deploy collapsed ear in war
StandardEngine[Catalina].StandardHost[localhost].StandardContext[]
org.apache.openejb.OpenEJBException: Creating application failed:
/home/user/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/ROOT:
PolicyConfigurationFactory class not found: Property
javax.security.jacc.PolicyConfigurationFactory.provider not set
	at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:959)
	at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:537)
	at
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:974)
	at
org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:893)
	at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:118)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
	at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
	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.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: org.apache.openejb.OpenEJBException: PolicyConfigurationFactory
class not found: Property
javax.security.jacc.PolicyConfigurationFactory.provider not set
	at
org.apache.openejb.assembler.classic.JaccPermissionsBuilder.install(JaccPermissionsBuilder.java:69)
	at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:717)
	... 19 more
Caused by: java.lang.ClassNotFoundException: Property
javax.security.jacc.PolicyConfigurationFactory.provider not set
	at
javax.security.jacc.PolicyConfigurationFactory$1.run(PolicyConfigurationFactory.java:86)
	at java.security.AccessController.doPrivileged(Native Method)
	at
javax.security.jacc.PolicyConfigurationFactory.getPolicyConfigurationFactory(PolicyConfigurationFactory.java:80)
	at
org.apache.openejb.assembler.classic.JaccPermissionsBuilder.install(JaccPermissionsBuilder.java:55)
	... 20 more

Dec 04, 2012 6:32:03 PM org.apache.catalina.core.ContainerBase
addChildInternal
SEVERE: ContainerBase.addChild: start: 
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	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: org.apache.tomee.catalina.TomEERuntimeException:
org.apache.openejb.OpenEJBException: Creating application failed:
/home/user/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/ROOT:
PolicyConfigurationFactory class not found: Property
javax.security.jacc.PolicyConfigurationFactory.provider not set
	at
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:981)
	at
org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:893)
	at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:118)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
	at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 11 more
Caused by: org.apache.openejb.OpenEJBException: Creating application failed:
/home/user/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/ROOT:
PolicyConfigurationFactory class not found: Property
javax.security.jacc.PolicyConfigurationFactory.provider not set
	at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:959)
	at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:537)
	at
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:974)
	... 17 more
Caused by: org.apache.openejb.OpenEJBException: PolicyConfigurationFactory
class not found: Property
javax.security.jacc.PolicyConfigurationFactory.provider not set
	at
org.apache.openejb.assembler.classic.JaccPermissionsBuilder.install(JaccPermissionsBuilder.java:69)
	at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:717)
	... 19 more
Caused by: java.lang.ClassNotFoundException: Property
javax.security.jacc.PolicyConfigurationFactory.provider not set
	at
javax.security.jacc.PolicyConfigurationFactory$1.run(PolicyConfigurationFactory.java:86)
	at java.security.AccessController.doPrivileged(Native Method)
	at
javax.security.jacc.PolicyConfigurationFactory.getPolicyConfigurationFactory(PolicyConfigurationFactory.java:80)
	at
org.apache.openejb.assembler.classic.JaccPermissionsBuilder.install(JaccPermissionsBuilder.java:55)
	... 20 more

Dec 04, 2012 6:32:03 PM org.apache.catalina.startup.HostConfig deployWAR
SEVERE: Error deploying web application archive
/home/user/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/ROOT.war
java.lang.IllegalStateException: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
	at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
	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)

Any leads? The other project which has entity and other stateless session
bean using PU and EM are also running into trouble with this build ... the
extra errors are 

INFO: Undeploying app:
/home/user/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/ROOT
Dec 04, 2012 6:40:46 PM org.apache.catalina.core.ContainerBase removeChild
SEVERE: ContainerBase.removeChild: destroy: 
org.apache.catalina.LifecycleException: An invalid Lifecycle transition was
attempted ([before_destroy]) for component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[]] in
state [STARTING_PREP]
	at
org.apache.catalina.util.LifecycleBase.invalidTransition(LifecycleBase.java:409)
	at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:299)
	at
org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1041)
	at
org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1159)
	at
org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1140)
	at
org.apache.tomee.catalina.TomcatWebAppBuilder.undeployWebApps(TomcatWebAppBuilder.java:627)
	at
org.apache.openejb.assembler.classic.Assembler.destroyApplication(Assembler.java:1275)
	at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:955)
	at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:537)
	at
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:974)
	at
org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:893)
	at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:118)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
	at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
	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.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)

...

SEVERE: Unable to deploy collapsed ear in war
StandardEngine[Catalina].StandardHost[localhost].StandardContext[]
org.apache.openejb.OpenEJBException: Creating application failed:
/home/user/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/ROOT: Error building
bean 'SomeService'.  Exception: class java.lang.NullPointerException:
registry is null: registry is null
	at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:959)
	at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:537)
	at
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:974)
	at
org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:893)
	at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:118)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
	at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
	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.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: org.apache.openejb.OpenEJBException: Error building bean
'SomeService'.  Exception: class java.lang.NullPointerException: registry is
null: registry is null
	at
org.apache.openejb.assembler.classic.EjbJarBuilder.build(EjbJarBuilder.java:81)
	at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:713)
	... 19 more
Caused by: java.lang.NullPointerException: registry is null
	at
org.apache.openejb.persistence.JtaEntityManager.<init>(JtaEntityManager.java:69)
	at
org.apache.openejb.assembler.classic.JndiEncBuilder.buildMap(JndiEncBuilder.java:406)
	at
org.apache.openejb.assembler.classic.JndiEncBuilder.buildBindings(JndiEncBuilder.java:163)
	at
org.apache.openejb.assembler.classic.JndiEncBuilder.build(JndiEncBuilder.java:147)
	at
org.apache.openejb.assembler.classic.EnterpriseBeanBuilder.build(EnterpriseBeanBuilder.java:145)
	at
org.apache.openejb.assembler.classic.EjbJarBuilder.build(EjbJarBuilder.java:66)
	... 20 more

Thanks.



--
View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4659085.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by Romain Manni-Bucau <rm...@gmail.com>.
hmm your last digit is 95 the snapshot of yestetrday (without the fix)
was 97 so i guess you dont have the right one

maybe try https://repository.apache.org/content/groups/snapshots/org/apache/openejb/apache-tomee/1.5.1-SNAPSHOT/apache-tomee-1.5.1-20121204.064119-98-plus.zip

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



2012/12/4 deetewari <de...@hotmail.com>:
> Hi Romain,
>
> I downloaded the latest SNAPSHOT
> apache-tomee-1.5.1-20121202.194050-95-plus.tar.gz and I still seem to be
> having the same issue. Should I assume that this snapshot that I downloaded
> (the latest at this time) doesn't yet have your changeset included?
> Otherwise I can see that your changeset is in the trunk so should I clone
> and compile a fresh build locally?
>
> Thanks
>
>
>
> --
> View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4659081.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by deetewari <de...@hotmail.com>.
Hi Romain,

I downloaded the latest SNAPSHOT
apache-tomee-1.5.1-20121202.194050-95-plus.tar.gz and I still seem to be
having the same issue. Should I assume that this snapshot that I downloaded
(the latest at this time) doesn't yet have your changeset included?
Otherwise I can see that your changeset is in the trunk so should I clone
and compile a fresh build locally?

Thanks



--
View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4659081.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by Romain Manni-Bucau <rm...@gmail.com>.
opened an issue about it: https://issues.apache.org/jira/browse/TOMEE-624

thks for the project

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



2012/12/3 deetewari <de...@hotmail.com>:
> JAXRS-Eclipse-Project.tar.gz
> <http://openejb.979440.n4.nabble.com/file/n4659066/JAXRS-Eclipse-Project.tar.gz>
> ROOT.war <http://openejb.979440.n4.nabble.com/file/n4659066/ROOT.war>
>
> I have uploaded a similar project as the other one I cannot share due to an
> NDA. However, the structure is exactly same and I'm getting the same error
> on deploying this as well!
>
> Cheers.
>
>
>
> --
> View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4659066.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by deetewari <de...@hotmail.com>.
JAXRS-Eclipse-Project.tar.gz
<http://openejb.979440.n4.nabble.com/file/n4659066/JAXRS-Eclipse-Project.tar.gz>  
ROOT.war <http://openejb.979440.n4.nabble.com/file/n4659066/ROOT.war>  

I have uploaded a similar project as the other one I cannot share due to an
NDA. However, the structure is exactly same and I'm getting the same error
on deploying this as well!

Cheers.



--
View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4659066.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Can you share your project?
Le 3 déc. 2012 18:51, "deetewari" <de...@hotmail.com> a écrit :

> 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.
>

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by deetewari <de...@hotmail.com>.
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.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by Romain Manni-Bucau <rm...@gmail.com>.
how did you configure it?

i tried naming my webapp ROOT and it works,

i tried adding the context in server.xml and it works

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



2012/12/3 deetewari <de...@hotmail.com>:
> Forgot to add in the previous post that context.xml reads as follows:
>
> <Context path="/">
> </Context>
>
>
>
> --
> View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4659052.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by deetewari <de...@hotmail.com>.
Forgot to add in the previous post that context.xml reads as follows:

<Context path="/">
</Context>



--
View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4659052.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by deetewari <de...@hotmail.com>.
Hi Romain,
I tried with this snapshot ...
apache-tomee-1.5.1-20121202.041456-94-plus.tar.gz and here's what I'm
getting.

SEVERE: A child container failed during start
java.util.concurrent.ExecutionException:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
	at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
	at java.util.concurrent.FutureTask.get(FutureTask.java:111)
	at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
	at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)
	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: org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	... 7 more
Caused by: java.lang.IllegalArgumentException: can't find path under current
webapp deployment []
	at
org.apache.tomee.catalina.OpenEJBContextConfig.processAnnotationsUrl(OpenEJBContextConfig.java:297)
	at
org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1306)
	at
org.apache.tomee.catalina.OpenEJBContextConfig.webConfig(OpenEJBContextConfig.java:188)
	at
org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
	at
org.apache.tomee.catalina.OpenEJBContextConfig.configureStart(OpenEJBContextConfig.java:76)
	at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
	at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 7 more

Dec 03, 2012 7:16:45 PM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost]]
	at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
	at java.util.concurrent.FutureTask.get(FutureTask.java:111)
	at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
	at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:684)
	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.catalina.startup.Bootstrap.start(Bootstrap.java:322)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:451)
Caused by: org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	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: org.apache.catalina.LifecycleException: A child container failed
during start
	at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
	at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 7 more

Dec 03, 2012 7:16:45 PM org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start: 
org.apache.catalina.LifecycleException: Failed to start component
[StandardServer[8005]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:684)
	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.catalina.startup.Bootstrap.start(Bootstrap.java:322)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:451)
Caused by: org.apache.catalina.LifecycleException: Failed to start component
[StandardService[Catalina]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed
during start
	at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
	at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 11 more

Dec 03, 2012 7:16:45 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3031 ms



--
View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4659051.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

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

yes please give it a try on the snapshot (no need to dig into a bug if
it is no more here ;))

we are trying to release (hope a vote will be up this week) so it is
pretty stable

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



2012/12/3 deetewari <de...@hotmail.com>:
> I am using the stable tomee-plus-1.5.0. Should I try on the latest SNAPSHOT?
> Will it be stable for production use even if only for sometime?
>
> Thanks
>
>
>
> --
> View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4659049.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

Posted by deetewari <de...@hotmail.com>.
I am using the stable tomee-plus-1.5.0. Should I try on the latest SNAPSHOT?
Will it be stable for production use even if only for sometime?

Thanks



--
View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047p4659049.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: JAX-RS webservices do not work on TomEE if webapp context is "/"

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

did you try the snapshot?
https://repository.apache.org/content/groups/snapshots/org/apache/openejb/apache-tomee/1.5.1-SNAPSHOT/


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



2012/12/3 deetewari <de...@hotmail.com>:
> Hi,I'm using Tomee 1.5 Plus. I do the development in Eclipse based
> SpringSource Tools Suite (STS). Currently I'm using only Eclipse to generate
> the WAR file and hence most settings are done from within Eclipse. So here's
> the issue I'm facing...I have a Java web application using JPA for
> persistence, EJB (mostly stateless session beans). Some of the EJBs also
> serve as JAX-RS services generating JSON. All this works perfectly if I
> deploy my web application with the context path set to any string like
> "/app" ... so the web application can then be reached at
> http://localhost/app/.However, when I deploy my app as ROOT.war with the
> context path set as "/" then everything else works fine except JAX-RS
> services don't start and I get this message on the console:INFO: REST
> application deployed: com.foo.app.helpers.RestUrlInitializerDec 03, 2012
> 6:42:04 PM org.apache.openejb.observer.ObserverManager fireEventSEVERE:
> error invoking
> org.apache.openejb.observer.ObserverManager$Observer@3e4282f4java.lang.reflect.InvocationTargetException...Caused
> by: java.lang.IllegalStateException: Invalid context '/rest'.  Cannot find
> context in host localhost"/rest" is the path I want the JAX-RS services to
> be available under. This is set by a Simple class like:
> @ApplicationPath("/rest")public class RestUrlInitializer extends Application
> {}So what am I missing? How can I start the JAX-RS webservice without any
> context path like http://localhost/app/rest.Thanks
>
>
>
> --
> View this message in context: http://openejb.979440.n4.nabble.com/JAX-RS-webservices-do-not-work-on-TomEE-if-webapp-context-is-tp4659047.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.