[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4864) "Cannot read files twice on NativeScanner" exception when using multiple persistence.xml

Fred L (JIRA) noreply at atlassian.com
Thu Feb 11 05:33:29 EST 2010


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4864?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=35534#action_35534 ] 

Fred L commented on HHH-4864:
-----------------------------

Seems to be the same bug in 3.5.0-CR-1

> "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-files-and.html 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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list