-->
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: Unexpected Error HELP
PostPosted: Fri Nov 14, 2003 11:29 am 
Newbie

Joined: Fri Sep 19, 2003 2:57 pm
Posts: 10
2003-11-14 12:21:53,231 ERROR [org.jboss.ejb.plugins.LogInterceptor] Unexpected Error:
java.lang.NoSuchMethodError: User.getUserGroups()Ljava/util/Set;


When I trying to obtaing a "set" from a persistent class a get that error.

that is the arquitecture. It's a mnay to many relationship

Users >-----< UserGroups

in the User.java class have this

private set userGroups;

/**
* @hibernate.set
* role = "userGroups"
* lazy = "true"
* table = "user_group_details"
* @hibernate.collection-key
* column = "USR_ID"
* @hibernate.collection-many-to-many
* class="com.miradores.vmon.data.UserGroup"
* column = "USG_ID"
**/
public Set getUserGroups() {
return userGroups;
}

/**
* Standard setter
**/
public void setUserGroups (Set invar) {
this.userGroups = invar;
}


and this is the code for getting the set of usergroups

// Getting the User (it's ok beacuse when I print user properties they are OK)
User u = UserFactory.findByPrimaryKey( sess, usrId );

then when I try to use the u.getUserGroups();
the error ocurr


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 14, 2003 12:39 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Don't know about your pb but you seems to map for hibernate 1.x (set role is replaced by set name). There are some threads about that on the forum.

Show us your mapping

_________________
Emmanuel


Top
 Profile  
 
 Post subject: I replace the role with name but the same proble occur.
PostPosted: Fri Nov 14, 2003 12:46 pm 
Newbie

Joined: Fri Sep 19, 2003 2:57 pm
Posts: 10
The mapping is for version 2.0

It's generated with the middlegen plugin.


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.