[jboss-user] [EJB 3.0] New message: "Re: Issue specifying the <jar-file> in persistence.xml in JBOSS 5 on linux system"

Dragos Bobes do-not-reply at jboss.com
Mon Jan 11 12:11:58 EST 2010


User development,

A new message was posted in the thread "Issue specifying the &lt;jar-file&gt; in persistence.xml in JBOSS 5 on linux system":

http://community.jboss.org/message/519328#519328

Author  : Dragos Bobes
Profile : http://community.jboss.org/people/dbobes

Message:
--------------------------------------------------------------
I need to put the persistence.xml in ear's META-INF so I can extend the scope of the persistence unit to the entire ear because I am using it in the externalejbmodule.jar (see http://community.jboss.org/thread/146523).
 
I removed the name of the ear from the path ('<jar-file>myejbmodule.jar</jar-file>') and now it works fine on linux but it fails on windows.
These are the windows log entries:
 
11:55:02,097 DEBUG [AbstractInjectionValueMetaData] persistence.unit:unitName=myapp.ear/#myapppu: Contextual injection usage (class -> classloader): interface org.jboss.jpa.spi.XPCResolver -> BaseClassLoader at bd4dc2{vfsfile:/C:/work/tools/jboss-5.1.0.GA/server/default/conf/jboss-service.xml} defined by AbstractPropertyMetaData at 117065b{name=XPCResolver value=AbstractInjectionValueMetaData at a27851{value=null injectionType=BY_CLASS propertyMetaData=XPCResolver}}
11:55:02,113 INFO  [PersistenceUnitDeployment] Starting persistence unit persistence.unit:unitName=myapp.ear/#myapppu
11:55:02,113 ERROR [AbstractKernelController] Error installing to Start: name=persistence.unit:unitName=myapp.ear/#myapppu state=Create
java.lang.RuntimeException: could not find relative path: myejbmodule.jar
    at org.jboss.jpa.deployment.PersistenceUnitDeployment.getRelativeURL(PersistenceUnitDeployment.java:208)
    at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:267)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 
...
 
DEPLOYMENTS IN ERROR:
  Deployment "<UNKNOWN jboss.j2ee:ear=myapp.ear,jar=myapp.ear,name=Server,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=myapp.ear/#myapppu' **
  Deployment "persistence.unit:unitName=myapp.ear/#myapppu" is in error due to the following reason(s): java.lang.RuntimeException: could not find child 'myejbmodule.jar' on 'FileHandler at 24117815[path= context=file:/C:/work/tools/jboss-5.1.0.GA/server/default/deploy/ real=file:/C:/work/tools/jboss-5.1.0.GA/server/default/deploy/]'
 

 
Is there a way to have this configuration work on both environments?

--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/519328#519328




More information about the jboss-user mailing list