openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pinaki Poddar" <>
Subject RE: Using ant task mappingtool to generate tables
Date Mon, 25 Jun 2007 16:16:51 GMT
> Is it actually possible to generate tables using only the annotations
in the entity class?

Please post the log and stack trace with <property name="openjpa.Log"
Also the snippet of the Ant target you are invoking for mappingtool.
Please note that alternatively
<java classname="org.apache.openjpa.jdbc.meta.MappingTool"> can be used
to invoke MappingTool from Ant 
And I find that somewhat easier to debug build/classpath problems.

Pinaki Poddar

-----Original Message-----
From: Makas Tzavellas [] 
Sent: Monday, June 25, 2007 10:24 AM
Subject: Using ant task mappingtool to generate tables

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)
    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;


Notice:  This email message, together with any attachments, may contain information  of  BEA
Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be confidential,  proprietary,
 copyrighted  and/or legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient, and have received
this message in error, please immediately return this by email and then delete it.

View raw message