1

I have an ear which currently works fine when deployed in JBoss 4.2.3. I am attempting to migrate to JBoss 5.0.1 but am getting the error 'classpath module listed in application.xml is not a recognized deployment'.

Below is the struture of my ear:

              MyApp
                |       
                +- classpath
                |       
                +- lib
                |   |
                |   +- A.jar
                |   +- B.jar
                |   +- C.jar
                |
                +- META-INF 
                |   |
                |   +- application.xml
                |   +- jboss-app.xml
                |
                +- D.jar
                |
                *- E.jar
                |
                +- F.jar
                |
                +- myApp.war
                    |
                    +- WEB-INF
                    |
                    +- ....

Below is what I have in my application.xml:

<application>
  <display-name>MyApp</display-name>
  <module>
    <java>classpath</java>
  </module>
  <module>
    <java>lib/A.jar</java>
  </module>
  <module>
    <java>lib/B.jar</java>
  </module>
  <module>
    <java>D.jar</java>
  </module>

  ...      

  <module>
    <web>
      <web-uri>myApp.war</web-uri>
      <context-root>/WEB-INF</context-root>
    </web>
  </module>
</application>

As mentioned the current structure of my ear and the application.xml outlined above, all works fine in JBoss 4.2.3. However, when I deploy this is JBoss 5.1.0 it appears not to like the 'classpath' module defined in the application.xml.

Below is the full stack trace occuring:

17:02:09,767 WARN  [HDScanner] Scan failed
    org.jboss.deployers.spi.DeploymentException: Exception determining structure: AbstractVFSDeployment(MyApp.ear)
        at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
        at org.jboss.deployers.structure.spi.helpers.AbstractStructuralDeployers.determineStructure(AbstractStructuralDeployers.java:85)
        at org.jboss.deployers.plugins.main.MainDeployerImpl.determineStructure(MainDeployerImpl.java:1004)
        at org.jboss.deployers.plugins.main.MainDeployerImpl.determineDeploymentContext(MainDeployerImpl.java:440)
        at org.jboss.deployers.plugins.main.MainDeployerImpl.addDeployment(MainDeployerImpl.java:390)
        at org.jboss.deployers.plugins.main.MainDeployerImpl.addDeployment(MainDeployerImpl.java:300)
        at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.addDeployment(MainDeployerAdapter.java:86)
        at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:344)
        at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
    Caused by: java.lang.RuntimeException: Error determining structure: MyApp.ear
        at org.jboss.deployment.EARStructure.determineStructure(EARStructure.java:293)
        at org.jboss.deployers.vfs.plugins.structure.StructureDeployerWrapper.determineStructure(StructureDeployerWrapper.java:73)
        at org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl.doDetermineStructure(VFSStructuralDeployersImpl.java:196)
        at org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl.determineStructure(VFSStructuralDeployersImpl.java:221)
        at org.jboss.deployers.structure.spi.helpers.AbstractStructuralDeployers.determineStructure(AbstractStructuralDeployers.java:77)
        ... 16 more
    Caused by: java.lang.RuntimeException: classpath module listed in application.xml is not a recognized deployment, .ear: MyApp.ear
        at org.jboss.deployment.EARStructure.determineStructure(EARStructure.java:277)
        ... 20 more

I'm tearing my hair out with this one! Any help would be greatly appreciated.

Thanks

2 Answers 2

1

The good news is that JBoss 5.x automatically adds any JARs in lib to the EAR's classpath, so you don't actually need to specify them in the application.xml.

For your classpath directory, you'll have to rename that to classpath.jar, and then 5.x should accept it.

1
  • 1
    Thanks for the response skaffman. You were right, classpath as a folder is rejected. I moved the property and xml files contained within it to my war and JBoss 5 accepted the application.xml. I've still got a few jar conflicts to resolve but I'll try and work through them. Thanks for the help! Mar 4, 2011 at 15:39
0

What is the

 <module>
    <java>classpath</java>
  </module>

You are referring to in the application.xml? This does not look like a valid jar archive name. Try removing this entry and redeploy.

2
  • JBoss 4.x was happy to let you add directories to the applicatiom.xml. v5 not so much.
    – skaffman
    Mar 4, 2011 at 10:20
  • Yes, JBoss 5 requires that the property and xml files contained within my classpath folder need to be moved into a jar. I've moved them into my war and it's fixed the problem! Onto the next issue... Mar 4, 2011 at 15:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.