-->
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.  [ 3 posts ] 
Author Message
 Post subject: The annotation @Table must define the attribute appliesTo???
PostPosted: Sun Dec 17, 2006 11:33 am 
Newbie

Joined: Sun Dec 17, 2006 11:29 am
Posts: 3
What is the problem? I already defined name and appliesTo attributes.

@Entity
@Table(name="USER")
@org.hibernate.annotations.Table ( appliesTo="USER")
public class User {
}

Error:
[exec] Caused by:
[exec] org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [hibernate.UserDaoImpl]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems:
[exec] The annotation @Table must define the attribute appliesTo
[exec] The attribute name is undefined for the annotation type Table
[exec] Caused by:
[exec] java.lang.Error: Unresolved compilation problems:
[exec] The annotation @Table must define the attribute appliesTo
[exec] The attribute name is undefined for the annotation type Table
[exec] at vo.User.<init>(User.java:34)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 17, 2006 1:34 pm 
Senior
Senior

Joined: Sun Jun 04, 2006 1:58 am
Posts: 136
threw exception; nested exception is java.lang.Error: Unresolved compilation problems:

_________________
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 17, 2006 9:55 pm 
Newbie

Joined: Sun Dec 17, 2006 11:29 am
Posts: 3
This work fine when i was using hiberate3.0 hbm file and spring 1.x. After i migrate to hibernate 3.2 annotation and spring2.0 the problem occur.

public class UserDaoImpl extends AbstractDao<User> implements UserDao<User> {

public UserDaoImpl() {
super(new User(false));//(UserDaoImpl.java:29)
}

}


Error: [exec] org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [hibernate.UserDaoImpl]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems:
[exec] The annotation @Table must define the attribute appliesTo
[exec] The attribute name is undefined for the annotation type Table
[exec] Caused by:
[exec] java.lang.Error: Unresolved compilation problems:
[exec] The annotation @Table must define the attribute appliesTo
[exec] The attribute name is undefined for the annotation type Table
[exec] at vo.User.<init>(User.java:34)
[exec] at hibernate.UserDaoImpl.<init>(UserDaoImpl.java:29)


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