My scenario was pretty simple, yet it took hours to get it done with tomcat. What I have is two web applications packaged in .ear files. Both of these apps are bound to / but to different hostnames. Like this in jboss-web.xml:

<jboss-web>
  <context-root>/</context-root>
  <virtual-host>host1.blah.com</virtual-host>
</jboss-web>

First try: Tomcat 4.x

I first tried this with JBoss3.2.3/Tomcat4. This does not work at all. Tomcat4 barfs when the second .ear is loaded.

2003-12-16 09:10:13,148 ERROR [org.jboss.deployment.MainDeployer] could not start deployment: file:fluts.war org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (java.lang.IllegalArgumentException: addChild: Child name '' is not unique)
at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:440)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)


Maybe something newer: Tomcat 5.x

Then I tried to do this with Tomcat 5.x that comes with JBoss 3.2.3. Unfortunately this also does not work. The first app deploys fine again but when the second one is loaded I get an IncompatibleClassChangeError.

To the rescue: Jetty

Enough of that Tomcat cr*p. I got rid of jbossweb-*, downloaded jboss-3.2.2-jetty-4.2.14.sar from http://jetty.mortbay.org, dropped it in the deploy directory. My JBoss version is 3.2.3, but this Jetty version works fine with it.

Guess what ... I deployed my ear files and they worked. No errors, no weird class loaded stuff, no exceptions.

Why oh why does JBoss not ship with Jetty anymore. It is clearly the servlet engine that works. Maybe my setup is unique. Maybe none of the 5 million people who downloaded JBoss use virtual hosting like this. I don't know. All I know is that I will run my production servers with Jetty for the simple reason that it is currently the only servlet container that can actually deploy standard applications.

Bah. Four hours wasted.

S.



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to