4 Replies Latest reply on Jan 7, 2009 9:33 AM by ssilvert

    Broken cargo-0.5.jar in GettingStarted guide

    wolfgangknauf

      Hello to everybody,

      it seems that http://www.jboss.org/jsfunit/gettingstarted.html (section "Package these jars in your WEB-INF/lib") links to a broken cargo-0.5.jar.
      I deployed my app through JSR88, and the jboss JSR88 client complained about multiple JAR entries. I finally found (with the help of winzip), that cargo-0.5.jar contains the file "META-INF\LICENSE" four times.

      Thanks

      Wolfgang

        • 1. Re: Broken cargo-0.5.jar in GettingStarted guide
          wolfgangknauf

          Here is the error message of the JBoss JSR88 deployer libraries:

          [java] 20:58:23,890 ERROR [DeploymentManagerImpl] Exception during deployment validation
           [java] java.util.zip.ZipException: duplicate entry: META-INF/LICENSE
           [java] at java.util.zip.ZipOutputStream.putNextEntry(Unknown Source)
           [java] at java.util.jar.JarOutputStream.putNextEntry(Unknown Source)
           [java] at org.jboss.deployment.spi.JarUtils.addJarEntry(JarUtils.java:79)
           [java] at org.jboss.deployment.spi.DeploymentManagerImpl.processSubModule(DeploymentManagerImpl.java:796)
           [java] at org.jboss.deployment.spi.DeploymentManagerImpl.createDeployment(DeploymentManagerImpl.java:512)
           [java] at org.jboss.deployment.spi.DeploymentManagerImpl.doDistribute(DeploymentManagerImpl.java:395)
           [java] at org.jboss.deployment.spi.DeploymentManagerImpl.distribute(DeploymentManagerImpl.java:359)
           [java] at org.jboss.deployment.spi.DeploymentManagerImpl.distribute(DeploymentManagerImpl.java:336)
           [java] at .... (my own code comes here)


          Best regards

          Wolfgang

          • 2. Re: Broken cargo-0.5.jar in GettingStarted guide
            ssilvert

            I haven't tried using JSR88 client with JSFUnit. I see your nice article on our wiki about it. Thanks for taking the time to do that.

            Will it work if you just delete the duplicate entries in cargo-0.5.jar?

            Perhaps we need to open a Jira against DeploymentManagerImpl so that it will ignore duplicate entries.

            Stan

            • 3. Re: Broken cargo-0.5.jar in GettingStarted guide
              wolfgangknauf

              Hi Stan,

              yes, removing the LICENSE helps (if deleting it with winzip, all entries disappear if deleting one).

              I have a modified version of the Eclipse3.4/WTP 3.0 JBoss plugin, which performs JSR88 deployment: http://www.informatik.fh-wiesbaden.de/~knauf/public/. The zip file on this page contains the classes + code + ant file to start a deployment. So, if you want to test the JSR88 error, it would be a good starting point.

              I think that as duplicate JAR entries cannot be created with standard Java code (ZipOutputStream would throw an error), this JAR must have been created by some other tool, and it is actually invalid. So working around the issue is probably not required, as this should never happen. There is probably no chance to correct it in the maven repo?

              Wolfgang

              • 4. Re: Broken cargo-0.5.jar in GettingStarted guide
                ssilvert

                 

                "Wolfgang Knauf" wrote:
                There is probably no chance to correct it in the maven repo?


                Actually, I think that's a pretty good idea. I can't change it in the Maven central repository. But before GA I need to gather all the JSFUnit dependencies and make sure they are present in the JBoss Maven repository. So I could fix the Cargo dependency before I upload to the JBoss repo. Then we just tell everyone to point to JBoss.

                Stan