Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-3047

WebApps ignore java2ClassLoadingCompliance in jboss-web.xml

    XMLWordPrintable

    Details

    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      Don't deploy the same jar in ear and war

      Show
      Don't deploy the same jar in ear and war
    • Estimated Difficulty:
      Low

      Description

      I deploy the same jar file (kevin.jar) in a war and its containing ear. In the war, I have a test JSP that loads a class from kevin.jar and displays its class loader.

      The class is loaded using the war class loader. So, I added the following to jboss-web.xml under the war's WEB-INF

      <class-loading java2ClassLoadingCompliance='true'>

      Didn't work. So I added this:

      <class-loading java2ClassLoadingCompliance='true'>
      <loader-repository>
      dot.com:loader=unique-archive-name
      <loader-repository-config>
      java2ParentDelegaton=true
      </loader-repository-config>
      </loader-repository>
      </class-loading>

      Didn't work either. Class continues to be loaded from war's class loader.

      Deleted JAR from WEB-INF/lib and class is now loaded from ear.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                starksm64 Scott Stark
                Reporter:
                keviny Kevin Yeung
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: