[
http://opensource.atlassian.com/projects/hibernate/browse/EJB-325?page=co...
]
Max Rydahl Andersen commented on EJB-325:
-----------------------------------------
being able to print out which of possible many available persistence units on the
classpath that is relevant for the current entitymanager.
This is primarily to debug what the autodiscovery actually discovered and if you are
running multiple entitymanagers logs are not enough if I can't link a specific
instance to which of the many autodiscovered and/or manually/explicit configured
EntityManagers i'm currently holding on to.
Any PersistenceExceptions should state which persistenceunit they are
from
--------------------------------------------------------------------------
Key: EJB-325
URL:
http://opensource.atlassian.com/projects/hibernate/browse/EJB-325
Project: Hibernate Entity Manager
Issue Type: New Feature
Affects Versions: 3.3.2.Beta1
Reporter: Max Rydahl Andersen
Fix For: 3.3.2.Beta2
example from booting seam with multiple persistence.xml's in play:
FAILED CONFIGURATION: @BeforeClass init
javax.persistence.PersistenceException: org.hibernate.HibernateException: Hibernate
Dialect must be explicitly set
at
org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:698)
at
org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
at
org.jboss.seam.persistence.EntityManagerFactory.createEntityManagerFactory(EntityManagerFactory.java:85)
at
org.jboss.seam.persistence.EntityManagerFactory.startup(EntityManagerFactory.java:50)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
at org.jboss.seam.Component.callComponentMethod(Component.java:2082)
at org.jboss.seam.Component.callCreateMethod(Component.java:1997)
at org.jboss.seam.Component.newInstance(Component.java:1968)
at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:95)
at org.jboss.seam.init.Initialization.init(Initialization.java:555)
at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:939)
at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
Caused by: org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
at org.hibernate.dialect.DialectFactory.determineDialect(DialectFactory.java:57)
at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:39)
at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:409)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:119)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2006)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1289)
at
org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:691)
... 41 more
... Removed 26 stack frames
No context whatsoever on what persistence unit out of 2 that is the culrpit.
javax.persistence.PersistenceException: [test1unit] org.hibernate.HibernateException:
Hibernate Dialect must be explicitly set
would have saved me alot of time ,)
--
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