2 Replies Latest reply on Dec 4, 2008 9:23 AM by peterbr

    IllegalStateException when EAR contains RAR

    peterbr

      I am in the process of migrating an EJB 2 application from JBoss 4.2.3.GA to JBoss 5.0.0.CR2.
      One of the issues I encounter is the following message during startup:

      2008-12-04 10:57:51,547 ERROR [AbstractKernelController] (main:) Error installing to Real: name=vfszip:/C:/Java/jboss-5.0.0.CR2/server/default/deploy/userxs2/userxs2.ear state=PreReal mode=Manual requiredState=Real
      org.jboss.deployers.spi.DeploymentException: Error during deploy: vfszip:/C:/Java/jboss-5.0.0.CR2/server/default/deploy/userxs2/userxs2.ear/kodo.rar
      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 org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1056)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:944)
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:627)
      at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:541)
      at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:265)
      at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:143)
      at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:409)
      at org.jboss.Main.boot(Main.java:209)
      at org.jboss.Main$1.run(Main.java:544)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.IllegalStateException: Expected either '.jar' or '.jar/' at the end of kodo.rar
      at org.jboss.ejb3.deployers.Ejb3ClientDeployer.getDeploymentJndiName(Ejb3ClientDeployer.java:211)
      at org.jboss.ejb3.deployers.Ejb3ClientDeployer.deploy(Ejb3ClientDeployer.java:101)
      at org.jboss.ejb3.deployers.Ejb3ClientDeployer.deploy(Ejb3ClientDeployer.java:60)
      at org.jboss.deployers.vfs.spi.deployer.AbstractSimpleVFSRealDeployer.deploy(AbstractSimpleVFSRealDeployer.java:56)
      at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
      at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
      at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:169)
      ... 19 more
      2008-12-04 10:57:51,594 ERROR [ProfileServiceBootstrap] (main:) Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

      *** CONTEXTS IN ERROR: Name -> Error

      vfszip:/C:/Java/jboss-5.0.0.CR2/server/default/deploy/userxs2/userxs2.ear -> java.lang.IllegalStateException: Expected either '.jar' or '.jar/' at the
      end of kodo.rar

      while this works fine with JBoss 4.2.3.GA.

      The EAR's META-INF\application.xml contains:

       <module>
       <connector>kodo.rar</connector>
       </module>
      


      I bundled the RAR into the EAR to achieve class loader isolation.

      This problem is similar to (and possibly the same as) http://www.jboss.com/index.html?module=bb&op=viewtopic&t=143588

      Is this a bug?
      Is there a workaround to keep the RAR inside the EAR, or should I take it out, again? Will I still class loader isolation then?

      Thanks in advance.

        • 1. Re: IllegalStateException when EAR contains RAR
          alesj

           

          "peterbr" wrote:

          Is there a workaround to keep the RAR inside the EAR, or should I take it out, again?

          This is the cause:
          "alesj" wrote:

          - kodo.rar/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

          Removing that Main-Class attribute should do the trick.

          • 2. Re: IllegalStateException when EAR contains RAR
            peterbr

            Thank you, that works much better!

            -Peter.