3 Replies Latest reply on Jun 14, 2005 1:18 PM by Ben Turner

    Can't run two projects at the same time

    Staffan Sandberg Newbie

      I run two struts projects on my jboss server deployed in two different maps, Handdator.war and FHD_Admin.war.

      The two projects does not have any common files or methods but are completely stand alone from each other. But they do have simular architecture, e.g. they both have simular names on their respective jsp pages.

      Now to the problem: When I have them both deployed neither of them work correctly. I get various exceptions of methods that can't be found and data that I enter will not be accepted. As soon as I remove one of the projects, the other one is running with no problems at all.

      Why is this, how come they are working properly when deployed alone on the server, but keeps chrashing when deployed at the same time?


        • 1. Re: Can't run two projects at the same time
          Frank Langelage Master

          Read about (scoped) classloading in jboss wiki.

          Try this as WEB-INF/jboss-web.xml, replacing @WEB_APP_NAME@ with your names:

          <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
           <class-loading java2ClassLoadingCompliance='false'>

          • 2. Re: Can't run two projects at the same time
            Staffan Sandberg Newbie

            Thanks for the help, but I still can't get this to work.

            First of all I had to construct a jboss-web.xml, I didn't have any from the beginning. First I had some problem with that the server stoped reding my web.xml when I added the jboss-web.xml but I think I sorted that out.

            Anyway it still doesn't work, I'm getting load exceptions when I start the server. Is it something more I have to do, add anything else to the jboss-web.xml file?

            I tried some other examples of jboss-web.xml configurations, found when I read about scoped class loading, but I get the same result.

            I'm running jboss ver. 3.2.5, shall I upgrade?


            • 3. Re: Can't run two projects at the same time
              Ben Turner Newbie

              I am also getting this problem - orginally I have a clash between my instance of JBoss (be it 3.0.4 or 3.0.8 or 3.2.7) and my applications commons-collections libraries.

              Putting the jboss-web.xml patch into place does nothing for 3.0.x - looks like it might have to be upgrade time then. But when I put the patch on my 3.2.7 version, it started throwing these sorts of exceptions instead;

              org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (ReflectionException: Cannot find setter method setDocBase null Cause: java.lang.NoSuchMethodException: org.apache.commons.modeler.BaseModelMBean.setDocBase(java.lang.String))

              I have tried to find other solutions to this problem, but no matter where I investiagte, it always seems to recommend using the xml above - esp. here : http://www.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration (section : Isolation with Overriding)

              But this xml just give me the MBean exceptions... can anyone offer any further information ? Thanks.