org.hibernate.exception.ConstraintViolationException: could not insert: [introducaohibernate01.Professor]

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

Samebug tips

,
Expert tip

Try downgrading PostgresSQL server to 9.5 or update your PostgresSQL driver to 9.4-1211 with the following command: <postgresql.version>9.4.1211</postgresql.version>

Solutions on the web

via hibernate.org by Unknown author, 1 year ago
via Coderanch by Bharath Gowda, 11 months ago
via soso.io by Unknown author, 1 year ago
could not insert: [org.hibernate.model.Student]
via Stack Overflow by bunnyjesse112
, 2 years ago
could not insert: [entity.PurchaseOrder]
via JIRA by Kostas Karkaletsis, 1 year ago
could not insert: [eu.epsos.configmanager.database.model.Property]
org.hibernate.exception.ConstraintViolationException: could not insert: [introducaohibernate01.Professor]
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1592)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1327)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:192)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:451)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:350)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2250)
at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:56)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:234)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at introducaohibernate01.ProfessorDAO.salvarProfessor(ProfessorDAO.java:20)
at introducaohibernate01.Main.main(Main.java:42)

Users with the same issue

25 times, 11 months ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
22 times, 5 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
102 more bugmates

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