• Post Reply Bookmark Topic Watch Topic
  • New Topic

HI I got the null pointer exception using session factory  RSS feed

 
Rastogi Ji
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Exception in thread "main" java.lang.NullPointerException
at mypack.Hibernate_Test.main(Hibernate_Test.java:71)
Inserting Record

HI I got those above exception while using this below code.



[ Edited to use code tags - Paul Sturrock ]
[ October 12, 2008: Message edited by: Paul Sturrock ]
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What happens at line 71? What errors (if any) is Hibernate logging?
 
Rastogi Ji
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I Solved my exception by adding hibernate 3.0 advanced library to my project
but the output is
id=0
name=null
city=null
age=0
that is not correct,so what i do for getting correct value from database?
A table has four field
ID number
name varchar2(20)
city varchar2(15)
age number
in oracle database
please reply this...
Thankyou
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What output? Your application only seems to print out exception messages and the word "Done". Please explain the details.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!