3 Replies Latest reply on Dec 29, 2010 12:32 PM by ebross

    DeploymentException: 'No module with relative path' problem

    ebross

      Hello JBoss World,  I have just set up JBossAS [6.0.0.20101110-CR1 "Neo"] on Linux. I have an ear, currently running in production, happily, for over a year on JBoss-5.1.0.GA (and JBoss-5.0.0 before that)  without any major problem.  Now I have updated the libraries, dtds etc and try to deploy the same ear file on JBoss-6.0.0-CR1 but I am getting the following problems:

       

      10:55:13,500 INFO  [PersistenceUnitValueMetaData] iDependOn persistence.unit:unitName=jboss-ejb3-timerservice-mk2.jar#timerdb 10:55:13,725 ERROR [AbstractKernelController] Error installing to PreReal: name=vfs:///opt/jboss/jboss-6.0.0-CR1/server/all/deploy/odmsEAR.ear state=PostClassLoader mode=Manual requiredState=PreReal: org.jboss.deployers.spi.DeploymentException: No module with relative path lib/odmsJPA.jar found  in set of modules for vfs:///opt/jboss/jboss-6.0.0-CR1/server/all/deploy/odmsEAR.ear [odmsEJB.jar, odmsWeb.war]   

       

      at org.jboss.deployment.ModuleNameDeployer.establishUniqueModuleName(ModuleNameDeployer.java:163) [:6.0.0.20101110-CR1] at org.jboss.deployment.ModuleNameDeployer.deploy(ModuleNameDeployer.java:118) [:6.0.0.20101110-CR1]      at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.0.Alpha8]      at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832) [:2.2.0.Alpha8]      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550) [:2.2.0.Alpha8]      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1603) [:2.2.0.Alpha8]

       

       

      DEPLOYMENTS IN ERROR:   Deployment "vfs:///opt/jboss/jboss-6.0.0-CR1/server/all/deploy/odmsEAR.ear" is in error due to the following reason(s): org.jboss.deployers.spi.DeploymentException: No module with relative path lib/odmsJPA.jar found  in set of modules for vfs:///opt/jboss/jboss-6.0.0-CR1/server/all/deploy/odmsEAR.ear [odmsEJB.jar, odmsWeb.war] 

       

      Please see the full 'myserver.log' attached.  

       

      Here is my ear packaging structure 

      [my-ear] 

      - [lib]     

           |- odmsJPA.jar     

           |- odmsUtils.jar 

      - [META-INF]      

           |- application.xml     

           |- jboss-application.xml 

      - odmsEJB.jar 

      - odmsWeb.jar 

      - odmsEJBClient.jar 


      Here is also is my 'application.xml':

       

      <application...[too much to type here]>

      <display-name>odmsEAR<display-name>

      <module>

      <ejb>odmsEJB.jar</ejb>

      </module>

      <module>

      <web>

      <web-url>odmsWeb.war</web-url>

      <context-root> odmsWeb</context-root>      

      </web>

      <module>

      </application>

       

      For some reason aka "Neo" is treating the odmsJPA.jar  as a module which it is not. This happens whether I create the odmsJPA as JPA or Utility project. I think it is a bug but I am not sure hence this discussion. Has anyone encountered this problem using  JBossAS [6.0.0.20101110-CR1 "Neo"]? Please add your two cents to the discussion!

       

      Thanks.   

        • 1. Re: DeploymentException: 'No module with relative path' problem
          ebross

          Over 14,500 downloads before me and yet no one has encountered this problem?  Oh well, I guess, I have to respond to myself.

           

          According to JSR 317, “A persistence unit is defined by a persistence.xml” And  file root of  a  persistence unit could be in "a jar file in the EAR library directory". However, this does not work in JBoss-6.0.0-CR1. The following exception is thrown:

           

          “...DeploymentException: 'No module with relative path' /lib/odmsJPA.jar.”

           

          I noted that this exception is not thrown when 'odmsJPA.jar' does not contain 'persistence.xml'.

           

          My workaround is to move persistence.xml from my JPA-JAR file to my EAR/META-INF directory. I also had to edit my persistence.xml to prefix with “/lib/odmsJPA.jar#” as follows

           

          <persistence-unit name="/lib/odmsJPA.jar#odmsPersistenceUnit" transaction-type="JTA">
          <jar-file>/lib/odmsJPA.jar</jar-file>

           

          I don't like it, but it works. I believe this is a JBoss-6.0.0-CR1 bug, right? I need consensus before I file it as a bug.

          • 2. Re: DeploymentException: 'No module with relative path' problem
            jaikiran

            10:55:13,725 ERROR [AbstractKernelController] Error installing to  PreReal:  name=vfs:///opt/jboss/jboss-6.0.0-CR1/server/all/deploy/odmsEAR.ear  state=PostClassLoader mode=Manual requiredState=PreReal:  org.jboss.deployers.spi.DeploymentException: No module with relative  path lib/odmsJPA.jar found  in set of modules for  vfs:///opt/jboss/jboss-6.0.0-CR1/server/all/deploy/odmsEAR.ear  [odmsEJB.jar, odmsWeb.war]  

             

            at  org.jboss.deployment.ModuleNameDeployer.establishUniqueModuleName(ModuleNameDeployer.java:163)

            This is a new piece of code introduced in AS6 (as compared to AS5). There might be some issue in there. I'll take a look later tomorrow at the code (am away currently).

            • 3. Re: DeploymentException: 'No module with relative path' problem
              ebross