开发者

migrating from JBoss 4.2.3 to 5.1 - module listed in application.xml is not a recognized deployment

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</j开发者_如何转开发ava>
  </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


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜