4 Replies Latest reply on Sep 4, 2009 9:06 AM by josdaniel

    ear files in packed format unable to load jars

    josdaniel
      If the ejb / war files contained within an ear are in a packed format, I get the following class loader exception during startup. This is not the case if the ejb / war folders are in a unpacked format. Any pointers would be appreciated.

      ...
      10:15:55,221 WARN  [URLScanner] could not read entries
      java.io.FileNotFoundException: C:\jboss-5.1.0.GA\server\default\deploy\is-bcl-ear-1.0\is-bcl-war-1.0.war\WEB-INF\lib\jboss-seam-debug-2.2.0.GA.jar (The system cannot find the path specified)
              at java.util.zip.ZipFile.open(Native Method)
              at java.util.zip.ZipFile.<init>(ZipFile.java:114)
              at java.util.zip.ZipFile.<init>(ZipFile.java:131)
              at org.jboss.seam.deployment.URLScanner.handleArchiveByFile(URLScan
      ner.java:123)
              at org.jboss.seam.deployment.URLScanner.handle(URLScanner.java:107)

              at org.jboss.seam.deployment.URLScanner.scanResources(URLScanner.ja
      va:90)
              at org.jboss.seam.deployment.StandardDeploymentStrategy.scan(Standa
      rdDeploymentStrategy.java:113)
              at org.jboss.seam.init.Initialization.create(Initialization.java:13
      2)
              at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListe
      ner.java:36)
              at org.apache.catalina.core.StandardContext.listenerStart(StandardC
      ontext.java:3910)
        • 1. Re: ear files in packed format unable to load jars
          niox.nikospara.yahoo.com

          The path "C:\jboss-5.1.0.GA\server\default\deploy\is-bcl-ear-1.0" does not have the ".ear" extension. Is this on purpose?


          Which files/directories are packed and which are exploded?

          • 2. Re: ear files in packed format unable to load jars
            wilhelmtell

            Check if the file jboss-seam-debug-2.2.0.GA. jar is in your lib directory in your WAR file. 


            The error message does state that is not. If not just put this file in your lib directory.




            • 3. Re: ear files in packed format unable to load jars
              rafaelri

              I am having the same problem as Joshua and in my case I can assure that the ear exists under the path displayed in the FileNotFoundException, the strange thing is that it seems like Seam is trying to treat it like a regular file instead of a resource available on classloader. Has anyone found a solution for this? I wasn't really wondering to have a different packaging for JBoss (it also does not make much sense).
              Seam seems to work on JBoss only if you dont place any of their jar files and use the ones already on JBoss classpath.

              • 4. Re: ear files in packed format unable to load jars
                josdaniel

                The folder is-bcl-ear-1.0 contained the jar and war files in unpacked format.
                jboss-seam-debug-2.2.0.GA. jar was available inside the package in a packed format.


                I guess the class loader expects the deployed entities to have the appropriate extension. In this case, it should have been is-bcl-ear-1.0.ear.


                There were too many issues and hence we migrated to deploying the application in a packed format (i.e. is-bcl-ear.ear) every time.