javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 1.0.1 (Build 20080905)): org.eclipse.persistence.exceptions.EntityManagerSetupException Exception Description: Predeployment of PersistenceUnit [EJBModel] failed. Internal Exception: Exception [EclipseLink-7161] (Eclipse Persistence Services - 1.0.1 (Build 20080905)): org.eclipse.persistence.exceptions.ValidationException Exception Description: Entity class [class orcl.Salgrade] has no primary key specified. It should define either an @Id, @EmbeddedId or an @IdClass. If you have defined PK using any of these annotations then please make sure that you do not have mixed access-type (both fields and properties annotated) in your entity class hierarchy.

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 hivmr.com by Unknown author, 1 year ago
an @Id, @EmbeddedId or an @IdClass. If you have defined PK using any of these annotations then please make sure that you do not have mixed access-type (both fields and properties annotated) in your entity class hierarchy.
via Google Groups by Gary, 5 months ago
Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.0.0.v20091127- r5931): org.eclipse.persistence.exceptions.EntityManagerSetupException Exception Description: Predeployment of PersistenceUnit [SchoolPU] failed. Internal Exception
via Stack Overflow by Josephkingstonleo Mariamicheal
, 2 years ago
: Exception [EclipseLink-7212] (Eclipse Persistence Services - 2.0.2.v20100323-r6872): org.eclipse.persistence.exceptions.ValidationException Exception Description: The attribute [updatedTime] from the entity class [class entity.Product] does not specify a temporal type. A temporal type must be specified for persistent fields or properties of type java.util.Date and java.util.Calendar.
via asquestion.com by Unknown author, 2 years ago
Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.3.v20110304-r9073): org.eclipse.persistence.exceptions.EntityManagerSetupException Exception Description: Predeployment of PersistenceUnit [PersonalProject] failed. Internal Exception
via Stack Overflow by Prasad Kharkar
, 2 years ago
Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.3.v20110304-r9073): org.eclipse.persistence.exceptions.EntityManagerSetupException Exception Description: Predeployment of PersistenceUnit [PersonalProject] failed. Internal Exception
via Eclipse Bugzilla by nan.n.li, 1 year ago
Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.0.v20100614-r7608): org.eclipse.persistence.exceptions.EntityManagerSetupException Exception Description: Predeployment of PersistenceUnit [DaliRuntimeProj] failed. Internal Exception
javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 1.0.1 (Build 20080905)): org.eclipse.persistence.exceptions.EntityManagerSetupException Exception Description: Predeployment of PersistenceUnit [EJBModel] failed. Internal Exception: Exception [EclipseLink-7161] (Eclipse Persistence Services - 1.0.1 (Build 20080905)): org.eclipse.persistence.exceptions.ValidationException Exception Description: Entity class [class orcl.Salgrade] has no primary key specified. It should define either an @Id, @EmbeddedId or an @IdClass. If you have defined PK using any of these annotations then please make sure that you do not have mixed access-type (both fields and properties annotated) in your entity class hierarchy.
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:870)
at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.callPredeploy(JPAInitializer.java:101)
at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.initPersistenceUnits(JPAInitializer.java:149)
at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.initialize(JPAInitializer.java:135)
at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:104)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
at orcl.JavaServiceFacade.init(JavaServiceFacade.java:11)
at orcl.JavaServiceFacade.main(JavaServiceFacade.java:17)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

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