You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Scott Anderson <po...@yahoo.com> on 2005/04/01 00:46:32 UTC

deploying minimal web app

I built a minimal war and ran into deployment issues
with both Jetty and Tomcat...

Jetty
-----
In my first attempt I noticed that Jetty was ignoring
the context name I had specified in
META-INF/context.xml and used the name of the war file
instead. Once I figured this out it also appeared that
Jetty was ignoring the welcome file specified in
WEB-INF/web.xml and showing the contents of the war
directory instead. I noticed in the wiki that there is
an additional descriptor, geronimo-jetty.xml, that I
might need to support. I tried this and also
restarting Geronimo with the configId I had set in
geronimo-jetty.xml and neither attempt was helpful.
BTW, something I did must have corrupted the
deployment module because I soon found I could no
longer deploy at all..

Deployment failed
  Server reports: No deployer present in kernel

Tomcat
------
After not getting the simplest web app to deploy
correctly on Jetty and re-assembling a corrupted
Geronimo I gave Tomcat a try. As indicated in the wiki
I removed the comments for the Tomcat configurations
in j2ee-deployer-plan.xml. When I try to startup
Geronimo with the org/apache/geronimo/Tomcat
configuration, I get...

Exception in thread "main"
javax.xml.parsers.FactoryConfigurationError: Provider
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not
found
        at
javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:99)
        at
org.apache.commons.modeler.util.DomUtil.readXml(DomUtil.java:284)
        at
org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource.execute(MbeansDescriptorsDOMSource.java:130)
        at
org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource.loadDescriptors(MbeansDescriptorsDOMSource.java:120)
        at
org.apache.commons.modeler.Registry.load(Registry.java:819)
        at
org.apache.commons.modeler.Registry.loadDescriptors(Registry.java:931)
        at
org.apache.commons.modeler.Registry.loadDescriptors(Registry.java:909)
        at
org.apache.commons.modeler.Registry.findDescriptor(Registry.java:992)
        at
org.apache.commons.modeler.Registry.findManagedBean(Registry.java:696)
        at
org.apache.commons.modeler.Registry.findManagedBean(Registry.java:1047)
        at
org.apache.commons.modeler.Registry.registerComponent(Registry.java:859)
        at
org.apache.catalina.loader.WebappLoader.init(WebappLoader.java:573)
        at
org.apache.catalina.loader.WebappLoader.start(WebappLoader.java:605)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3985)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011)
        at
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011)
        at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:440)
        at
org.apache.catalina.startup.Embedded.start(Embedded.java:789)
        at
org.apache.geronimo.tomcat.TomcatContainer.doStart(TomcatContainer.java:175)
        at
org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:841)
        at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:331)
        at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:111)
        at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:133)
        at
org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:494)
        at
org.apache.geronimo.kernel.Kernel.startRecursiveGBean(Kernel.java:339)
        at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:141)
        at
org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:494)
        at
org.apache.geronimo.kernel.Kernel.startRecursiveGBean(Kernel.java:339)
        at
org.apache.geronimo.system.main.Daemon.main(Daemon.java:185)

The wiki indicated that v5.5.4 of Tomcat was embedded
but JIRA indicates that this was upgraded to v5.5.7. I
am developing on Mac OS X with JDK 1.4.2 which
requires some additional jars to be added to Tomcat
5.5.7 (see binary downloads available for 5.5.7). I am
thinking that this is the source of the exception
above.  However, since Geronimo does not appear to be
preserving the typical packaging of Tomcat it is not
clear to me where these jars should go.

I am planning on integrating Apache Pluto with
Geronimo and since I do not have any information on
how compatible Pluto is with Jetty I think my best bet
is to work on getting the Tomcat issues solved. I'd
appreciate any suggestions on getting there from here.



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search. 
http://info.mail.yahoo.com/mail_250

Re: deploying minimal web app

Posted by Hari Kodungallur <hk...@spikesource.com>.
> > Once I figured this out it also appeared that
> > Jetty was ignoring the welcome file specified in
> > WEB-INF/web.xml and showing the contents of the war
> > directory instead.
> This is very surprising to me.  If you can verify this can you open a  
> jira issue with a test case?
> 

Scott, are you using a very old version? I believe this was fixed a
couple of months back? 
doStart() method in Jetty sets welcome file list to null. And it was
fixed long time back by setting the welcomefile list after calling the
doStart of jetty.

-Hari


Re: deploying minimal web app

Posted by David Jencks <dj...@gluecode.com>.
On Mar 31, 2005, at 2:46 PM, Scott Anderson wrote:

> I built a minimal war and ran into deployment issues
> with both Jetty and Tomcat...
>
> Jetty
> -----
> In my first attempt I noticed that Jetty was ignoring
> the context name I had specified in
> META-INF/context.xml and used the name of the war file
> instead.

We ignore all jetty-specific deployment info.

> Once I figured this out it also appeared that
> Jetty was ignoring the welcome file specified in
> WEB-INF/web.xml and showing the contents of the war
> directory instead.
This is very surprising to me.  If you can verify this can you open a  
jira issue with a test case?

> I noticed in the wiki that there is
> an additional descriptor, geronimo-jetty.xml, that I
> might need to support. I tried this and also
> restarting Geronimo with the configId I had set in
> geronimo-jetty.xml and neither attempt was helpful.

Restarting geronimo with a specific (list of) configIDs results in only  
those configs and their ancestors getting started.  Then, when you shut  
down, the current running state is saved.... this is how you lost the  
runtime deployer.
> BTW, something I did must have corrupted the
> deployment module because I soon found I could no
> longer deploy at all..
>
> Deployment failed
>   Server reports: No deployer present in kernel
>

You should be able to deploy just about any stand-alone war that  
doesn't use jndi without a plan.  It will, however, get deployed at a  
context root you don't like :-)  I'm a bit unclear on what happened  
when you deployed with a geronimo-jetty.xml plan.  It should be,  
starting with a "pristine" server, that starting the server, deploying  
your app, stopping the server, and restarting the server, that your app  
is still available.  (i.e. if you don't include any configIDs on the  
command line).

> Tomcat

I haven't played with the tomcat integration.  It is not nearly so far  
along as the jetty integration.
> ------
> After not getting the simplest web app to deploy
> correctly on Jetty and re-assembling a corrupted
> Geronimo I gave Tomcat a try. As indicated in the wiki
> I removed the comments for the Tomcat configurations
> in j2ee-deployer-plan.xml. When I try to startup
> Geronimo with the org/apache/geronimo/Tomcat
> configuration, I get...
>
> Exception in thread "main"
> javax.xml.parsers.FactoryConfigurationError: Provider
> org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not
> found
>         at
> javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFac 
> tory.java:99)
>         at
> org.apache.commons.modeler.util.DomUtil.readXml(DomUtil.java:284)
>         at
> org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource.execute(M 
> beansDescriptorsDOMSource.java:130)
>         at
> org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource.loadDescr 
> iptors(MbeansDescriptorsDOMSource.java:120)
>         at
> org.apache.commons.modeler.Registry.load(Registry.java:819)
>         at
> org.apache.commons.modeler.Registry.loadDescriptors(Registry.java:931)
>         at
> org.apache.commons.modeler.Registry.loadDescriptors(Registry.java:909)
>         at
> org.apache.commons.modeler.Registry.findDescriptor(Registry.java:992)
>         at
> org.apache.commons.modeler.Registry.findManagedBean(Registry.java:696)
>         at
> org.apache.commons.modeler.Registry.findManagedBean(Registry.java:1047)
>         at
> org.apache.commons.modeler.Registry.registerComponent(Registry.java: 
> 859)
>         at
> org.apache.catalina.loader.WebappLoader.init(WebappLoader.java:573)
>         at
> org.apache.catalina.loader.WebappLoader.start(WebappLoader.java:605)
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java: 
> 3985)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011)
>         at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011)
>         at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:440)
>         at
> org.apache.catalina.startup.Embedded.start(Embedded.java:789)
>         at
> org.apache.geronimo.tomcat.TomcatContainer.doStart(TomcatContainer.java 
> :175)
>         at
> org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanIns 
> tance.java:841)
>         at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(G 
> BeanInstanceState.java:331)
>         at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanc 
> eState.java:111)
>         at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBe 
> anInstanceState.java:133)
>         at
> org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanIns 
> tance.java:494)
>         at
> org.apache.geronimo.kernel.Kernel.startRecursiveGBean(Kernel.java:339)
>         at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBe 
> anInstanceState.java:141)
>         at
> org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanIns 
> tance.java:494)
>         at
> org.apache.geronimo.kernel.Kernel.startRecursiveGBean(Kernel.java:339)
>         at
> org.apache.geronimo.system.main.Daemon.main(Daemon.java:185)
>
> The wiki indicated that v5.5.4 of Tomcat was embedded
> but JIRA indicates that this was upgraded to v5.5.7. I
> am developing on Mac OS X with JDK 1.4.2 which
> requires some additional jars to be added to Tomcat
> 5.5.7 (see binary downloads available for 5.5.7). I am
> thinking that this is the source of the exception
> above.  However, since Geronimo does not appear to be
> preserving the typical packaging of Tomcat it is not
> clear to me where these jars should go.

Hopefully one of the developers who has been working with Tomcat will  
tell what is going wrong.  I thought this issue was solved, and at  
least one of them is working on os x with jdk 1.4.2.
>
> I am planning on integrating Apache Pluto with
> Geronimo and since I do not have any information on
> how compatible Pluto is with Jetty I think my best bet
> is to work on getting the Tomcat issues solved. I'd
> appreciate any suggestions on getting there from here.
>

You should look at Gluecode JOE which is geronimo/jetty + pluto (+ a  
management console and some other goodies).  At the moment JOE does   
not include ejbs but that edition will be coming fairly soon.  There's  
a completely open source version including source code (OE) and a  
version with more goodies (SE) that includes non-open-source  
extensions.  I expect integrating pluto with tomcat in geronimo would  
be a fairly major project until the tomcat integration is more  
complete.

http://www.gluecode.com/website/index.jsp

(my employer)

thanks
david jencks



>
>
> 		
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - Find what you need with new enhanced search.
> http://info.mail.yahoo.com/mail_250
>


Re: deploying minimal web app

Posted by Jeremy Boynes <jb...@apache.org>.
Scott Anderson wrote:
> I built a minimal war and ran into deployment issues
> with both Jetty and Tomcat...
> 
> Jetty
> -----
> In my first attempt I noticed that Jetty was ignoring
> the context name I had specified in
> META-INF/context.xml and used the name of the war file
> instead. 

I don't think we support context.xml (or jetty-web.xml). Instead you can 
specify the context path in a Geronimo deployment plan - this can be 
placed inside the war's META-INF directory or supplied as an external 
plan to avoid modifying the war.

> Once I figured this out it also appeared that
> Jetty was ignoring the welcome file specified in
> WEB-INF/web.xml and showing the contents of the war
> directory instead. I noticed in the wiki that there is
> an additional descriptor, geronimo-jetty.xml, that I
> might need to support. I tried this and also
> restarting Geronimo with the configId I had set in
> geronimo-jetty.xml and neither attempt was helpful.

You should not need to do that. You can recover the server by copying 
the file config.list from modules/assembly/src/var/config into the 
var/config directory of your installation (this resets the runnning 
config list to what we orginally built) and then start your war using

$ java -jar bin/deployer.jar start ${configid}

> BTW, something I did must have corrupted the
> deployment module because I soon found I could no
> longer deploy at all..
> 
> Deployment failed
>   Server reports: No deployer present in kernel
> 
> Tomcat
> ------

<snip/>
Sorry, I can't help with Tomcat.

> 
> I am planning on integrating Apache Pluto with
> Geronimo and since I do not have any information on
> how compatible Pluto is with Jetty I think my best bet
> is to work on getting the Tomcat issues solved. I'd
> appreciate any suggestions on getting there from here.
> 

Gluecode integrated and certified Pluto 1.0 with Geronimo/Jetty around 
the M3 timeframe as part of our JOE 1.0 release. All the fixes for that 
were contributed back to Pluto so it should work. You do need to use the 
context based registry (not the one that scans the webapp directory) - 
sorry the name eludes me right now.

I am very interested in getting 1.1 to work but just haven't managed to 
get to it - is that the version you were thinking of using?

--
Jeremy

Re: deploying minimal web app

Posted by toby cabot <to...@caboteria.org>.
On Thu, Mar 31, 2005 at 02:46:32PM -0800, Scott Anderson wrote:
> Deployment failed
>   Server reports: No deployer present in kernel

I use the "distribute" command to deploy my application and get this
error if there's an instance of Geronimo running when I run the
deployer.  Not sure whether it applies to you...