3 Replies Latest reply on Dec 2, 2003 3:00 PM by cfrostrun

    Need Help - Multiple parallel Ear Files.

    cfrostrun

      hello all,

      I need some assistance. i'm desperately trying to figure out how to get this to work.

      for explaination purposes let say i have an application. i have two clients that are wanting to use it. however they need different configuration files and deployment descriptors. i want to run them from the same jboss instance. i'm getting class cast exceptions, and i understand it's a classloading problem.

      can somebody give me a list of steps that will get this working. i basically want to have "mirror" ear files with the only differences is the configuration files inside the appropriate jar/war/ear files.

      i have tried a couple of different things. right now i have unique jboss.xml & ejb-jar.xml files for the jndi lookups and so they are deploying okay now. but when i try to get the remote reference that's when i'm getting the classcastexception. i have the jboss-app.xml, it is at the same level of the application.xml file. but it doesn't seem to be working.

      one ear file has
      <jboss-app>
      <loader-repository>scbg_app:loader=scbg_test.ear</loader-repository>
      </jboss-app>

      the other ear file has
      <jboss-app>
      <loader-repository>scbg_app2:loader=scbg_test2.ear</loader-repository>
      </jboss-app>


      can somebody please help.

        • 1. Re: Need Help - Multiple parallel Ear Files.
          cfrostrun

          One other thing.

          i'm on jboss-3.2.1_tomcat-4.1.24, w/ jdk 1.4.2 if that matters at all.

          • 2. Re: ClassLoaders -- HELP
            cfrostrun

            Okay, I'm been combing the internet for this fix. i'm really getting frustrated. i found more info about the UnifiedClassLoader.

            here is my sample jboss-app.xml. but this appears not to be working.

            ear file 1:
            <jboss-app> <loader-repository>scbg_test.net:loader=scbg_test.ear</loader-repository>
            <loader-repository-config configParserClass='org.jboss.mx.loading.LoaderRepositoryFactory.LoaderRepositoryConfigParser'>
            java2ParentDelegaton=false
            </loader-repository-config>
            </jboss-app>

            ear file 2:
            <jboss-app> <loader-repository>scbg_test2.net:loader=scbg_test2.ear</loader-repository>
            <loader-repository-config configParserClass='org.jboss.mx.loading.LoaderRepositoryFactory.LoaderRepositoryConfigParser'>
            java2ParentDelegaton=false
            </loader-repository-config>
            </jboss-app>


            this is really messed up. test2 works, test1 throws the class cast exception on

            java.lang.ClassCastException
            at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293)
            at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
            at com.FrostyLabs.scbg.service.locators.FacadeService.getEJBHome(FacadeService.java:29)


            but here's a weird thing, test2 is pulling data from database 1, instead of database 2. so its grabbing the properties files from my test 1 ear file?

            what the HECK is going on?

            Can Somebody please help me.

            • 3. Re: ClassLoaders -- HELP
              cfrostrun


              scrap this line -- it was an ant build error
              ------
              but here's a weird thing, test2 is pulling data from database 1, instead of database 2. so its grabbing the properties files from my test 1 ear file?
              ------

              still desperating trying to figure out the jboss-app.xml problem.