Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "CDO/Hibernate Store/Troubleshooting"

(My JPA annotation XML file is not visible to Teneo, I see related exceptions in the log)
Line 17: Line 17:
 
Make sure that:
 
Make sure that:
 
* the relevant property (teneo.mapping.persistence_xml)is set in the cdo-server.xml, the value must be a classpath path, for example: /org/eclipse/emf/cdo/hibernate/annotations/annotations.xml (if the annotations.xml is located in the org.eclipse.emf.cdo.hibernate.annotations package.
 
* the relevant property (teneo.mapping.persistence_xml)is set in the cdo-server.xml, the value must be a classpath path, for example: /org/eclipse/emf/cdo/hibernate/annotations/annotations.xml (if the annotations.xml is located in the org.eclipse.emf.cdo.hibernate.annotations package.
/META-INF/company_model_teneo_annotations.xml
+
* the package/path in which the annotations xml file is present must be exported by the plugin. An alternative is to place the annotations xml file in the /META-INF directory of the plugin then it is copied to the output path automatically.
 
* the annotations xml file is copied to the output path, it should be explicitly flagged in the build.properties in the bin.includes/binary build part
 
* the annotations xml file is copied to the output path, it should be explicitly flagged in the build.properties in the bin.includes/binary build part
 
* the plugin which contains the annotations xml should depends on the org.eclipse.emf.cdo.server.hibernate.teneo plugin
 
* the plugin which contains the annotations xml should depends on the org.eclipse.emf.cdo.server.hibernate.teneo plugin

Revision as of 21:42, 20 January 2010

This page lists common issues which you can encounter when using the CDO Hibernate Store.

My database does not get created

Hibernate will not create the database for you, you have to manually create a database. You don't need to create the tables and other database schema parts. That's done by hibernate.

Hibernate drops my database when the application stops

This is probably the hibernate.hbm2ddl.auto property in the cdo-server.xml, change it from 'create-drop' to 'update'.

JPA Annotations in the model are not picked up by Teneo

To make the JPA annotations in the model visible you need to regenerate the java code. EMF creates the in-memory ecore package using the generated java code (depends on a configuration setting) and not the original ecore file.

My JPA annotation XML file is not visible to Teneo, I see related exceptions in the log

Make sure that:

  • the relevant property (teneo.mapping.persistence_xml)is set in the cdo-server.xml, the value must be a classpath path, for example: /org/eclipse/emf/cdo/hibernate/annotations/annotations.xml (if the annotations.xml is located in the org.eclipse.emf.cdo.hibernate.annotations package.
  • the package/path in which the annotations xml file is present must be exported by the plugin. An alternative is to place the annotations xml file in the /META-INF directory of the plugin then it is copied to the output path automatically.
  • the annotations xml file is copied to the output path, it should be explicitly flagged in the build.properties in the bin.includes/binary build part
  • the plugin which contains the annotations xml should depends on the org.eclipse.emf.cdo.server.hibernate.teneo plugin

Relevant links for more information



Wikis: CDO | Net4j | EMF | Eclipse

Copyright © Eclipse Foundation, Inc. All Rights Reserved.