Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-14-2007, 04:44 AM
Senior Member
 
Join Date: Jun 2007
Posts: 164
Heather is on a distinguished road
org.hibernate.ejb.Version <clinit> INFO: Hibernate EntityManager 3.2.0.CR1
I have this problem with hibernate and annotations
Code:
--------------------------------------- ERROR ---------------------------------------------- 11/06/2007 20:31:10 org.hibernate.ejb.Version <clinit> INFO: Hibernate EntityManager 3.2.0.CR1 11/06/2007 20:31:10 org.hibernate.cfg.annotations.Version <clinit> INFO: Hibernate Annotations 3.2.0.CR1 11/06/2007 20:31:10 org.hibernate.cfg.Environment <clinit> INFO: Hibernate 3.2 cr2 11/06/2007 20:31:10 org.hibernate.cfg.Environment <clinit> INFO: hibernate.properties not found 11/06/2007 20:31:10 org.hibernate.cfg.Environment buildBytecodeProvider INFO: Bytecode provider name : cglib 11/06/2007 20:31:10 org.hibernate.cfg.Environment <clinit> INFO: using JDK 1.4 java.sql.Timestamp handling 11/06/2007 20:31:10 org.hibernate.ejb.Ejb3Configuration$4 accept GRAVE: META-INF/persistence.xmlO-:-Ofalse 11/06/2007 20:31:10 org.hibernate.cfg.AnnotationBinder bindClass INFO: Binding entity from annotated class: domain.Stock 11/06/2007 20:31:10 org.hibernate.cfg.annotations.EntityBinder bindTable INFO: Bind entity domain.Stock on table stockdb Exception in thread "main" javax.persistence.PersistenceException: org.hibernate.AnnotationException: No identifier specified for entity: domain.Stock at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:217) at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:114) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:37) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:27) at appl.Main.main(Main.java:16) Caused by: org.hibernate.AnnotationException: No identifier specified for entity: domain.Stock at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:619) at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:353) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:265) at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1034) at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1015) at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:154) at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:751) at org.hibernate.ejb.Ejb3Configuration.createFactory(Ejb3Configuration.java:151) at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:205) ... 4 more

Last edited by Heather : 06-30-2007 at 03:50 PM.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-29-2007, 03:58 PM
bbq bbq is offline
Senior Member
 
Join Date: Jun 2007
Posts: 134
bbq is on a distinguished road
The exception is clear, you didn't declare an ID of Stock class, it doesn't have the primary key.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 06-30-2007, 04:01 PM
Senior Member
 
Join Date: Jun 2007
Posts: 130
Jack is on a distinguished road
is your application in this path: WEB-INF/classes/META-INF ?
please check this
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hibernate, help me Nick15 Database 2 06-05-2008 04:39 PM
help with inheritance in hibernate valery Database 1 08-06-2007 09:44 PM
Hibernate subclasses Ed Database 2 07-02-2007 05:42 PM
Hibernate Alan Database 2 05-11-2007 02:19 AM
Hibernate Shuru Database 2 05-09-2007 06:39 PM


All times are GMT +3. The time now is 05:57 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org