openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Makas Tzavellas <>
Subject Using ant task mappingtool to generate tables
Date Mon, 25 Jun 2007 15:24:17 GMT
Hi everyone,

I'm trying to use mappingtool's ant task to generate tables for my 
entity classes. Problem is that it keeps complaining that my entity 
class does not have persistance metadata. The metadata is available as 
annotations in the entity class. Is it actually possible to generate 
tables using only the annotations in the entity class? Another thing is 
that I would like to avoid specifying the <class> element in the 
persistence.xml file as there are plans to dynamically drop new 
persistence classes while the application is running. Please advice!

This is the following error that I am getting.
Embedded error: <0.9.7-incubating fatal user error> 
org.apache.openjpa.util.MetaDataException: Type "class" does not have 
persistence metadata.

This is the entity class
@Table(name="MESSAGES", schema="MESSAGES")
public class MessageEntity
    @Id @GeneratedValue(strategy=GenerationType.SEQUENCE) @Column(name="ID")
    private long m_Id;
    private int m_Version; // This is used by JPA implementation to 
carry out optimistic locking.
    private MessageEntity m_Sibling;
    private String m_Status;


View raw message