1 Reply Latest reply on Nov 8, 2005 5:23 PM by smerrick

    Why is JBoss not using the class-path defined in the .war fi

    smerrick

      I am having some classloader problems.

      First I can not turn on the JBoss Unified classloader due to conflicts of multiple instances of some apps.

      Currently I am packaging up a couple of applications in an .ear file.
      These two applications are properly packaged as .war files.
      These two applications have some shared code that I broke out into a .jar file.

      I cannot get the applications to find the shared .jar file without turning on the Unified classloader

      Following what every example ( one of the examples is from the sun itself http://java.sun.com/j2ee/verified/packaging.html ) does I packaged it as follows

      EAR File: contains
      -META-INF
      --MANIFEST.MF
      --application.xml
      sharedClasses.jar
      application1.war
      -META-INF
      --MANIFEST.MF
      application2.war
      -META-INF
      --MANIFEST.MF

      application.xml: contains
      <?xml version="1.0" encoding="ISO-8859-1"?>
      <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE
      Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">


      <display-name>SomeText</display-name>
      SomeMoreText


      <web-uri>application1.war</web-uri>
      <context-root>/application1</context-root>




      <web-uri>application2.war</web-uri>
      <context-root>/application2</context-root>



      sharedClasses.jar



      The two MANIFEST.MF files in the applicationX.war files contain:
      Manifest-Version: 1.0
      Class-Path: sharedClasses.jar

      And yes there is a carrage return after the class-path line.

      Why is JBoss not using the class-path defined in the .war files?

      I can understand why with the unified classloader turned off not being able to get to jar files inside other .ear files in fact I expressly dont want that.

      My only solution is to take the shared classes in the sharedClasses.jar file and put them back into the applicationX.war files causing file size bloat and a maintanence issue.

      This is not an uncommon problem a quick search pulled up several posts on this problem
      http://www.jboss.com/index.html?module=bb&op=viewtopic&t=72180
      http://www.jboss.com/index.html?module=bb&op=viewtopic&t=72162
      http://www.jboss.com/index.html?module=bb&op=viewtopic&t=71231
      http://www.jboss.com/index.html?module=bb&op=viewtopic&t=66137
      http://www.jboss.com/index.html?module=bb&op=viewtopic&t=65030


        • 1. Re: Why is JBoss not using the class-path defined in the .wa
          smerrick

          Bah the application.xml file didn't post correctly
          replace the '[' and ']' with '<' '>'


          [?xml version="1.0" encoding="ISO-8859-1"?]
          [!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE
          Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd"]

          [application]
          [display-name]DigiLore[/display-name]
          [description]The DigiLore JITCube Server package[/description]
          [module]
          [web]
          [web-uri>axis.war]/web-uri]
          [context-root]/axis[/context-root]
          [/web]
          [/module]
          [module]
          [web]
          [web-uri]adfamDelivery.war]/web-uri]
          [context-root]/adfamDelivery[/context-root]
          [/web]
          [module]
          [module]
          [java]jitcubeservermodel.jar[/java]
          [/module]
          [/application]