-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Annotations in J2SE?
PostPosted: Mon Jan 30, 2006 11:01 am 
Newbie

Joined: Mon Jan 30, 2006 10:30 am
Posts: 1
Is it possible to use annotations in plain J2SE-applications? I've gotten the following error messages when I've played around with it:

Using @Entity and @Id => compilation error:
cannot find symbol Id

Using @Entity without @Id => runtime error:
Initial SessionFactory creation failed. java.lang.NoClassDefFoundError: javax/persistence/Entity

Since I can't imagine anybody would want to use XML files instead of annotations, I guess there is a way to get around it?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 30, 2006 11:25 am 
Beginner
Beginner

Joined: Mon Jan 31, 2005 11:04 am
Posts: 21
You should add ejb3-persistence.jar in your classpath... (It is given in the lib directory of hibernate annotations)

schuer


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.