Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » eclipse not creating table from jpa entities
eclipse not creating table from jpa entities [message #1321540] Tue, 29 April 2014 10:46
assouane khadija is currently offline assouane khadijaFriend
Messages: 1
Registered: April 2014
Junior Member
please I can't create a tables from my entities via eclipse link
I created a dynamic web project and then I configured the build path and the project Facets
here is my file persistence:
...........
<persistence-unit name="ProjetFinEtudes" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>


<class>com.ka.gdata.entities.Admin</class>
<class>com.ka.gdata.entities.Personne</class>
<class>com.ka.gdata.entities.Inscrit</class>
<class>com.ka.gdata.entities.Utilisateur</class>
<class>com.ka.gdata.entities.CleCry</class>
<class>com.ka.gdata.entities.MsgCry</class>




<properties>
<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver" />
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/pfe" />
<property name="javax.persistence.jdbc.user" value="root" />
<property name="javax.persistence.jdbc.password" value="" />

<!-- EclipseLink should create the database schema automatically -->
<property name="eclipselink.ddl-generation" value="create-tables" />
<property name="eclipselink.ddl-generation.output-mode" value="database" />
</properties>


</persistence-unit>
</persistence>


and Here the console after my attempt to create the tables:


[EL Config]: metadata: The access type for the persistent class [class com.ka.gdata.entities.Personne] is set to [PROPERTY].
[EL Config]: metadata: The access type for the persistent class [class com.ka.gdata.entities.MsgCry] is set to [FIELD].
[EL Config]: metadata: The target entity (reference) class for the many to one mapping element [field utilisateur] is being defaulted to: class com.ka.gdata.entities.Utilisateur.
[EL Config]: metadata: The access type for the persistent class [class com.ka.gdata.entities.Admin] is set to [PROPERTY].
[EL Config]: metadata: The access type for the persistent class [class com.ka.gdata.entities.Utilisateur] is set to [PROPERTY].
[EL Config]: metadata: The element [method getCleCry] is being defaulted to a one to one mapping.
[EL Config]: metadata: The target entity (reference) class for the one to one mapping element [method getCleCry] is being defaulted to: class com.ka.gdata.entities.CleCry.
[EL Config]: metadata: The element [method getMsgList] is being defaulted to a one to many mapping.
[EL Config]: metadata: The target entity (reference) class for the one to many mapping element [method getMsgList] is being defaulted to: class com.ka.gdata.entities.MsgCry.
[EL Config]: metadata: The access type for the persistent class [class com.ka.gdata.entities.Inscrit] is set to [PROPERTY].
[EL Config]: metadata: The access type for the persistent class [class com.ka.gdata.entities.CleCry] is set to [PROPERTY].
[EL Config]: metadata: The element [method getUtilisateur] is being defaulted to a one to one mapping.
[EL Config]: metadata: The target entity (reference) class for the one to one mapping element [method getUtilisateur] is being defaulted to: class com.ka.gdata.entities.Utilisateur.
[EL Config]: metadata: The alias name for the entity class [class com.ka.gdata.entities.Personne] is being defaulted to: Personne.
[EL Config]: metadata: The table name for entity [class com.ka.gdata.entities.Personne] is being defaulted to: PERSONNE.
[EL Config]: metadata: The column name for element [getId] is being defaulted to: ID.
[EL Config]: metadata: The column name for element [getPrenom] is being defaulted to: PRENOM.
[EL Config]: metadata: The column name for element [getPhone] is being defaulted to: PHONE.
[EL Config]: metadata: The column name for element [getEmail] is being defaulted to: EMAIL.
[EL Config]: metadata: The column name for element [getLogin] is being defaulted to: LOGIN.
[EL Config]: metadata: The column name for element [getPassword] is being defaulted to: PASSWORD.
[EL Config]: metadata: The column name for element [getNom] is being defaulted to: NOM.
[EL Config]: metadata: The alias name for the entity class [class com.ka.gdata.entities.MsgCry] is being defaulted to: MsgCry.
[EL Config]: metadata: The table name for entity [class com.ka.gdata.entities.MsgCry] is being defaulted to: MSGCRY.
[EL Config]: metadata: The column name for element [id] is being defaulted to: ID.
[EL Config]: metadata: The column name for element [msgCry] is being defaulted to: MSGCRY.
[EL Config]: metadata: The column name for element [idEmetteur] is being defaulted to: IDEMETTEUR.
[EL Config]: metadata: The column name for element [idRecepteur] is being defaulted to: IDRECEPTEUR.
Exception in thread "main" Local Exception Stack:
Exception [EclipseLink-30005] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: org.eclipse.persistence.dynamic.DynamicClassLoader@6f03ec
Internal Exception: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [ProjetFinEtudes] failed.
Internal Exception: Exception [EclipseLink-7161] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.ValidationException
Exception Description: Entity class [class com.ka.gdata.entities.MsgCry] 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 make sure that you do not have mixed access-type (both fields and properties annotated) in your entity class hierarchy.
at org.eclipse.persistence.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:127)
at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactoryImpl(PersistenceProvider.java:107)
at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:177)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:79)
at org.eclipse.jpt.jpa.eclipselink.core.ddlgen.Main.buildEntityManagerFactory(Main.java:94)
at org.eclipse.jpt.jpa.eclipselink.core.ddlgen.Main.execute(Main.java:80)
at org.eclipse.jpt.jpa.eclipselink.core.ddlgen.Main.main(Main.java:68)
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [ProjetFinEtudes] failed.
Internal Exception: Exception [EclipseLink-7161] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.ValidationException
Exception Description: Entity class [class com.ka.gdata.entities.MsgCry] 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 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.createPredeployFailedPersistenceException(EntityManagerSetupImpl.java:1954)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1945)
at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.callPredeploy(JPAInitializer.java:98)
at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactoryImpl(PersistenceProvider.java:96)
... 5 more
Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [ProjetFinEtudes] failed.
Internal Exception: Exception [EclipseLink-7161] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.ValidationException
Exception Description: Entity class [class com.ka.gdata.entities.MsgCry] 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 make sure that you do not have mixed access-type (both fields and properties annotated) in your entity class hierarchy.
at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:230)
... 9 more
Caused by: Exception [EclipseLink-7161] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.ValidationException
Exception Description: Entity class [class com.ka.gdata.entities.MsgCry] 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 make sure that you do not have mixed access-type (both fields and properties annotated) in your entity class hierarchy.
at org.eclipse.persistence.exceptions.ValidationException.noPrimaryKeyAnnotationsFound(ValidationException.java:1422)
at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.validatePrimaryKey(EntityAccessor.java:1536)
at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.processMappingAccessors(EntityAccessor.java:1243)
at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.process(EntityAccessor.java:697)
at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processStage2(MetadataProject.java:1793)
at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processORMMetadata(MetadataProcessor.java:576)
at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:585)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1869)
... 7 more

Previous Topic:Strange JAXB error message
Next Topic:JPA Diagram Editor Preferences not available
Goto Forum:
  


Current Time: Fri Feb 27 17:02:37 GMT 2015

Powered by FUDForum. Page generated in 0.01485 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software