aspose file tools
The moose likes Object Relational Mapping and the fly likes HI I got the null pointer exception using session factory Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply Bookmark "HI I got the null pointer exception using session factory" Watch "HI I got the null pointer exception using session factory" New topic
Author

HI I got the null pointer exception using session factory

Rastogi Ji
Greenhorn

Joined: Oct 12, 2008
Posts: 2
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

Joined: Apr 14, 2004
Posts: 10336

What happens at line 71? What errors (if any) is Hibernate logging?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Rastogi Ji
Greenhorn

Joined: Oct 12, 2008
Posts: 2
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

Joined: Apr 14, 2004
Posts: 10336

What output? Your application only seems to print out exception messages and the word "Done". Please explain the details.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HI I got the null pointer exception using session factory
 
Similar Threads
No TransactionManagerLookup specified Exception
basic app Hibernate
problem with hibernate application
java.net.SocketException: Broken pipe
Error in reading hibernate.cfg.xml after updating hibernate3.jar