-->
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: NullPointerException when running the Hibernate Example
PostPosted: Fri Jul 08, 2005 8:07 pm 
Newbie

Joined: Mon Jun 13, 2005 12:40 pm
Posts: 2
Hi,

I am new to Hibernate. I downloaded the hibernate 3.0.5 and followed the steps to run the example that comes with the hibernate installation. I configured the example to run for Oracle 9i database. When I try to run the example by typing "build eg" I get NullPointerException when it tries to create the Sample test Data. I could see that I am able to connect to oracle coz the application created the tables in the Database. Any help regarding this issue is highly appreciated.

Thanks

The following is the stack trace.

[java] 16:50:49,109 INFO SessionFactoryImpl:379 - Checking 0 named queries
[java] Setting up some test data
[java] 16:50:49,156 INFO DriverManagerConnectionProvider:147 - cleaning up connection pool: jdbc:oracle:thin:@localhost:1521:KUMAR
[java] Hibernate: select hibernate_sequence.nextval from dual
[java] Hibernate: select hibernate_sequence.nextval from dual
[java] Hibernate: select hibernate_sequence.nextval from dual
[java] Before Commit
[java] Hibernate: select hibernate_sequence.nextval from dual
[java] Hibernate: select hibernate_sequence.nextval from dual
[java] Hibernate: select hibernate_sequence.nextval from dual
[java] Hibernate: select hibernate_sequence.nextval from dual
[java] Hibernate: select hibernate_sequence.nextval from dual
[java] Hibernate: select hibernate_sequence.nextval from dual
[java] Hibernate: select hibernate_sequence.nextval from dual
[java] Hibernate: select hibernate_sequence.nextval from dual
[java] Hibernate: select hibernate_sequence.nextval from dual
[java] Hibernate: select hibernate_sequence.nextval from dual
[java] Hibernate: /* insert org.hibernate.auction.User */ insert into AuctionUser (userName, "password", email, firstName, "initial", lastName, id) val
ues (?, ?, ?, ?, ?, ?, ?)
[java] Hibernate: /* insert org.hibernate.auction.User */ insert into AuctionUser (userName, "password", email, firstName, "initial", lastName, id) val
ues (?, ?, ?, ?, ?, ?, ?)
[java] Hibernate: /* insert org.hibernate.auction.User */ insert into AuctionUser (userName, "password", email, firstName, "initial", lastName, id) val
ues (?, ?, ?, ?, ?, ?, ?)
[java] java.lang.NullPointerException
[java] at oracle.jdbc.dbaccess.DBData.clearItem(DBData.java:431)
[java] at oracle.jdbc.dbaccess.DBDataSetImpl.clearItem(DBDataSetImpl.java:3528)
[java] at oracle.jdbc.driver.OraclePreparedStatement.checkBindTypes(OraclePreparedStatement.java:3271)
[java] at oracle.jdbc.driver.OraclePreparedStatement.setNull(OraclePreparedStatement.java:1322)
[java] at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:55)
[java] at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:44)
[java] at org.hibernate.type.ComponentType.nullSafeSet(ComponentType.java:211)
[java] at org.hibernate.persister.entity.BasicEntityPersister.dehydrate(BasicEntityPersister.java:1617)
[java] at org.hibernate.persister.entity.BasicEntityPersister.dehydrate(BasicEntityPersister.java:1594)
[java] at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:1850)
[java] at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:2200)
[java] at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:46)
[java] at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:239)
[java] at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:223)
[java] at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:136)
[java] at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:274)
[java] at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
[java] at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:730)
[java] at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:324)
[java] at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:86)
[java] at org.hibernate.auction.Main.createTestAuctions(Main.java:367)
[java] at org.hibernate.auction.Main.main(Main.java:389)
[java] Exception in thread "main"

BUILD FAILED
C:\hibernate-3.0.5\hibernate-3.0\build.xml:619: Java returned: 1

Total time: 26 seconds


Top
 Profile  
 
 Post subject: Try latest Oracle drivers
PostPosted: Fri Jul 15, 2005 11:11 am 
Newbie

Joined: Thu Dec 30, 2004 9:12 am
Posts: 4
http://forum.hibernate.org/viewtopic.php?t=940403


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 16, 2005 2:46 am 
Newbie

Joined: Mon Jun 13, 2005 12:40 pm
Posts: 2
Hi Troy,

Thanks a lot. I tried updating my drivers and it worked great.

Thanks once again!


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.