javax.persistence.PersistenceException: [PersistenceUnit: mysql_hbm] Unable to build Hibernate SessionFactory

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 Pawel Solarski, 1 year ago
[PersistenceUnit: mysql_hbm] Unable to build Hibernate SessionFactory
via Stack Overflow by Joshua Taylor
, 2 years ago
[PersistenceUnit: unit] Unable to build Hibernate SessionFactory
via Hibernate JIRA by Luca Domenichini, 1 year ago
[PersistenceUnit: TestPU] Unable to build Hibernate SessionFactory
via Hibernate JIRA by Jo Mei, 1 year ago
[PersistenceUnit: hibernate5example] Unable to build Hibernate SessionFactory
via Hibernate JIRA by Luca Domenichini, 1 year ago
[PersistenceUnit: TestPU] Unable to build Hibernate SessionFactory
via Hibernate JIRA by Karl-Philipp Richter, 3 months ago
[PersistenceUnit: persistence1] Unable to build Hibernate SessionFactory
org.hibernate.MappingException: Composite-id class must implement Serializable: jpa.advanced.EmployeeInfo
at org.hibernate.mapping.RootClass.checkCompositeIdentifier(RootClass.java:291)
at org.hibernate.boot.internal.MetadataImpl.validate(MetadataImpl.java:329)
at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:482)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:888)
at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:58)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55)
at jpa.JPARunner.(JPARunner.java:18)
at jpa.advanced.DerivedIdExample.(DerivedIdExample.java:11)
at jpa.advanced.DerivedIdExample.main(DerivedIdExample.java:14)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)

Users with the same issue

7 times, 3 months ago
3 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago

Write tip

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