-->
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: Long
PostPosted: Thu Mar 05, 2009 2:01 pm 
Newbie

Joined: Thu Mar 05, 2009 1:54 pm
Posts: 4
Location: MK
Hibernate 3

Hi All,

I am relatively new to hibernate and have an issue, I'm hoping you might have an answer for.

Very basically the error received is this;
Caused by: org.hibernate.MappingException: Could not determine type for: Long, at table: OPPONENTS, for columns: [org.hibernate.mapping.Column(ID)]

I am assuming here, that hibernate has a problem with the Long datatype?

My mapping file for this id column is thus;
<id column="ID" name="id" type="Long">
<generator class="sequence">
<param name="sequence">OPPONENTS_SEQUENCE</param>
</generator>
</id>

And finally the class file property is thus;
private Long id;

With a public getter (returning Long) and a private setter (using Long datatype).

Any idea, why I might receive such an error in the initialisation stage?

Thanks in advance, any help or guidance would be greatly appreciated.
Gallapagus.

_________________
www.holdemharrier.com


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 05, 2009 2:37 pm 
Regular
Regular

Joined: Tue Dec 30, 2008 8:14 pm
Posts: 50
It needs to ne "long" with lower case "l".

LinHib.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 05, 2009 2:41 pm 
Expert
Expert

Joined: Wed Mar 03, 2004 6:35 am
Posts: 1240
Location: Lund, Sweden
Use type="java.lang.Long" since you use the object wrapper type.


Top
 Profile  
 
 Post subject: Sorted
PostPosted: Thu Mar 05, 2009 3:06 pm 
Newbie

Joined: Thu Mar 05, 2009 1:54 pm
Posts: 4
Location: MK
Thanks Nordborg, that actually makes perfect sense now.

_________________
www.holdemharrier.com


Top
 Profile  
 
 Post subject: Re: Could not determine type for: Long
PostPosted: Mon Jun 22, 2009 12:31 pm 
Regular
Regular

Joined: Tue Jul 29, 2008 4:15 pm
Posts: 62
Location: Dallas, TX US
I get the below error when I try to run my hibernate application:
Code:
org.hibernate.MappingException: Could not determine type for: Long, at table: PERSON, for columns: [org.hibernate.mapping.Column(ID)]


How do I resolve this when I am using annotated java classes to map my java objects to my database table and columns?

_________________
pouncilt


Top
 Profile  
 
 Post subject: Re: Could not determine type for: Long
PostPosted: Mon Jun 22, 2009 4:32 pm 
Regular
Regular

Joined: Tue Jul 29, 2008 4:15 pm
Posts: 62
Location: Dallas, TX US
I figured out what I was doing wrong. Thanks!

_________________
pouncilt


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.