Details

    • Type: Sub-task Sub-task
    • Status: Closed Closed (View Workflow)
    • Priority: Major Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 6.0.0.M1
    • Component/s: Test Suite
    • Security Level: Public (Everyone can see)
    • Labels:
      None
    • Similar Issues:
      Show 3 results 

      Description

      SEAM examples failing to deploy with the following error when processing jars in WARs WEB-INF/lib directory:

      2009-09-14 13:01:27,760 ERROR [org.apache.catalina.startup.TldConfig] (WorkerThread#0[127.0.0.1:59105]) Exception processing JAR at resource path /work/Branch_5_x/build/output/jboss-5.2.0.Beta1/server/all/tmp/3j001-fc2u1g-fzlgnahp-1-fzlgpa1i-ac/jboss-seam-booking.war/WEB-INF/lib/jboss-seam-debug.jar in context /seam-booking
      java.util.zip.ZipException: error in opening zip file
      at java.util.zip.ZipFile.open(Native Method)
      at java.util.zip.ZipFile.<init>(ZipFile.java:114)
      at java.util.jar.JarFile.<init>(JarFile.java:133)
      at java.util.jar.JarFile.<init>(JarFile.java:97)
      at org.apache.catalina.startup.TldConfig.tldScanJar(TldConfig.java:461)
      at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:301)
      at org.apache.catalina.core.StandardContext.processTlds(StandardContext.java:4540)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4308)
      at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:321)
      at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:146)
      at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:462)
      at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
      at org.jboss.web.deployers.WebModule.start(WebModule.java:97)

      Root cause:
      Caused by: java.lang.NoClassDefFoundError: [Lorg/hibernate/validator/InvalidValue;
      at java.lang.Class.getDeclaredMethods0(Native Method)
      at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
      at java.lang.Class.privateGetPublicMethods(Class.java:2547)
      at java.lang.Class.privateGetPublicMethods(Class.java:2563)
      at java.lang.Class.getMethods(Class.java:1410)
      at org.jboss.seam.Component.hasAnnotation(Component.java:1115)
      at org.jboss.seam.Component.<init>(Component.java:218)
      at org.jboss.seam.Component.<init>(Component.java:205)
      at org.jboss.seam.init.Initialization.addComponent(Initialization.java:1139)

        Issue Links

          Activity

          Hide
          Stan Silvert
          added a comment -

          There are two problems with the numberguess example:
          1) It does not include the facelets jar. Before AS 5.2, numberguess was stealing a reference to this jar from the admin-console. But now with AS5.2, EAR isolation is on by default and numberguess needs to have its own copy of the facelets jar in WEB-INF/lib.

          2) JSF2 thinks that numberguess is trying to use the new Facelets version that ships with the JSF2 implementation. A way to fix this is to put an empty faces-config.xml in WEB-INF/lib that declares JSF 1.2 or earlier. So the following simple file would work:
          <?xml version="1.0"?>
          <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
          </faces-config>

          The bottom of this page shows the rules that the JSF impl uses to decide which version of Facelets is in use:
          https://javaserverfaces.dev.java.net/nonav/rlnotes/2.0.0/releasenotes.html

          So I looked to see how you are getting the numberguess EAR for your test. It looks like you just grab it from the Maven repo. This means that it has to be fixed on the Seam end. Either the app needs to be fixed as above or it needs a JSF2 version that uses the new Facelets.

          Show
          Stan Silvert
          added a comment - There are two problems with the numberguess example: 1) It does not include the facelets jar. Before AS 5.2, numberguess was stealing a reference to this jar from the admin-console. But now with AS5.2, EAR isolation is on by default and numberguess needs to have its own copy of the facelets jar in WEB-INF/lib. 2) JSF2 thinks that numberguess is trying to use the new Facelets version that ships with the JSF2 implementation. A way to fix this is to put an empty faces-config.xml in WEB-INF/lib that declares JSF 1.2 or earlier. So the following simple file would work: <?xml version="1.0"?> <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd "> </faces-config> The bottom of this page shows the rules that the JSF impl uses to decide which version of Facelets is in use: https://javaserverfaces.dev.java.net/nonav/rlnotes/2.0.0/releasenotes.html So I looked to see how you are getting the numberguess EAR for your test. It looks like you just grab it from the Maven repo. This means that it has to be fixed on the Seam end. Either the app needs to be fixed as above or it needs a JSF2 version that uses the new Facelets.
          Hide
          Pete Muir
          added a comment -

          Stan, the numberguess example is just a JSP/Faces example, no usage of Facelets (1 or 2).

          The Zip exception shows on all Seam and Web Beans wars, it is a bug in JBoss Web AFAIK. I did tell Jason about it and he said that the AS team had it replicated.

          Show
          Pete Muir
          added a comment - Stan, the numberguess example is just a JSP/Faces example, no usage of Facelets (1 or 2). The Zip exception shows on all Seam and Web Beans wars, it is a bug in JBoss Web AFAIK. I did tell Jason about it and he said that the AS team had it replicated.
          Hide
          Stan Silvert
          added a comment -

          Hmm. I thought Shelly was saying that the Zip exception was gone. I got numberguess to work by doing #1 and #2 as I stated above. However, it turns out that I only needed #2 since, as you point out, numberguess doesn't actually use Facelets. Truthfully, we shouldn't need #2 either in that case. So I think that part might be a bug in JSF.

          Since I exploded the EAR and the WAR, I never saw the ZipException and I still don't see it. But when I use Shelly's EAR, I do see a FileNotFoundException (access denied) on jars in WEB-INF/lib. I've seen this sort of thing before but I don't remember the solution. Hopefully, it will come back into my head.

          Show
          Stan Silvert
          added a comment - Hmm. I thought Shelly was saying that the Zip exception was gone. I got numberguess to work by doing #1 and #2 as I stated above. However, it turns out that I only needed #2 since, as you point out, numberguess doesn't actually use Facelets. Truthfully, we shouldn't need #2 either in that case. So I think that part might be a bug in JSF. Since I exploded the EAR and the WAR, I never saw the ZipException and I still don't see it. But when I use Shelly's EAR, I do see a FileNotFoundException (access denied) on jars in WEB-INF/lib. I've seen this sort of thing before but I don't remember the solution. Hopefully, it will come back into my head.
          Hide
          Stan Silvert
          added a comment -

          Looks like ZipException (Unix) and FileNotFoundException (Windows) is due to JBAS-7304 and JBAS-7148.

          You can work around the problem with numberguess using the faces-config.xml shown above.

          Show
          Stan Silvert
          added a comment - Looks like ZipException (Unix) and FileNotFoundException (Windows) is due to JBAS-7304 and JBAS-7148 . You can work around the problem with numberguess using the faces-config.xml shown above.
          Hide
          Stan Silvert
          added a comment -

          I've verified that JBAS-7148 fixes the ZipException/FileNotFoundException.

          The problem with numberguess looks like a JSF issue. I'll handle that separately.

          Show
          Stan Silvert
          added a comment - I've verified that JBAS-7148 fixes the ZipException/FileNotFoundException. The problem with numberguess looks like a JSF issue. I'll handle that separately.

            People

            • Assignee:
              Stan Silvert
              Reporter:
              Shelly McGowan
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: