-->
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: number type field in hibernate?
PostPosted: Sat Aug 21, 2004 12:56 am 
Beginner
Beginner

Joined: Fri Jan 23, 2004 5:08 am
Posts: 21
Hi guys! I'm developing a web application system using hibernate1.8. This is the version i'm using because the company i work use the jdk1.3.0, so im stuck to use the old version.

I have this table (EquipmentTypes) and the fields are

id number not null
code varchar(20) not null
description varchar(20) not null
hightemp number
lowtemp number
.....

And my java class

class EquipmentTypes
{
private long id = 0;
private String code = null;
private String desc = null;
private int hightemp = 0;
private int lowtemp = 0;
}

my mapping document

<id name="id" type="long">
-----
</id>
<property name="code"/>
<property name="desc" column="description"/>
<property name="hightemp"/>
<property name="lowtemp"/>
-------

btw, im using oracle9i database.The table have already values ( the field hightemp and lowtemp have blank values, since its not required).So when i query it using hibernate

List list = session.find("from eqp in class vo.EquipmentTypes");

i got an error
NullPointerException:problems occured while setting values for hightemp (this is not the complete error but something like this).

Is there any work around on this?

Thanks in advance!


raymond


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 21, 2004 12:57 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Hibernate2 is compatible with JDK 1.3!


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 21, 2004 1:01 am 
Beginner
Beginner

Joined: Fri Jan 23, 2004 5:08 am
Posts: 21
Hi gavin!What version of hibernate2? I try to use the hibernate2.0.1 but Im having problems. I'm using tomcat4.0.3

thanks

raymond


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 21, 2004 1:04 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Any version.

Quote:
When asking questions, give at least:
# the Hibernate version
# your mapping documents
# the Java code between sessionFactory.openSession() and session.close()
# the full stack trace of any exception that occurs
# the name and version of the database you are using
# a debug level Hibernate log excerpt is also appreciated


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.