You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Jacek Laskowski <ja...@japila.pl> on 2011/10/07 22:32:27 UTC

TomEE doesn't accepts no web.xml web app (netbeans used)

Hi,

I'm working with TomEE and NetBeans IDE 7.1 Beta after registering
TomEE as a regular Tomcat instance (I'm not sure whether there's a
better way to have it available in NB). I developed a simple web app
with no web.xml with just a single servlet with @Servlet annotation.
Upon deployment I run into the following exception.

It looks like openejb can't figure out what module type it deals with,
and the UnknownModuleTypeException exception's thrown. I think
openejb/tomee should ask Tomcat if it can recognize the type of a
module and if it can use the information in case tomee can't. Is it
possible? When is TomcatWebAppBuilder.configureStart fired up? Isn't
it when Tomcat recognized the module and moreover accepted it for
deployment?

Is the stack trace all I need to provide a fix? I'm looking for some
guidance before delving into tomee's internals.

TomcatWebAppBuilder.start
Oct 7, 2011 10:23:08 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor TomEnvEntryWeb.xml from
/Users/jacek/apps/apache-tomee-webprofile-1.0.0-beta-1/conf/Catalina/localhost
Oct 7, 2011 10:23:09 PM org.apache.catalina.core.ContainerBase addChildInternal
SEVERE: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/TomEnvEntryWeb]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)
	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:633)
	at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:558)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:468)
	at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1370)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:294)
	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.ContainerBase.backgroundProcess(ContainerBase.java:1242)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1400)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1410)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1389)
	at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.RuntimeException:
org.apache.openejb.config.UnknownModuleTypeException: Unable to
determine module type for jar:
file:/Users/jacek/NetBeansProjects/TomEnvEntryWeb/build/web/: Unknown
module type: url=file:/Users/jacek/NetBeansProjects/TomEnvEntryWeb/build/web/
	at org.apache.openejb.tomcat.catalina.TomcatWebAppBuilder.loadApplication(TomcatWebAppBuilder.java:875)
	at org.apache.openejb.tomcat.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:416)
	at org.apache.openejb.tomcat.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:377)
	at org.apache.openejb.tomcat.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:117)
	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:5103)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
	... 15 more
Caused by: org.apache.openejb.config.UnknownModuleTypeException:
Unable to determine module type for jar:
file:/Users/jacek/NetBeansProjects/TomEnvEntryWeb/build/web/: Unknown
module type: url=file:/Users/jacek/NetBeansProjects/TomEnvEntryWeb/build/web/
	at org.apache.openejb.config.DeploymentLoader.load(DeploymentLoader.java:140)
	at org.apache.openejb.tomcat.catalina.TomcatWebAppBuilder.loadApplication(TomcatWebAppBuilder.java:873)
	... 22 more
Caused by: org.apache.openejb.config.UnknownModuleTypeException:
Unknown module type:
url=file:/Users/jacek/NetBeansProjects/TomEnvEntryWeb/build/web/
	at org.apache.openejb.config.DeploymentLoader.discoverModuleType(DeploymentLoader.java:1463)
	at org.apache.openejb.config.DeploymentLoader.discoverModuleType(DeploymentLoader.java:1401)
	at org.apache.openejb.config.DeploymentLoader.load(DeploymentLoader.java:138)
	... 23 more
Oct 7, 2011 10:23:09 PM org.apache.catalina.startup.HostConfig deployDescriptor
SEVERE: Error deploying configuration descriptor TomEnvEntryWeb.xml

Jacek

-- 
Jacek Laskowski
Java EE, functional languages and IBM WebSphere - http://blog.japila.pl
Warszawa JUG conference = Confitura (formerly Javarsovia) :: http://confitura.pl
"Hoping to save time by spending it" by David Blevins (Apache OpenEJB)

Re: TomEE doesn't accepts no web.xml web app (netbeans used)

Posted by Romain Manni-Bucau <rm...@gmail.com>.
i thought web-inf was not optionnal...
http://download.oracle.com/javaee/6/tutorial/doc/bnadx.html it seems web.xml
is optionnal (of course) but not WEB-INF/lib and WEB-INF/classes even if
they are empty...

i can't access to jcp website now (i got timeouts) :(

- Romain

2011/10/9 Karan Malhi <ka...@gmail.com>

> Oops!, I mean't $CATALINA_BASE/conf/web.xml
>
> On Sun, Oct 9, 2011 at 9:37 AM, Karan Malhi <ka...@gmail.com> wrote:
> > Aha.. I did not know that - thanks!. One of the possible checks could
> > be detection of jsp files. We could scan the CATALINA_BASE/web.xml and
> > find the suffix mapping for org.apache.jasper.servlet.JspServlet. For
> > example, if the suffix is mapped to *.jsp and if we find a foo.jsp,
> > then we know it is a web-app. Of course, there should be other checks
> > too, this could be one of them. If only jcp.org was responsive and I
> > could download the spec right now, sigh!
> >
> >
> > On Sun, Oct 9, 2011 at 9:17 AM, Jacek Laskowski <ja...@japila.pl> wrote:
> >> On Sun, Oct 9, 2011 at 6:10 PM, Karan Malhi <ka...@gmail.com>
> wrote:
> >>> As Romain mentioned earlier, we should check for WEB-INF, because
> >>> thats the directory which is guaranteed to be present in a web
> >>> application.
> >>
> >> Is it? Even though I believe WEB-INF is a better bet, it's not
> >> required as webapps with jsps/html/css or any non-Java classes are
> >> possible. I'll be working on it for the coming days and will include
> >> appropriate checks. Thanks Karan.
> >>
> >> Jacek
> >>
> >> --
> >> Jacek Laskowski
> >> Java EE, functional languages and IBM WebSphere - http://blog.japila.pl
> >> Warszawa JUG conference = Confitura (formerly Javarsovia) ::
> http://confitura.pl
> >> "Hoping to save time by spending it" by David Blevins (Apache OpenEJB)
> >>
> >
> >
> >
> > --
> >
> > Karan Singh Malhi
> > twitter.com/KaranSinghMalhi
> >
>
>
>
> --
>
> Karan Singh Malhi
> twitter.com/KaranSinghMalhi
>

Re: TomEE doesn't accepts no web.xml web app (netbeans used)

Posted by Karan Malhi <ka...@gmail.com>.
Oops!, I mean't $CATALINA_BASE/conf/web.xml

On Sun, Oct 9, 2011 at 9:37 AM, Karan Malhi <ka...@gmail.com> wrote:
> Aha.. I did not know that - thanks!. One of the possible checks could
> be detection of jsp files. We could scan the CATALINA_BASE/web.xml and
> find the suffix mapping for org.apache.jasper.servlet.JspServlet. For
> example, if the suffix is mapped to *.jsp and if we find a foo.jsp,
> then we know it is a web-app. Of course, there should be other checks
> too, this could be one of them. If only jcp.org was responsive and I
> could download the spec right now, sigh!
>
>
> On Sun, Oct 9, 2011 at 9:17 AM, Jacek Laskowski <ja...@japila.pl> wrote:
>> On Sun, Oct 9, 2011 at 6:10 PM, Karan Malhi <ka...@gmail.com> wrote:
>>> As Romain mentioned earlier, we should check for WEB-INF, because
>>> thats the directory which is guaranteed to be present in a web
>>> application.
>>
>> Is it? Even though I believe WEB-INF is a better bet, it's not
>> required as webapps with jsps/html/css or any non-Java classes are
>> possible. I'll be working on it for the coming days and will include
>> appropriate checks. Thanks Karan.
>>
>> Jacek
>>
>> --
>> Jacek Laskowski
>> Java EE, functional languages and IBM WebSphere - http://blog.japila.pl
>> Warszawa JUG conference = Confitura (formerly Javarsovia) :: http://confitura.pl
>> "Hoping to save time by spending it" by David Blevins (Apache OpenEJB)
>>
>
>
>
> --
>
> Karan Singh Malhi
> twitter.com/KaranSinghMalhi
>



-- 

Karan Singh Malhi
twitter.com/KaranSinghMalhi

Re: TomEE doesn't accepts no web.xml web app (netbeans used)

Posted by Karan Malhi <ka...@gmail.com>.
Aha.. I did not know that - thanks!. One of the possible checks could
be detection of jsp files. We could scan the CATALINA_BASE/web.xml and
find the suffix mapping for org.apache.jasper.servlet.JspServlet. For
example, if the suffix is mapped to *.jsp and if we find a foo.jsp,
then we know it is a web-app. Of course, there should be other checks
too, this could be one of them. If only jcp.org was responsive and I
could download the spec right now, sigh!


On Sun, Oct 9, 2011 at 9:17 AM, Jacek Laskowski <ja...@japila.pl> wrote:
> On Sun, Oct 9, 2011 at 6:10 PM, Karan Malhi <ka...@gmail.com> wrote:
>> As Romain mentioned earlier, we should check for WEB-INF, because
>> thats the directory which is guaranteed to be present in a web
>> application.
>
> Is it? Even though I believe WEB-INF is a better bet, it's not
> required as webapps with jsps/html/css or any non-Java classes are
> possible. I'll be working on it for the coming days and will include
> appropriate checks. Thanks Karan.
>
> Jacek
>
> --
> Jacek Laskowski
> Java EE, functional languages and IBM WebSphere - http://blog.japila.pl
> Warszawa JUG conference = Confitura (formerly Javarsovia) :: http://confitura.pl
> "Hoping to save time by spending it" by David Blevins (Apache OpenEJB)
>



-- 

Karan Singh Malhi
twitter.com/KaranSinghMalhi

Re: TomEE doesn't accepts no web.xml web app (netbeans used)

Posted by Jacek Laskowski <ja...@japila.pl>.
On Sun, Oct 9, 2011 at 6:10 PM, Karan Malhi <ka...@gmail.com> wrote:
> As Romain mentioned earlier, we should check for WEB-INF, because
> thats the directory which is guaranteed to be present in a web
> application.

Is it? Even though I believe WEB-INF is a better bet, it's not
required as webapps with jsps/html/css or any non-Java classes are
possible. I'll be working on it for the coming days and will include
appropriate checks. Thanks Karan.

Jacek

-- 
Jacek Laskowski
Java EE, functional languages and IBM WebSphere - http://blog.japila.pl
Warszawa JUG conference = Confitura (formerly Javarsovia) :: http://confitura.pl
"Hoping to save time by spending it" by David Blevins (Apache OpenEJB)

Re: TomEE doesn't accepts no web.xml web app (netbeans used)

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Done ;) and web-fragment too

- Romain

Le 9 oct. 2011 18:10, "Karan Malhi" <ka...@gmail.com> a écrit :

> As Romain mentioned earlier, we should check for WEB-INF, because
> thats the directory which is guaranteed to be present in a web
> application.
>
> On Sat, Oct 8, 2011 at 2:23 PM, Romain Manni-Bucau
> <rm...@gmail.com> wrote:
> > Yep openejb-core is not linked to tomcat but is linked to jee and
> webapps.
> > The best could be to scan webXXX annotations but i still think it is
> > useless.
> >
> > I'll have a try tmr.
> >
> > - Romain
> >
> > Le 8 oct. 2011 23:20, "Jacek Laskowski" <ja...@japila.pl> a écrit :
> >
> >> On Sat, Oct 8, 2011 at 9:26 PM, Romain Manni-Bucau
> >> <rm...@gmail.com> wrote:
> >> > Hmm your fix needs context.xml so you could have added an empty
> web.xml
> >> too.
> >> > I still think testing web-inf is more relevant no?
> >>
> >> You're right, but it wasn't me who created context.xml file - it's
> >> netbeans and I don't really know why it deploys apps this way. Not a
> >> bid deal to add other combinations which all lead to a bad taste in my
> >> mouth when I see them all in openejb-core (which has nothing to do
> >> with the tomcat or other environments).
> >>
> >> I've run into other issues with no-web.xml webapps - it's like I may
> >> have opened a can of worms :)
> >>
> >> Jacek
> >>
> >> --
> >> Jacek Laskowski
> >> Java EE, functional languages and IBM WebSphere - http://blog.japila.pl
> >> Warszawa JUG conference = Confitura (formerly Javarsovia) ::
> >> http://confitura.pl
> >> "Hoping to save time by spending it" by David Blevins (Apache OpenEJB)
> >>
> >
>
>
>
> --
>
> Karan Singh Malhi
> twitter.com/KaranSinghMalhi
>

Re: TomEE doesn't accepts no web.xml web app (netbeans used)

Posted by Karan Malhi <ka...@gmail.com>.
As Romain mentioned earlier, we should check for WEB-INF, because
thats the directory which is guaranteed to be present in a web
application.

On Sat, Oct 8, 2011 at 2:23 PM, Romain Manni-Bucau
<rm...@gmail.com> wrote:
> Yep openejb-core is not linked to tomcat but is linked to jee and webapps.
> The best could be to scan webXXX annotations but i still think it is
> useless.
>
> I'll have a try tmr.
>
> - Romain
>
> Le 8 oct. 2011 23:20, "Jacek Laskowski" <ja...@japila.pl> a écrit :
>
>> On Sat, Oct 8, 2011 at 9:26 PM, Romain Manni-Bucau
>> <rm...@gmail.com> wrote:
>> > Hmm your fix needs context.xml so you could have added an empty web.xml
>> too.
>> > I still think testing web-inf is more relevant no?
>>
>> You're right, but it wasn't me who created context.xml file - it's
>> netbeans and I don't really know why it deploys apps this way. Not a
>> bid deal to add other combinations which all lead to a bad taste in my
>> mouth when I see them all in openejb-core (which has nothing to do
>> with the tomcat or other environments).
>>
>> I've run into other issues with no-web.xml webapps - it's like I may
>> have opened a can of worms :)
>>
>> Jacek
>>
>> --
>> Jacek Laskowski
>> Java EE, functional languages and IBM WebSphere - http://blog.japila.pl
>> Warszawa JUG conference = Confitura (formerly Javarsovia) ::
>> http://confitura.pl
>> "Hoping to save time by spending it" by David Blevins (Apache OpenEJB)
>>
>



-- 

Karan Singh Malhi
twitter.com/KaranSinghMalhi

Re: TomEE doesn't accepts no web.xml web app (netbeans used)

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Yep openejb-core is not linked to tomcat but is linked to jee and webapps.
The best could be to scan webXXX annotations but i still think it is
useless.

I'll have a try tmr.

- Romain

Le 8 oct. 2011 23:20, "Jacek Laskowski" <ja...@japila.pl> a écrit :

> On Sat, Oct 8, 2011 at 9:26 PM, Romain Manni-Bucau
> <rm...@gmail.com> wrote:
> > Hmm your fix needs context.xml so you could have added an empty web.xml
> too.
> > I still think testing web-inf is more relevant no?
>
> You're right, but it wasn't me who created context.xml file - it's
> netbeans and I don't really know why it deploys apps this way. Not a
> bid deal to add other combinations which all lead to a bad taste in my
> mouth when I see them all in openejb-core (which has nothing to do
> with the tomcat or other environments).
>
> I've run into other issues with no-web.xml webapps - it's like I may
> have opened a can of worms :)
>
> Jacek
>
> --
> Jacek Laskowski
> Java EE, functional languages and IBM WebSphere - http://blog.japila.pl
> Warszawa JUG conference = Confitura (formerly Javarsovia) ::
> http://confitura.pl
> "Hoping to save time by spending it" by David Blevins (Apache OpenEJB)
>

Re: TomEE doesn't accepts no web.xml web app (netbeans used)

Posted by Jacek Laskowski <ja...@japila.pl>.
On Sat, Oct 8, 2011 at 9:26 PM, Romain Manni-Bucau
<rm...@gmail.com> wrote:
> Hmm your fix needs context.xml so you could have added an empty web.xml too.
> I still think testing web-inf is more relevant no?

You're right, but it wasn't me who created context.xml file - it's
netbeans and I don't really know why it deploys apps this way. Not a
bid deal to add other combinations which all lead to a bad taste in my
mouth when I see them all in openejb-core (which has nothing to do
with the tomcat or other environments).

I've run into other issues with no-web.xml webapps - it's like I may
have opened a can of worms :)

Jacek

-- 
Jacek Laskowski
Java EE, functional languages and IBM WebSphere - http://blog.japila.pl
Warszawa JUG conference = Confitura (formerly Javarsovia) :: http://confitura.pl
"Hoping to save time by spending it" by David Blevins (Apache OpenEJB)

Re: TomEE doesn't accepts no web.xml web app (netbeans used)

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hmm your fix needs context.xml so you could have added an empty web.xml too.
I still think testing web-inf is more relevant no?

- Romain

Le 8 oct. 2011 20:48, "Jacek Laskowski" <ja...@japila.pl> a écrit :

> On Sat, Oct 8, 2011 at 7:51 PM, Jonathan Gallimore
> <jo...@gmail.com> wrote:
> > Just thought I'd add my experiences to this thread...
>
> Many thanks! It helped me a lot meaning I fixed the issue! Happy.
>
> Jacek
>
> --
> Jacek Laskowski
> Java EE, functional languages and IBM WebSphere - http://blog.japila.pl
> Warszawa JUG conference = Confitura (formerly Javarsovia) ::
> http://confitura.pl
> "Hoping to save time by spending it" by David Blevins (Apache OpenEJB)
>

Re: TomEE doesn't accepts no web.xml web app (netbeans used)

Posted by Jacek Laskowski <ja...@japila.pl>.
On Sat, Oct 8, 2011 at 7:51 PM, Jonathan Gallimore
<jo...@gmail.com> wrote:
> Just thought I'd add my experiences to this thread...

Many thanks! It helped me a lot meaning I fixed the issue! Happy.

Jacek

-- 
Jacek Laskowski
Java EE, functional languages and IBM WebSphere - http://blog.japila.pl
Warszawa JUG conference = Confitura (formerly Javarsovia) :: http://confitura.pl
"Hoping to save time by spending it" by David Blevins (Apache OpenEJB)

Re: TomEE doesn't accepts no web.xml web app (netbeans used)

Posted by Jonathan Gallimore <jo...@gmail.com>.
Just thought I'd add my experiences to this thread...

I personally use Eclipse most of the time. In general I take the similar
approach to Romain - I start TomEE by doing:

$ ./catalina.sh jpda run

and then connect the Eclipse debugger to port 8000.

I have also used the Eclipse WTP Tomcat 7 plugin with TomEE, and that works
well too - you do need to have your project setup in Eclipse as a web
project in order to add it to the server easily though. I have also used the
Tomcat 7 plugin with Netbeans, and had debugging working with that with no
problems.

Jon

On Sat, Oct 8, 2011 at 5:22 PM, Romain Manni-Bucau <rm...@gmail.com>wrote:

> I open all modules in the same project since i can (with a less powerful
> computer i openee separately each modules).
>
> I run tomee with run arg but i added the java debug command to
> catalina_opts. Once again it is my habit but idea debugging is good.
>
> - Romain
>
> Le 8 oct. 2011 15:17, "Jacek Laskowski" <ja...@japila.pl> a écrit :
>
> > On Sat, Oct 8, 2011 at 2:53 PM, Romain Manni-Bucau
> > <rm...@gmail.com> wrote:
> > > Personnally i use idea and debug in remote mode but ide debugging works
> > too.
> >
> > I'm for IDEA too, but wonder how to configure it appropriately. Do you
> > have a single or all the modules open? Do you start tomee with
> > ./bin/catalina.sh debug,  ./bin/catalina.sh jpda start or another way?
> >
> > Jacek
> >
> > --
> > Jacek Laskowski
> > Java EE, functional languages and IBM WebSphere - http://blog.japila.pl
> > Warszawa JUG conference = Confitura (formerly Javarsovia) ::
> > http://confitura.pl
> > "Hoping to save time by spending it" by David Blevins (Apache OpenEJB)
> >
>

Re: TomEE doesn't accepts no web.xml web app (netbeans used)

Posted by Romain Manni-Bucau <rm...@gmail.com>.
I open all modules in the same project since i can (with a less powerful
computer i openee separately each modules).

I run tomee with run arg but i added the java debug command to
catalina_opts. Once again it is my habit but idea debugging is good.

- Romain

Le 8 oct. 2011 15:17, "Jacek Laskowski" <ja...@japila.pl> a écrit :

> On Sat, Oct 8, 2011 at 2:53 PM, Romain Manni-Bucau
> <rm...@gmail.com> wrote:
> > Personnally i use idea and debug in remote mode but ide debugging works
> too.
>
> I'm for IDEA too, but wonder how to configure it appropriately. Do you
> have a single or all the modules open? Do you start tomee with
> ./bin/catalina.sh debug,  ./bin/catalina.sh jpda start or another way?
>
> Jacek
>
> --
> Jacek Laskowski
> Java EE, functional languages and IBM WebSphere - http://blog.japila.pl
> Warszawa JUG conference = Confitura (formerly Javarsovia) ::
> http://confitura.pl
> "Hoping to save time by spending it" by David Blevins (Apache OpenEJB)
>

Re: TomEE doesn't accepts no web.xml web app (netbeans used)

Posted by Jacek Laskowski <ja...@japila.pl>.
On Sat, Oct 8, 2011 at 2:53 PM, Romain Manni-Bucau
<rm...@gmail.com> wrote:
> Personnally i use idea and debug in remote mode but ide debugging works too.

I'm for IDEA too, but wonder how to configure it appropriately. Do you
have a single or all the modules open? Do you start tomee with
./bin/catalina.sh debug,  ./bin/catalina.sh jpda start or another way?

Jacek

-- 
Jacek Laskowski
Java EE, functional languages and IBM WebSphere - http://blog.japila.pl
Warszawa JUG conference = Confitura (formerly Javarsovia) :: http://confitura.pl
"Hoping to save time by spending it" by David Blevins (Apache OpenEJB)

Re: TomEE doesn't accepts no web.xml web app (netbeans used)

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Personnally i use idea and debug in remote mode but ide debugging works too.

But netbeans can do the trick ;)

- Romain

Le 8 oct. 2011 13:07, "Jacek Laskowski" <ja...@japila.pl> a écrit :

> On Sat, Oct 8, 2011 at 11:59 AM, Romain Manni-Bucau
> <rm...@gmail.com> wrote:
> > Hi, maybe just a kind of fallback test can be sufficient: if web-inf
> exist
> > return webmodule, no?
>
> I'm looking into it - https://issues.apache.org/jira/browse/OPENEJB-1695
>
> While we're at it, how is your development environment set up? Do you
> use IDEA, NetBeans, Eclipse? How do you debug tomee? I need some
> guidance badly ;-)
>
> Jacek
>
> --
> Jacek Laskowski
> Java EE, functional languages and IBM WebSphere - http://blog.japila.pl
> Warszawa JUG conference = Confitura (formerly Javarsovia) ::
> http://confitura.pl
> "Hoping to save time by spending it" by David Blevins (Apache OpenEJB)
>

Re: TomEE doesn't accepts no web.xml web app (netbeans used)

Posted by Jacek Laskowski <ja...@japila.pl>.
On Sat, Oct 8, 2011 at 11:59 AM, Romain Manni-Bucau
<rm...@gmail.com> wrote:
> Hi, maybe just a kind of fallback test can be sufficient: if web-inf exist
> return webmodule, no?

I'm looking into it - https://issues.apache.org/jira/browse/OPENEJB-1695

While we're at it, how is your development environment set up? Do you
use IDEA, NetBeans, Eclipse? How do you debug tomee? I need some
guidance badly ;-)

Jacek

-- 
Jacek Laskowski
Java EE, functional languages and IBM WebSphere - http://blog.japila.pl
Warszawa JUG conference = Confitura (formerly Javarsovia) :: http://confitura.pl
"Hoping to save time by spending it" by David Blevins (Apache OpenEJB)

Re: TomEE doesn't accepts no web.xml web app (netbeans used)

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi, maybe just a kind of fallback test can be sufficient: if web-inf exist
return webmodule, no?

- Romain

Le 7 oct. 2011 22:32, "Jacek Laskowski" <ja...@japila.pl> a écrit :

> Hi,
>
> I'm working with TomEE and NetBeans IDE 7.1 Beta after registering
> TomEE as a regular Tomcat instance (I'm not sure whether there's a
> better way to have it available in NB). I developed a simple web app
> with no web.xml with just a single servlet with @Servlet annotation.
> Upon deployment I run into the following exception.
>
> It looks like openejb can't figure out what module type it deals with,
> and the UnknownModuleTypeException exception's thrown. I think
> openejb/tomee should ask Tomcat if it can recognize the type of a
> module and if it can use the information in case tomee can't. Is it
> possible? When is TomcatWebAppBuilder.configureStart fired up? Isn't
> it when Tomcat recognized the module and moreover accepted it for
> deployment?
>
> Is the stack trace all I need to provide a fix? I'm looking for some
> guidance before delving into tomee's internals.
>
> TomcatWebAppBuilder.start
> Oct 7, 2011 10:23:08 PM org.apache.catalina.startup.HostConfig
> deployDescriptor
> INFO: Deploying configuration descriptor TomEnvEntryWeb.xml from
>
> /Users/jacek/apps/apache-tomee-webprofile-1.0.0-beta-1/conf/Catalina/localhost
> Oct 7, 2011 10:23:09 PM org.apache.catalina.core.ContainerBase
> addChildInternal
> SEVERE: ContainerBase.addChild: start:
> org.apache.catalina.LifecycleException: Failed to start component
>
> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/TomEnvEntryWeb]]
>        at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
>        at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)
>        at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)
>        at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)
>        at
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:633)
>        at
> org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:558)
>        at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:468)
>        at
> org.apache.catalina.startup.HostConfig.check(HostConfig.java:1370)
>        at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:294)
>        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.ContainerBase.backgroundProcess(ContainerBase.java:1242)
>        at
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1400)
>        at
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1410)
>        at
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1389)
>        at java.lang.Thread.run(Thread.java:680)
> Caused by: java.lang.RuntimeException:
> org.apache.openejb.config.UnknownModuleTypeException: Unable to
> determine module type for jar:
> file:/Users/jacek/NetBeansProjects/TomEnvEntryWeb/build/web/: Unknown
> module type:
> url=file:/Users/jacek/NetBeansProjects/TomEnvEntryWeb/build/web/
>        at
> org.apache.openejb.tomcat.catalina.TomcatWebAppBuilder.loadApplication(TomcatWebAppBuilder.java:875)
>        at
> org.apache.openejb.tomcat.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:416)
>        at
> org.apache.openejb.tomcat.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:377)
>        at
> org.apache.openejb.tomcat.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:117)
>        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:5103)
>        at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
>        ... 15 more
> Caused by: org.apache.openejb.config.UnknownModuleTypeException:
> Unable to determine module type for jar:
> file:/Users/jacek/NetBeansProjects/TomEnvEntryWeb/build/web/: Unknown
> module type:
> url=file:/Users/jacek/NetBeansProjects/TomEnvEntryWeb/build/web/
>        at
> org.apache.openejb.config.DeploymentLoader.load(DeploymentLoader.java:140)
>        at
> org.apache.openejb.tomcat.catalina.TomcatWebAppBuilder.loadApplication(TomcatWebAppBuilder.java:873)
>        ... 22 more
> Caused by: org.apache.openejb.config.UnknownModuleTypeException:
> Unknown module type:
> url=file:/Users/jacek/NetBeansProjects/TomEnvEntryWeb/build/web/
>        at
> org.apache.openejb.config.DeploymentLoader.discoverModuleType(DeploymentLoader.java:1463)
>        at
> org.apache.openejb.config.DeploymentLoader.discoverModuleType(DeploymentLoader.java:1401)
>        at
> org.apache.openejb.config.DeploymentLoader.load(DeploymentLoader.java:138)
>        ... 23 more
> Oct 7, 2011 10:23:09 PM org.apache.catalina.startup.HostConfig
> deployDescriptor
> SEVERE: Error deploying configuration descriptor TomEnvEntryWeb.xml
>
> Jacek
>
> --
> Jacek Laskowski
> Java EE, functional languages and IBM WebSphere - http://blog.japila.pl
> Warszawa JUG conference = Confitura (formerly Javarsovia) ::
> http://confitura.pl
> "Hoping to save time by spending it" by David Blevins (Apache OpenEJB)
>