1 Reply Latest reply on Jan 8, 2014 3:47 AM by Chaithanya Narayana

    ClassLoading Issue during migration from 4.2.1-GA to AS 6.0.1.Final

    Chaithanya Narayana Newbie

      I'm trying to migrate my application from JBoss 4.2.1-GA to AS 6.0.1.Final. I initially had few jar conflicts and DTD compliance issues which were fixed. But right now, I'm blocked with this issue which i've no clue about. I deployed the same .ear file that was working properly in Jboss 4 and deployed it onto a jboss 6 instance ( 'app' is a clone of 'default' server profile). I get the below mentioned error when i try to start my server

       

      Error Trace:

      09:16:30,800 ERROR [AbstractKernelController] Error installing to PostClassLoader: name=vfs:///myhome/JBoss_Working_Copy/jboss-6.1.0.Final/server/app/deploy/Trunk_app.ear state=ClassLoader mode=Manual requiredState=PostClassLoader: org.jboss.deployers.spi.DeploymentException: Cannot process metadata

              at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49) [:2.2.2.GA]

              at org.jboss.deployment.AnnotationMetaDataDeployer.deploy(AnnotationMetaDataDeployer.java:188) [:6.1.0.Final]

              at org.jboss.deployment.AnnotationMetaDataDeployer.deploy(AnnotationMetaDataDeployer.java:95) [:6.1.0.Final]

              at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.2.GA]

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832) [:2.2.2.GA]

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550) [:2.2.2.GA]

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1603) [:2.2.2.GA]

              at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491) [:2.2.2.GA]

              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.SP2]



      DEPLOYMENTS IN ERROR
      :
      Deployment "vfs:///myhome/JBoss_Working_Copy/jboss-6.1.0.Final/server/app/deploy/Trunk_app.ear" is in error due to the following reason(s): java.lang.ClassNotFoundException: ${project.main.class} from BaseClassLoader@46a2b249{vfs:///myhome/JBoss_Working_Copy/jboss-6.1.0.Final/server/app/deploy/Trunk_app.ear}

      at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:905) [:2.2.2.GA]
              at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:87) [:6.1.0.Final]
              at org.jboss.profileservice.deployment.ProfileDeployerPluginRegistry.checkAllComplete(ProfileDeployerPluginRegistry.java:107) [:0.2.2]
              at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:135) [:6.1.0.Final]
              at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.1.0.Final]
              at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]
              at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]
              at java.lang.Thread.run(Thread.java:662) [:1.6.0_35]

      It doesn't even print the class name that it is looking for. It is just trying to look for a class called ' ${project.main.class} '. Can someone please help here? Where should I start investigating this issue? Should this weird class name be coming from any of the contents inside the numerous war files i've inside my ear?

       

      Below is the struture of my ear:

        MyApp.ear
        | 
       
      +- properties
        |    +- com
        
      |     +- App1 
      +- A.properties 
      | +- B.properties 
       
      +- lib 
      | +- A.jar
        
      |   +- B.jar
       
      |   +- C.jar 
      |
       
      +- META-INF 
      |   +- application.xml 
       
      |   +- jboss-app.xml
        |
        +- war
         |   +- D.war
        
      |   +- E.war 
      |   +- F.war 
        |

      +- ejb 
      |   +- G.jar 
      |   +- H.jar 
      |   +- I.jar 

       

      Any pointers in this regards is highly appreciated. Thanks.

        • 1. Re: ClassLoading Issue during migration from 4.2.1-GA to AS 6.0.1.Final
          Chaithanya Narayana Newbie

          As an attempt to get past the issue, I develop a simple web application and packaged it into an .ear file. The XMLs inside the .ear file are Java EE 6 compliant (namely, application.xml). The .ear has only 'META-INF' and 'war' folders inside it. META-INF has only a manifest and 'war' folder has a simple war with the 'Hello World' web application in it. This works fine on my JBoss AS 6. Using this .ear, I slowly migrated my contents onto it war by war and adding only minimal stuff required to start the server. So, I assume it could be something to do with the new Java EE 6 compliance issues or some other weird stuff, given the size of the application and the no. of jars involved inside it. So, it is better to break the application into smaller workable modules and migrate them.

           

          Just posting in case someone is stuck with a similar issue.