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

Non ejb jars referenced from an ejb jar in an ear via META-INF/MANIFEST.MF have no visiblity to javax.* classes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Blocker
    • 7.1.0.Beta1
    • 7.0.2.Final, 7.1.0.Alpha1
    • EE
    • None
    • Hide

      There is no work around considering some want to deploy their application on other application servers by using the JEE standard with MANIFEST.MF files. Using static modules will work but restricts the developer to having to restart JBoss after compiles.

      Show
      There is no work around considering some want to deploy their application on other application servers by using the JEE standard with MANIFEST.MF files. Using static modules will work but restricts the developer to having to restart JBoss after compiles.

    Description

      When an ejb jar file in an ear references a regular non ejb jar file using the MANIFEST.MF Class-Path: entry the non ejb jar file has no visibility to javax.* classes. This results in the run time exception java.lang.NoClassDefFoundError when passing javax.* objects to the accessed jar or when constructing them in the jar. For example "java.lang.NoClassDefFoundError: javax/naming/InitialContext" is thrown when constructing a javax.naming.InitialContext in the accessed non ejb jar. Referencing jars through a MANIFEST.MF is standard J2EE and is defined in the JBOSS AS 7 Documentation as proper for portability. Using <ejb>/lib for the jar does not exhibit the error but prevents the jar from being used as a deployment module. Thus not a solution for a jar that needs to be shared across ears such as one which contains remote session bean interfaces. Adding javax.api to the Dependencies of the jars does not have any affect. Methods in the referenced jar that do not use javax.* classes work fine.

      Attachments

        Activity

          People

            sdouglas1@redhat.com Stuart Douglas
            rkite01 Rodney Kite (Inactive)
            Votes:
            5 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: