[
https://hibernate.onjira.com/browse/HHH-7134?page=com.atlassian.jira.plug...
]
Didier Villevalois commented on HHH-7134:
-----------------------------------------
I forgot the stack trace:
javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build
EntityManagerFactory
at
org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914)
at
org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889)
at
org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:56)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:47)
at
org.clinigrid.jpa.test.fkcircularity.FKCircularityTest.test(FKCircularityTest.java:14)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.hibernate.AnnotationException: Foreign key circularity dependency involving
the following tables:
at
org.hibernate.cfg.Configuration.buildRecursiveOrderedFkSecondPasses(Configuration.java:1493)
at org.hibernate.cfg.Configuration.processFkSecondPassInOrder(Configuration.java:1432)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1358)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1727)
at
org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:88)
at
org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)
... 24 more
Detection of wrong circularity when two tables with same name in
different schemas
----------------------------------------------------------------------------------
Key: HHH-7134
URL:
https://hibernate.onjira.com/browse/HHH-7134
Project: Hibernate ORM
Issue Type: Bug
Components: core
Affects Versions: 4.1.0
Environment: Hibernate 4.1.0.Release, any database
Reporter: Didier Villevalois
Priority: Blocker
Attachments: 0001-Fix-FKSecondPass-processing-to-take-catalog-and-sche.patch,
jpa-test-fkcircularity.zip
There is a problem when two related (in terms of joins) classes have the same name in
different schemas.
Attached is a test maven project (run "mvn package" to run the tests) and a fix
patch for hibernate-core (based on bc643ddb7cc28db05a7168673746dbf3edee6cf7).
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira