[jboss-jira] [JBoss JIRA] (AS7-3423) persistence providers deployed with applications should be available via javax.persistence.Persistence api

Bernard Labno (JIRA) jira-events at lists.jboss.org
Thu Feb 23 11:36:36 EST 2012


    [ https://issues.jboss.org/browse/AS7-3423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670370#comment-12670370 ] 

Bernard Labno commented on AS7-3423:
------------------------------------

Scott I've tested branch AS7-3423_deploymentWithJavaXPersistence_4 but it didn't solve the problem to the end.
I'm running seam2 on as7 with hibernate3 bundled with app. If I add ehcache as second-level cache i get this exception:

Caused by: net.sf.ehcache.CacheException: Another unnamed CacheManager already exists in the same VM. Please provide unique names for each CacheManager in the config or do one of following:1. Use one of the CacheManager.create() static factory methods to reuse same CacheManager with same name or create one if necessary2. Shutdown the earlier cacheManager before creating new one with same name.The source of the existing CacheManager is: DefaultConfigurationSource [ ehcache.xml or ehcache-failsafe.xml ]
at net.sf.ehcache.CacheManager.assertNoCacheManagerExistsWithSameName(CacheManager.java:457) [ehcache-core-2.5.1.jar:]
at net.sf.ehcache.CacheManager.init(CacheManager.java:354) [ehcache-core-2.5.1.jar:]
at net.sf.ehcache.CacheManager.<init>(CacheManager.java:242) [ehcache-core-2.5.1.jar:]
at net.sf.ehcache.hibernate.EhCacheRegionFactory.start(EhCacheRegionFactory.java:70) [ehcache-core-2.5.1.jar:]

It looks like the persistence unit is being initialized twice. I'm attaching both my server.log and sample project sources.
                
> persistence providers deployed with applications should be available via javax.persistence.Persistence api
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: AS7-3423
>                 URL: https://issues.jboss.org/browse/AS7-3423
>             Project: Application Server 7
>          Issue Type: Task
>          Components: JPA / Hibernate
>            Reporter: Scott Marlow
>            Assignee: Scott Marlow
>              Labels: eap6
>             Fix For: 7.1.1.Final
>
>         Attachments: sample.tar.bz2, server.log
>
>
> If an application deployment contains its own copy of a persistence provider, make it possible for the application to access the persistence provider via the javax.persistence.Persistence.
> https://github.com/alesj/jboss-as/tree/capedwarf contains some related changes that might be worth looking at when this jira is worked around.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list