7 Replies Latest reply on May 11, 2004 9:34 AM by raja05

    Problem using two applications simultaniously

    momi

      I am working on a project where we use two ears. These ears are from an external party and can therefor not be changed. One ear of for backoffice/maintenance functionality and the other is for the user interface.

      Both ears get deployed correctly, however, whichever of the two applications I start first works correct, but then the other application gives me a class cast exception. I guess both ears use the same kind of class but try to load them from a different library.

      This problem only occurs in JBoss 3.2.3. The same two ears in JBoss-2.4.6_Tomcat-4.0.3 works fine without problems. However, I really would like to start using JBoss 3.2.3.

      Does anyone have some tips on what I can try to solve this problem?

        • 1. Re: Problem using two applications simultaniously
          darranl

          I think that unless you can edit the ears your only solution is to start two different JBoss instances.

          • 2. Re: Problem using two applications simultaniously
            momi

            But why does everything work fine in the 2.x version and not anymore in the 3.x version?

            Is it not possible to configure multiple applications which are somehow separated from each other?

            • 3. Re: Problem using two applications simultaniously
              triathlon98

              Different classloader architecture.

              The new architecture in the default settings, avoids serializations for communication inside JBoss. However, it can cause problems when different versions of a jar/class need to be deployed.

              Joachim

              • 4. Re: Problem using two applications simultaniously
                momi

                For anyone interested, I found a solution.

                In the file: deploy/jbossweb-tomcat41.sar/META-INF/jboss-service.xml

                I changed the following tag to false:

                <attribute name="UseJBossWebLoader">false</attribute>



                • 5. Re: Problem using two applications simultaniously
                  osman

                  I did the same in jboss3.2.3, it doesn't work. Unbelievable, such a product Jboss. This is common J2EE usage: having more ear’s deployed. Any ear’s has its onw classes. Sometimes there are classes in both ears with the same package name, but they can be different or different version. According to J2EE specs about ClassLoding classloaders should first look into war or jar after that in the parent ear. It should not be possible to load classes from a different ears.

                  I just can’t believe that this is implemented so. This is also security prone. It is against J2EE specs. I will never advise Jboss as application server as long this is not fixed.

                  Jboss development team, my congratulations !!!

                  • 6. Re: Problem using two applications simultaniously
                    darranl

                    I will never advise Jboss as application server as long this is not fixed. - That should do it, the developers will fix it for you tonight.

                    • 7. Re: Problem using two applications simultaniously
                      raja05

                      If you want to load the classes from that ear alone, scope ur classloader by naming it differently. Lookup the jboss getting started documents on "Scoping Classloaders"