Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-4015

back port fix from JBSEAM-4316-Classloader cannot find XML files in multiple WARs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: EAP 5.0.0, EAP 5.0.1
    • Fix Version/s: EAP_EWP 5.1.0
    • Component/s: Seam
    • Labels:
      None
    • Affects:
      Release Notes

      Description

      I have an EAR that contains multiple WAR files. The first webapp to be accessed works fine. Any web request to the 2nd WAR to be accessed causes the following error:

      WARN [VFSScanner] Error handling item 'login/index.page.xml': java.lang.NullPointerException: Cannot find URL from classLoader for login/index.page.xml, loading from org.jboss.web.tomcat.service.WebCtxLoader$ENCLoader@1ed964f

      FileDescriptor.java calls:

      Resources.getResource(name, ServletLifecycle.getServletContext());

      Which returns a static reference to the ServletContext which is overwritten by the last webapp to be initialized.

      private static ServletContext servletContext;

      public static ServletContext getServletContext()

      { //don't throw an exception if null, because of unit tests return servletContext; }

      The 2nd webapp to be initialized will have a reference to the first webapp's ServletContext.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  manaRH Marek Novotny
                  Reporter:
                  manaRH Marek Novotny
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: