[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4864?page=c...
]
Bouiaw commented on HHH-4864:
-----------------------------
On our side, we implemented at Spring level a ScanningPersistenceManager, source code
available on
http://bitbucket.org/ilabs/resthub/src/tip/resthub-core/src/main/java/org...
"Cannot read files twice on NativeScanner" exception when
using multiple persistence.xml
----------------------------------------------------------------------------------------
Key: HHH-4864
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4864
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.5.0-Beta-3
Reporter: Bouiaw
When subclassing DefaultPersistenceUnitManager as described in
http://ancientprogramming.blogspot.com/2007/05/multiple-persistencexml-fi... in
order to have my entities in different jars, Hibernate 3.5-Beta3 throw the following
exception (it worked with previous version of Hibernate) :
java.lang.RuntimeException: error trying to scan <jar-file>:
file:/Users/bouiaw/resthub/resthub-core/target/classes/
at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:700)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:465)
at
org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:165)
at
org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:225)
at
org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:288)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1457)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1397)
... 51 more
Caused by: org.hibernate.AssertionFailure: Cannot read files twice on NativeScanner
at org.hibernate.ejb.packaging.NativeScanner.getFilesInJar(NativeScanner.java:168)
at org.hibernate.ejb.Ejb3Configuration.addScannedEntries(Ejb3Configuration.java:393)
at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:697)
... 57 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira