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

Class-Path entries—in META-INF/MANIFEST.MF of a sub-deployment module—pointing to resources directories within the EAR are not supported

    Details

    • Steps to Reproduce:
      Hide

      When you drop the attached the EAR into your deployment directory, you will see the following warning logged in the console:

      22:17:37,852 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry res/ in 
      "/C:/work/jboss/jboss-as-7.1.0.Alpha2-SNAPSHOT/bin/content/jee-app.ear/web.war"  does not point to a 
      valid jar for a Class-Path reference.
      

      And the application will ignore the resource files under res/ directory.

      Application Structure: An EAR with a "res" directory—that has some resource files—and a WAR—that has META-INF/MANIFEST.MF with Class-path: res/.

      Show
      When you drop the attached the EAR into your deployment directory, you will see the following warning logged in the console: 22:17:37,852 WARN [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry res/ in "/C:/work/jboss/jboss-as-7.1.0.Alpha2-SNAPSHOT/bin/content/jee-app.ear/web.war" does not point to a valid jar for a Class -Path reference. And the application will ignore the resource files under res/ directory. Application Structure: An EAR with a "res" directory—that has some resource files—and a WAR—that has META-INF/MANIFEST.MF with Class-path: res/.
    • Workaround Description:
      Hide

      Bundle the files and folders in the resources directories into a jar (or multiple jars) and add to the EAR/lib directory, though this may not be an acceptable solution for many who have similar requirements as we do.

      Show
      Bundle the files and folders in the resources directories into a jar (or multiple jars) and add to the EAR/lib directory, though this may not be an acceptable solution for many who have similar requirements as we do.

      Description

      According to the JEE 6 specification, section EE.8.2.1 (Bundled Libraries), Class-path entries—in META-INF/MANIFEST.MF of a sub-deployment module—pointing to resources directories within the EAR could be used by the application developer to add these directories to the classpath of the sub-module. However, this functionality has not yet been implemented in the JBoss AS7.1 (alpha-2 nightly build).

      Relevant JEE 6 spec, section EE.8.2.1, quotes:
      Class-Path: list-of-jar-files-or-directories-separated-by-spaces
      Only JAR format files or directories containing class files or resources to be loaded directly by a standard class loader should be the target of a Class-Path reference; such files are always named with a .jar extension.

      The support for this functionality is required by the specification for the JBoss AS7.1 to be fully JEE 6 compliant.

      Side note: This functionality is supported in JBoss 5.1, Weblogic, and WebSphere.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                swd847 Stuart Douglas
                Reporter:
                abhis Abhi S
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: