-->
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.  [ 4 posts ] 
Author Message
 Post subject: error while making class as an entity bean
PostPosted: Mon Apr 10, 2006 2:01 am 
Newbie

Joined: Thu Apr 06, 2006 2:11 am
Posts: 4
Hi All,

I am trying example for hibernate annotation.

I am making class as an entity bean by writing @Entity at class level.

But its giving me error saying "Syntax error on tokens,delete these tokens" in Eclipse.

My code is,

import java.io.*;
import javax.persistence.*;
@Entity -------> Here it is giving me the error
@Table(name="myobject")
public class Mysample implements Serializable {


What this error means ?
How to solve this error ?



Thanks,
Sandip


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 10, 2006 5:33 am 
Newbie

Joined: Fri Mar 31, 2006 5:18 am
Posts: 9
Try @Entity() instead of @Entity.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 12, 2006 5:00 am 
Beginner
Beginner

Joined: Wed Apr 13, 2005 10:34 am
Posts: 38
Writing @Entity without brackets is also correct.

But please check:
1. Are you using Eclipse Version >= 3.1.0?
2. Is the Compiler Compliance Level set to 5.0 under Preferences/Java/Compiler?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 16, 2006 1:15 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
wrong JDK, use JDK 5

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.