You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by jieryn <ji...@gmail.com> on 2013/10/10 21:06:11 UTC

Manager Context in server.xml, Broken

If I use a recent Apache TomEE Plus 1.6.0-SNAPSHOT, and put the
standard Apache Tomcat manager application context in conf/server.xml,
as is done by normal Apache Tomcat, then Apache TomEE will break in
the following way:

conf/server.xml:

        <Context path="/manager" privileged="true"/>

logs/catalina.out:

INFO [main] org.apache.catalina.core.StandardEngine.startInternal
Starting Servlet Engine: Apache Tomcat (TomEE)/7.0.42 (1.6.0-SNAPSHOT)
INFO [localhost-startStop-1]
org.apache.tomee.catalina.TomcatWebAppBuilder.init
------------------------- localhost -> /manager
SEVERE [Catalina-startStop-1]
org.apache.catalina.core.ContainerBase.startInternal A child container
failed during start
 java.util.concurrent.ExecutionException: java.lang.NullPointerException
        at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:263)
        at java.util.concurrent.FutureTask.get(FutureTask.java:122)
        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:345)
        at java.util.concurrent.FutureTask.run(FutureTask.java:177)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1121)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
        at java.lang.Thread.run(Thread.java:779)
Caused by: java.lang.NullPointerException
        at java.io.File.<init>(File.java:262)
        at org.apache.tomee.catalina.Contexts.realWarPath(Contexts.java:72)
        at org.apache.tomee.catalina.Contexts.warPath(Contexts.java:43)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.init(TomcatWebAppBuilder.java:739)
        at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:103)
        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:99)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
        ... 7 more

I think this may happen for any Context defined where the WAR exists
only as an unpacked directory tree. Apache Tomcat does not fail in
this way, so I think it is Apache TomEE. If I remove the
conf/server.xml Context for /manager, and let the
manager/META-INF/context.xml be utilized, the manager application
works fine.

Any hints?

Re: Manager Context in server.xml, Broken

Posted by jieryn <ji...@gmail.com>.
I went back to my javaee-example to try and reproduce it there, it
seems to be working with 20131012.

Looking at the changesets, I don't see where it would have been broken/fixed.

So I think I have to conclude that I built my -SNAPSHOT improperly..

On Tue, Oct 15, 2013 at 11:51 AM, Romain Manni-Bucau
<rm...@gmail.com> wrote:
> you have a sample showing it?
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
>
>
>
> 2013/10/15 jieryn <ji...@gmail.com>
>
>> It is deployed, but @EJBs are not injected. If I just revert back to
>> 20131003 it works.
>>
>> On Tue, Oct 15, 2013 at 11:37 AM, Romain Manni-Bucau
>> <rm...@gmail.com> wrote:
>> > you mean ROOT.war doesn't work? I use it ATM
>> >
>> > *Romain Manni-Bucau*
>> > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
>> > *Blog: **http://rmannibucau.wordpress.com/*<
>> http://rmannibucau.wordpress.com/>
>> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
>> > *Github: https://github.com/rmannibucau*
>> >
>> >
>> >
>> > 2013/10/15 jieryn <ji...@gmail.com>
>> >
>> >> I tested out a locally built version for 20131012, and that indeed
>> >> fixes the /manager context docBase issue to be more in line with
>> >> Apache Tomcat. However, it seems to have clobbered normal
>> >> webapps/ROOT.war launching. By this I mean, the exact same web
>> >> application works pre 20131012 but fails after - @EJBs are not
>> >> injected and this triggers javax.naming.NameNotFoundException.
>> >>
>> >> Any ideas?
>> >>
>> >> On Fri, Oct 11, 2013 at 1:26 AM, Romain Manni-Bucau
>> >> <rm...@gmail.com> wrote:
>> >> > https://issues.apache.org/jira/browse/TOMEE-1055
>> >> >
>> >> > *Romain Manni-Bucau*
>> >> > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
>> >> > *Blog: **http://rmannibucau.wordpress.com/*<
>> >> http://rmannibucau.wordpress.com/>
>> >> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
>> >> > *Github: https://github.com/rmannibucau*
>> >> >
>> >> >
>> >> >
>> >> > 2013/10/10 Romain Manni-Bucau <rm...@gmail.com>
>> >> >
>> >> >> Yep, never said we cant handle it but you asked a hint ;)
>> >> >> Le 10 oct. 2013 22:19, "jieryn" <ji...@gmail.com> a écrit :
>> >> >>
>> >> >> I'll add it, but this is a difference with Apache Tomcat. Tomcat
>> >> >>> happily handles this case.. I'd expect Apache TomEE to handle it the
>> >> >>> same way.
>> >> >>>
>> >> >>> On Thu, Oct 10, 2013 at 4:14 PM, Romain Manni-Bucau
>> >> >>> <rm...@gmail.com> wrote:
>> >> >>> > Docbase is missing i think
>> >> >>>
>> >> >>
>> >>
>>

Re: Manager Context in server.xml, Broken

Posted by Romain Manni-Bucau <rm...@gmail.com>.
you have a sample showing it?

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



2013/10/15 jieryn <ji...@gmail.com>

> It is deployed, but @EJBs are not injected. If I just revert back to
> 20131003 it works.
>
> On Tue, Oct 15, 2013 at 11:37 AM, Romain Manni-Bucau
> <rm...@gmail.com> wrote:
> > you mean ROOT.war doesn't work? I use it ATM
> >
> > *Romain Manni-Bucau*
> > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > *Blog: **http://rmannibucau.wordpress.com/*<
> http://rmannibucau.wordpress.com/>
> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > *Github: https://github.com/rmannibucau*
> >
> >
> >
> > 2013/10/15 jieryn <ji...@gmail.com>
> >
> >> I tested out a locally built version for 20131012, and that indeed
> >> fixes the /manager context docBase issue to be more in line with
> >> Apache Tomcat. However, it seems to have clobbered normal
> >> webapps/ROOT.war launching. By this I mean, the exact same web
> >> application works pre 20131012 but fails after - @EJBs are not
> >> injected and this triggers javax.naming.NameNotFoundException.
> >>
> >> Any ideas?
> >>
> >> On Fri, Oct 11, 2013 at 1:26 AM, Romain Manni-Bucau
> >> <rm...@gmail.com> wrote:
> >> > https://issues.apache.org/jira/browse/TOMEE-1055
> >> >
> >> > *Romain Manni-Bucau*
> >> > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> >> > *Blog: **http://rmannibucau.wordpress.com/*<
> >> http://rmannibucau.wordpress.com/>
> >> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> >> > *Github: https://github.com/rmannibucau*
> >> >
> >> >
> >> >
> >> > 2013/10/10 Romain Manni-Bucau <rm...@gmail.com>
> >> >
> >> >> Yep, never said we cant handle it but you asked a hint ;)
> >> >> Le 10 oct. 2013 22:19, "jieryn" <ji...@gmail.com> a écrit :
> >> >>
> >> >> I'll add it, but this is a difference with Apache Tomcat. Tomcat
> >> >>> happily handles this case.. I'd expect Apache TomEE to handle it the
> >> >>> same way.
> >> >>>
> >> >>> On Thu, Oct 10, 2013 at 4:14 PM, Romain Manni-Bucau
> >> >>> <rm...@gmail.com> wrote:
> >> >>> > Docbase is missing i think
> >> >>>
> >> >>
> >>
>

Re: Manager Context in server.xml, Broken

Posted by jieryn <ji...@gmail.com>.
It is deployed, but @EJBs are not injected. If I just revert back to
20131003 it works.

On Tue, Oct 15, 2013 at 11:37 AM, Romain Manni-Bucau
<rm...@gmail.com> wrote:
> you mean ROOT.war doesn't work? I use it ATM
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
>
>
>
> 2013/10/15 jieryn <ji...@gmail.com>
>
>> I tested out a locally built version for 20131012, and that indeed
>> fixes the /manager context docBase issue to be more in line with
>> Apache Tomcat. However, it seems to have clobbered normal
>> webapps/ROOT.war launching. By this I mean, the exact same web
>> application works pre 20131012 but fails after - @EJBs are not
>> injected and this triggers javax.naming.NameNotFoundException.
>>
>> Any ideas?
>>
>> On Fri, Oct 11, 2013 at 1:26 AM, Romain Manni-Bucau
>> <rm...@gmail.com> wrote:
>> > https://issues.apache.org/jira/browse/TOMEE-1055
>> >
>> > *Romain Manni-Bucau*
>> > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
>> > *Blog: **http://rmannibucau.wordpress.com/*<
>> http://rmannibucau.wordpress.com/>
>> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
>> > *Github: https://github.com/rmannibucau*
>> >
>> >
>> >
>> > 2013/10/10 Romain Manni-Bucau <rm...@gmail.com>
>> >
>> >> Yep, never said we cant handle it but you asked a hint ;)
>> >> Le 10 oct. 2013 22:19, "jieryn" <ji...@gmail.com> a écrit :
>> >>
>> >> I'll add it, but this is a difference with Apache Tomcat. Tomcat
>> >>> happily handles this case.. I'd expect Apache TomEE to handle it the
>> >>> same way.
>> >>>
>> >>> On Thu, Oct 10, 2013 at 4:14 PM, Romain Manni-Bucau
>> >>> <rm...@gmail.com> wrote:
>> >>> > Docbase is missing i think
>> >>>
>> >>
>>

Re: Manager Context in server.xml, Broken

Posted by Romain Manni-Bucau <rm...@gmail.com>.
you mean ROOT.war doesn't work? I use it ATM

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



2013/10/15 jieryn <ji...@gmail.com>

> I tested out a locally built version for 20131012, and that indeed
> fixes the /manager context docBase issue to be more in line with
> Apache Tomcat. However, it seems to have clobbered normal
> webapps/ROOT.war launching. By this I mean, the exact same web
> application works pre 20131012 but fails after - @EJBs are not
> injected and this triggers javax.naming.NameNotFoundException.
>
> Any ideas?
>
> On Fri, Oct 11, 2013 at 1:26 AM, Romain Manni-Bucau
> <rm...@gmail.com> wrote:
> > https://issues.apache.org/jira/browse/TOMEE-1055
> >
> > *Romain Manni-Bucau*
> > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > *Blog: **http://rmannibucau.wordpress.com/*<
> http://rmannibucau.wordpress.com/>
> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > *Github: https://github.com/rmannibucau*
> >
> >
> >
> > 2013/10/10 Romain Manni-Bucau <rm...@gmail.com>
> >
> >> Yep, never said we cant handle it but you asked a hint ;)
> >> Le 10 oct. 2013 22:19, "jieryn" <ji...@gmail.com> a écrit :
> >>
> >> I'll add it, but this is a difference with Apache Tomcat. Tomcat
> >>> happily handles this case.. I'd expect Apache TomEE to handle it the
> >>> same way.
> >>>
> >>> On Thu, Oct 10, 2013 at 4:14 PM, Romain Manni-Bucau
> >>> <rm...@gmail.com> wrote:
> >>> > Docbase is missing i think
> >>>
> >>
>

Re: Manager Context in server.xml, Broken

Posted by jieryn <ji...@gmail.com>.
I tested out a locally built version for 20131012, and that indeed
fixes the /manager context docBase issue to be more in line with
Apache Tomcat. However, it seems to have clobbered normal
webapps/ROOT.war launching. By this I mean, the exact same web
application works pre 20131012 but fails after - @EJBs are not
injected and this triggers javax.naming.NameNotFoundException.

Any ideas?

On Fri, Oct 11, 2013 at 1:26 AM, Romain Manni-Bucau
<rm...@gmail.com> wrote:
> https://issues.apache.org/jira/browse/TOMEE-1055
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
>
>
>
> 2013/10/10 Romain Manni-Bucau <rm...@gmail.com>
>
>> Yep, never said we cant handle it but you asked a hint ;)
>> Le 10 oct. 2013 22:19, "jieryn" <ji...@gmail.com> a écrit :
>>
>> I'll add it, but this is a difference with Apache Tomcat. Tomcat
>>> happily handles this case.. I'd expect Apache TomEE to handle it the
>>> same way.
>>>
>>> On Thu, Oct 10, 2013 at 4:14 PM, Romain Manni-Bucau
>>> <rm...@gmail.com> wrote:
>>> > Docbase is missing i think
>>>
>>

Re: Manager Context in server.xml, Broken

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

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



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

> Yep, never said we cant handle it but you asked a hint ;)
> Le 10 oct. 2013 22:19, "jieryn" <ji...@gmail.com> a écrit :
>
> I'll add it, but this is a difference with Apache Tomcat. Tomcat
>> happily handles this case.. I'd expect Apache TomEE to handle it the
>> same way.
>>
>> On Thu, Oct 10, 2013 at 4:14 PM, Romain Manni-Bucau
>> <rm...@gmail.com> wrote:
>> > Docbase is missing i think
>>
>

Re: Manager Context in server.xml, Broken

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Yep, never said we cant handle it but you asked a hint ;)
Le 10 oct. 2013 22:19, "jieryn" <ji...@gmail.com> a écrit :

> I'll add it, but this is a difference with Apache Tomcat. Tomcat
> happily handles this case.. I'd expect Apache TomEE to handle it the
> same way.
>
> On Thu, Oct 10, 2013 at 4:14 PM, Romain Manni-Bucau
> <rm...@gmail.com> wrote:
> > Docbase is missing i think
>

Re: Manager Context in server.xml, Broken

Posted by jieryn <ji...@gmail.com>.
I'll add it, but this is a difference with Apache Tomcat. Tomcat
happily handles this case.. I'd expect Apache TomEE to handle it the
same way.

On Thu, Oct 10, 2013 at 4:14 PM, Romain Manni-Bucau
<rm...@gmail.com> wrote:
> Docbase is missing i think

Re: Manager Context in server.xml, Broken

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Docbase is missing i think
Le 10 oct. 2013 21:06, "jieryn" <ji...@gmail.com> a écrit :

> If I use a recent Apache TomEE Plus 1.6.0-SNAPSHOT, and put the
> standard Apache Tomcat manager application context in conf/server.xml,
> as is done by normal Apache Tomcat, then Apache TomEE will break in
> the following way:
>
> conf/server.xml:
>
>         <Context path="/manager" privileged="true"/>
>
> logs/catalina.out:
>
> INFO [main] org.apache.catalina.core.StandardEngine.startInternal
> Starting Servlet Engine: Apache Tomcat (TomEE)/7.0.42 (1.6.0-SNAPSHOT)
> INFO [localhost-startStop-1]
> org.apache.tomee.catalina.TomcatWebAppBuilder.init
> ------------------------- localhost -> /manager
> SEVERE [Catalina-startStop-1]
> org.apache.catalina.core.ContainerBase.startInternal A child container
> failed during start
>  java.util.concurrent.ExecutionException: java.lang.NullPointerException
>         at
> java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:263)
>         at java.util.concurrent.FutureTask.get(FutureTask.java:122)
>         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:345)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:177)
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1121)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
>         at java.lang.Thread.run(Thread.java:779)
> Caused by: java.lang.NullPointerException
>         at java.io.File.<init>(File.java:262)
>         at org.apache.tomee.catalina.Contexts.realWarPath(Contexts.java:72)
>         at org.apache.tomee.catalina.Contexts.warPath(Contexts.java:43)
>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.init(TomcatWebAppBuilder.java:739)
>         at
> org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:103)
>         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:99)
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
>         ... 7 more
>
> I think this may happen for any Context defined where the WAR exists
> only as an unpacked directory tree. Apache Tomcat does not fail in
> this way, so I think it is Apache TomEE. If I remove the
> conf/server.xml Context for /manager, and let the
> manager/META-INF/context.xml be utilized, the manager application
> works fine.
>
> Any hints?
>