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
|