4 Replies Latest reply on Oct 10, 2008 6:03 AM by alesj

    Error deploying RAR containing jaxb-xjc

      Ok, I'm sure the simple answer is, "take it out of your RAR," but

      1. it's a Maven artifact that I depend on, so I'd really like to not modify it if I don't have to
      2. It seems like a bug anyway.

      Stack trace says it all:

      14:17:08,264 INFO [JBossASKernel] Added bean(jboss.j2ee:ear=mule-jca-jboss-2.0.2.rar,jar=jaxb-xjc-2.0.jar,name=jaxb-xjc-2.0,service=EJB3) to KernelDeployment of: jaxb-xjc-2.0.jar
      14:17:08,266 ERROR [AbstractKernelController] Error installing to Real: name=vfsfile:/home/tnichols/dev/esb/jboss-5.0.0.CR2/server/default/deploy/esb/mule-jca-jboss.ear/ state=PreReal mode=Manual requiredState=Real
      org.jboss.deployers.spi.DeploymentException: Error during deploy: vfszip:/home/tnichols/dev/esb/jboss-5.0.0.CR2/server/default/deploy/esb/mule-jca-jboss.ear/mule-jca-jboss-2.0.2.rar/jaxb-xjc-2.0.jar/1.0/
       at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
       at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:175)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1285)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1003)
       at
      ...
      Caused by: java.lang.IllegalStateException: Expected either '.jar' or '.jar/' at the end of 1.0
       at org.jboss.ejb3.deployers.Ejb3ClientDeployer.getDeploymentJndiName(Ejb3ClientDeployer.java:211)
      
      


      So yes, it's odd that there is a "1.0" folder in the JAR, but even moreso that JBoss seems to think it's an embedded archive and is trying to deploy it. This same archive deployed fine in JBoss 4.2.

        • 1. Re: Error deploying RAR containing jaxb-xjc
          alesj

           

          "tomstrummer" wrote:

          So yes, it's odd that there is a "1.0" folder in the JAR, but even moreso that JBoss seems to think it's an embedded archive and is trying to deploy it. This same archive deployed fine in JBoss 4.2.

          Looks like JarStructure recognizes 1.0 as possible jar.
          Guessing that 1.0 has META-INF directory?

          Or you have DirStructure enabled?

          • 2. Re: Error deploying RAR containing jaxb-xjc

             

            "alesj" wrote:

            Looks like JarStructure recognizes 1.0 as possible jar.
            Guessing that 1.0 has META-INF directory?

            Or you have DirStructure enabled?


            Yup, there's definitely another META-INF directory under '1.0.' Like I said, it's odd that they do that, but unless there is some standard that says this is disallowed, I think JBoss5 is (unfortunately) going to have to learn to avoid it.

            The JAR in question (or at least, a version of it) can be found here:
            http://ibiblio.org/pub/packages/maven2/javax/xml/jaxb-xjc/2.0EA3/jaxb-xjc-2.0EA3.jar

            Although I have to ask... Once you've hit a JAR archive, do you really need to dig deeper? I've never heard of a JAR embedded in another JAR...

            I'm using whatever is configured for the "default" profile in JBoss5 CR2.

            Thanks for the response.

            • 3. Re: Error deploying RAR containing jaxb-xjc
              alesj

               

              "tomstrummer" wrote:

              Although I have to ask... Once you've hit a JAR archive, do you really need to dig deeper? I've never heard of a JAR embedded in another JAR...

              We treat .sar as a jar.
              And sar definitely embeds other jars as its deployment units.

              • 4. Re: Error deploying RAR containing jaxb-xjc
                alesj

                 

                "tomstrummer" wrote:

                Yup, there's definitely another META-INF directory under '1.0.' Like I said, it's odd that they do that, but unless there is some standard that says this is disallowed, I think JBoss5 is (unfortunately) going to have to learn to avoid it.

                The JAR in question (or at least, a version of it) can be found here:
                http://ibiblio.org/pub/packages/maven2/javax/xml/jaxb-xjc/2.0EA3/jaxb-xjc-2.0EA3.jar

                Apart from the solution that I'm gonna propose,
                I don't see what else you can do about it,
                except that you 'fix' this weird jar.

                What's actually going on here is the following thing:
                - 1.0 has META-INF dir --> recognized as jar
                - META-INF has manifest.mf, which has Main-Class attribute --> recignized as EJB Application Client
                - hence JBossClientMetaData is present --> Ejb3ClientDeployer tries to deploy it
                - Ejb3ClientDeployer complains about the 1.0 name, expecting only true .jar jars

                But this is what you can do to avoid this 1.0 being used as deployment.
                Use jboss-structure.xml in your app, describing what your actual deployments are.
                See some examples of this jboss-structutre.xml in our Microcontainer/Deployers project.