2 Replies Latest reply on Dec 17, 2008 5:14 PM by rend

    Migrating to Seam 2.1.1CR2 page.xml NPE on classloader

    rend

      I'm migrating my seam 2.0.2.SP1 on JBoss 4.2.3 project to Seam 2.1.1.CR2 on JBoss 5.0.0.GA


      I've run into a stumbling block. After jboss starts, and I make the first web request, I get the following errors (one for each page.xml file):


      16:57:19,984 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



      Looks like this may be the relevant code :


      org/jboss/seam/deployment/FileDescriptor.java


      this.url = classLoader.getResource(name);
      if (this.url == null)
      {
         throw new NullPointerException("Cannot find URL from classLoader for " + name + ", loading from " + classLoader);
      }



      Would appreciate any insight. Thanks.

        • 1. Re: Migrating to Seam 2.1.1CR2 page.xml NPE on classloader
          rend

          It seems that this error is due to the fact that I have multiple WARs deployed inside of my EAR.


          My application.xml looks like:


          <application>
          <module><java>platform.jar</java></module>
          <module><java>foo.jar</java></module>
          <module><java>bar.jar</java></module>
          
            <module>
              <web>
                <web-uri>foo.war</web-uri>
                <context-root>/foo</context-root>
              </web>
            </module>
            <module>
              <web>
                <web-uri>bar.war</web-uri>
                <context-root>/bar</context-root>
              </web>
            </module>
            <module>
              <ejb>jboss-seam-2.1.1.CR2.jar</ejb>
            </module>
          </application>



          If I remove bar.war from application.xml, then /foo works as expected.


          Any ideas how to get this working again (as it did with seam 2.0.2 and jboss 4.2)?

          • 2. Re: Migrating to Seam 2.1.1CR2 page.xml NPE on classloader
            rend