openjpa-dev mailing list archives

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

Please post the log and stack trace with <property name="openjpa.Log"
value="DefaultLevel=TRACE"/>
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
972.834.2865

-----Original Message-----
From: Makas Tzavellas [mailto:ducknight@gmail.com] 
Sent: Monday, June 25, 2007 10:24 AM
To: dev@openjpa.apache.org
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
com.softbrands.subway.core.db.data.MessageEntity" does not have
persistence metadata.

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



Sincerely,
Makas

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.

Mime
View raw message