-
1. Re: one persistence.xml multiple jars with entity beans
fhh May 9, 2007 10:16 AM (in response to pmadzik)According to specs you can also lists jars. Lasst time I cheked this was not implemented (yet).
Regards
Felix -
2. Re: one persistence.xml multiple jars with entity beans
pmadzik May 11, 2007 2:13 AM (in response to pmadzik)I tried "jar-file" element as well but it seems to be buggy because it seek for jar in $JBOSS_HOME/bin rather than in EAR
It is jira issue http://jira.jboss.com/jira/browse/EJBTHREE-560 but with resolution "Cannot Reproduce Bug". -
3. Re: one persistence.xml multiple jars with entity beans
jc7442 May 11, 2007 10:36 AM (in response to pmadzik)It is http://jira.jboss.com/jira/browse/EJBTHREE-724. Unfortunately it is not fixed yet.
Is there a workaround ??? -
4. Re: one persistence.xml multiple jars with entity beans
wolfc May 11, 2007 11:07 AM (in response to pmadzik)It's fixed in AS 4.2. Try it out on the latest version.
-
5. Re: one persistence.xml multiple jars with entity beans
jc7442 May 14, 2007 4:31 AM (in response to pmadzik)I'm afraid it has not been fixed in 4.2.
I've just download it. I still have the exception:10:25:07,787 WARN [ServiceController] Problem starting service persistence.units:ear=itests-ear-1.0-SNAPSHOT.ear,unitName=audittrail java.lang.RuntimeException: error trying to scan <jar-file>: file:/D:/jboss-4.2.0.GA/bin/babar.j2ee-1.0-SNAPSHOT.jar at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:619) at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:338) at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:126) at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:246) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:103)
My persistence.xml is:?xml version="1.0" encoding="UTF-8"?> <persistence> <persistence-unit name="demo"> ... </persistence-unit> <persistence-unit name="audittrail"> <jta-data-source>java:/MyDS</jta-data-source> <properties> <property name="hibernate.hbm2ddl.auto" value="update"/> </properties> <jar-file>babar.j2ee-1.0-SNAPSHOT.jar</jar-file> </persistence-unit> </persistence>
Is there a workaround for that ? -
6. Re: one persistence.xml multiple jars with entity beans
wolfc May 14, 2007 10:49 AM (in response to pmadzik)Ah, the unit tests are wrong. They have ../ in front of the jar file. I've added this as a workaround in http://jira.jboss.com/jira/browse/EJBTHREE-724.
-
7. Re: one persistence.xml multiple jars with entity beans
jc7442 May 14, 2007 11:01 AM (in response to pmadzik)OK, with the workaround it works.
Thanks