Hello JBoss World,,
Please refer to my previous discussion "DeploymentException: 'No module with relative path' problem". I have just downloaded Jboss-6.0.0.Final and try to run my ear currently running on JBoss-5.1.0-GA without any problem with "persistence.xml". In my previous discusssion (at http://community.jboss.org/thread/160387), I thought the problem was only peculiar to JBoss-6.0.00CR, but jboss-6.0.0.Final continues to throw the same erorr as the following error shows:
12:05:42,291 INFO [PersistenceUnitValueMetaData] iDependOn persistence.unit:unitName=jboss-ejb3-timerservice-mk2.jar#timerdb
12:05:42,480 ERROR [AbstractKernelController] Error installing to PreReal: name=vfs:///opt/jboss/jboss-6.0.0.Final/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.Final/server/all/deploy/odmsEAR.ear [odmsWeb.war, odmsEJB.jar]
at org.jboss.deployment.ModuleNameDeployer.establishUniqueModuleName(ModuleNameDeployer.java:163) [:6.0.0.Final]
at org.jboss.deployment.ModuleNameDeployer.deploy(ModuleNameDeployer.java:118) [:6.0.0.Final]
DEPLOYMENTS IN ERROR:
Deployment "vfs:///opt/jboss/jboss-6.0.0.Final/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.Final/server/all/deploy/odmsEAR.ear [odmsWeb.war, odmsEJB.jar]
|- odmsJPA.jar [ contains the "persistence.xml", which works when removed and placed under my-ear/META-INF/]
Anyone facing the same problem?
Exactly the one I gave at http://community.jboss.org/thread/160387 but here it is:
<application...[too much to type here]>
Mind you I have been using it on JBoss-5.0.0 and then Jboss-5.1.0 for the past two year with no problem except with JBoss-6.0.0-CR and now Jboss-6.0.0.Final.
Please also see my workaround at http://community.jboss.org/thread/160387
I have seen your response on the “other thread”, but since that was about jboss-6.0.0-CR1which has now been superseded by Jboss-6.0.0.Final – albeit the same problem-- , could we use this thread for all further discussions – if you don't mind – but still use the other thread for reference?
IDE: Eclipse Helios (version: 3.6.1)
OS: Linux (Mandriva 2010)
Sure, let's continue the discussion in this thread.
This appears to be a bug to me. For some reason, the odmsJPA.jar is being considered a "module" (i.e. a web, EJB or app client module). Can you please create a JIRA https://issues.jboss.org/browse/JBAS and attach a sample application if possible?
jaikiran pai wrote:
No they won't be scanned implicitly. Anything under EAR/lib is plain java libraries unless explicitly specified (like for example as a module via application.xml)
Interesting. I just did a very quick test by just bluntly dumping an EJB JAR in the EAR/lib directory of an app I happened to be working on (JBoss AS 5.1), and see what happened. It seemed the EJBs were being processed here too. It eventually crapped out when it couldn't find the persistence unit referenced by some of the EJBs. (persistence.xml is included in that jar though).
So JBoss AS 5.1 too scans the EJBs in a jar in EAR/lib, but doesn't try to look for the persistence.xml file in that jar's META-INF.