Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-2595

Jars in root of a sar archive not added to the sar's classpath

    XMLWordPrintable

Details

    • Workaround Exists
    • Hide

      One has two options to work around the problem. One is to place the classes in the root, outside a jar archive:

      mbean.sar
      mbean.sar/META-INF
      mbean.sar/META-INF/jboss-service.xml
      mbean.sar/META-INF/MANIFEST.MF
      mbean.sar/some/company/JmxThing.class
      mbean.sar/some/company/JmxThingMBean.class

      or one can add a jboss-deployment-structure.xml to the sar's META-INF:

      <jboss-deployment-structure>
      <deployment>
      <dependencies>
      <module name="deployment.module.nested"/>
      </dependencies>
      </deployment>
      <module name="deployment.module.nested">
      <resources>
      <resource-root path="some.jar"/>
      </resources>
      </module>
      </jboss-deployment-structure>

      Show
      One has two options to work around the problem. One is to place the classes in the root, outside a jar archive: mbean.sar mbean.sar/META-INF mbean.sar/META-INF/jboss-service.xml mbean.sar/META-INF/MANIFEST.MF mbean.sar/some/company/JmxThing.class mbean.sar/some/company/JmxThingMBean.class or one can add a jboss-deployment-structure.xml to the sar's META-INF: <jboss-deployment-structure> <deployment> <dependencies> <module name="deployment.module.nested"/> </dependencies> </deployment> <module name="deployment.module.nested"> <resources> <resource-root path="some.jar"/> </resources> </module> </jboss-deployment-structure>

    Description

      In previous versions, a sar archive includes classes in the sar archive's root on the sar's classpath. It is quite common to have a structure such as:

      mbean.sar
      mbean.sar/META-INF
      mbean.sar/META-INF/jboss-deployment-structure.xml
      mbean.sar/META-INF/jboss-service.xml
      mbean.sar/META-INF/MANIFEST.MF
      mbean.sar/some.jar

      However, this does not work. The classes in some.jar are not available.

      Attachments

        Activity

          People

            tadamski@redhat.com Tomasz Adamski
            rhn-support-miclark Mike Clark
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: