javax.persistence.PersistenceException: [PersistenceUnit: testunit] Unable to build EntityManagerFactory

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Hibernate JIRA by Daniel Nuß, 1 year ago
[PersistenceUnit: testunit] Unable to build EntityManagerFactory
via Hibernate JIRA by Daniel Nuß, 1 year ago
[PersistenceUnit: testunit] Unable to build EntityManagerFactory
via Hibernate JIRA by Mattias Avelin, 6 months ago
[PersistenceUnit: iwebPU] Unable to build EntityManagerFactory
via redhat.com by Unknown author, 1 year ago
via Stack Overflow by daniel9x
, 1 year ago
[PersistenceUnit: efcEntityManagerLocal] Unable to build EntityManagerFactory
via algaworks.com by Unknown author, 1 year ago
[PersistenceUnit: ClimaPU] Unable to build EntityManagerFactory
org.hibernate.MappingException: property mapping has wrong number of columns: com.usertyperegistration.Foo.bar type: org.joda.time.Interval
at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:484)
at org.hibernate.mapping.RootClass.validate(RootClass.java:270)
at org.hibernate.cfg.Configuration.validate(Configuration.java:1324)
at org.hibernate.ejb.EntityManagerFactoryImpl.(EntityManagerFactoryImpl.java:96)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:899)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63)
at com.usertyperegistration.FooTest.setUpClass(FooTest.java:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
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)

Users with the same issue

4 times, 7 months ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.