-->
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.  [ 6 posts ] 
Author Message
 Post subject: could not determine type for Set
PostPosted: Mon Aug 27, 2007 9:54 am 
Newbie

Joined: Mon Aug 27, 2007 9:36 am
Posts: 5
Hi All :)

I am using Jboss 4.0.5, with integrated Hibernate 3 developing an EJB3 project.

When I try to deploy it I get this error message:

Code:
ObjectName: persistence.units:ear=usermgmt.ear,jar=usermgmt-server.jar,unitName=UserMgmt
  State: FAILED
  Reason: javax.persistence.PersistenceException: org.hibernate.MappingException: Could not determine type for: java.util.Set, for columns: [org.hibernate.mapping.Column(nivelSistema)]
  I Depend On:
    jboss.jca:service=DataSourceBinding,name=UserMgmtDS


This is the way I define "nivelSistema" attribute:

Code:
   @OneToMany(fetch=FetchType.EAGER,cascade=CascadeType.MERGE)
   public Set<NivelSistema> getNiveles()
   {
      if(this.nivelSistema == null)
      {
         this.nivelSistema = new HashSet<NivelSistema>();
      }
      return nivelSistema;
   }


What am I missing? Thanks and sorry if this is really answered, I searched here, the faqs, and internet with no results

_________________
http://www.freebsd.org


Top
 Profile  
 
 Post subject: Re: could not determine type for Set
PostPosted: Mon Aug 27, 2007 3:45 pm 
Beginner
Beginner

Joined: Mon Aug 27, 2007 8:10 am
Posts: 37
itdelany wrote:
Hi All :)

What am I missing? Thanks and sorry if this is really answered, I searched here, the faqs, and internet with no results


How have you defined your NivelSistema?

Is it an entity?


Top
 Profile  
 
 Post subject: Re: could not determine type for Set
PostPosted: Mon Aug 27, 2007 4:25 pm 
Newbie

Joined: Mon Aug 27, 2007 9:36 am
Posts: 5
hutorny wrote:
itdelany wrote:
Hi All :)

What am I missing? Thanks and sorry if this is really answered, I searched here, the faqs, and internet with no results


How have you defined your NivelSistema?

Is it an entity?


Hi, Thanks for your answer, yes it is an entity:

Code:
[...]
@Entity
@Table(name="NivelSistema")
public class NivelSistema implements Serializable {
[...]

(It is not the whole class obviously)

Thanks

_________________
http://www.freebsd.org


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 28, 2007 1:01 am 
Regular
Regular

Joined: Wed Jun 20, 2007 1:53 am
Posts: 75
paste your mapping documents here...


Top
 Profile  
 
 Post subject: Re: could not determine type for Set
PostPosted: Tue Aug 28, 2007 3:57 am 
Beginner
Beginner

Joined: Mon Aug 27, 2007 8:10 am
Posts: 37
itdelany wrote:
Hi, Thanks for your answer, yes it is an entity:

Code:
[...]
@Entity
@Table(name="NivelSistema")
public class NivelSistema implements Serializable {
[...]

(It is not the whole class obviously)

Thanks


May be Set is not a good bag, we use Collection and it works for us.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 28, 2007 11:07 am 
Newbie

Joined: Mon Aug 27, 2007 9:36 am
Posts: 5
Hi hutomy, My problem is resolved now, I was specifying the wrong method.
Thanks for your help! +1credit for your attention

_________________
http://www.freebsd.org


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