-->
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: Struts, Spring with Hibernate, WAS. Strange Problem
PostPosted: Tue Mar 20, 2007 4:57 am 
Newbie

Joined: Tue Mar 20, 2007 4:40 am
Posts: 6
Location: India
Dear All,

I am using Struts with Spring and Hibernate on WAS 6.0
All is fine. The first request comes through and the database is updated.
However the next request onwards I get a Null Pointer Exception. With no stack trace or anything.
The NPE is thrown for random tables(most of the times the 1st table)(the request updates 5 tables).
I have tried to do this exercise with MySql, and it works like a charm.
I am using oracle9 and Hibernate 3. The updatations happen in my class which extends the HibernateDaoSupport using getHibernateTemplate().save(<object>)
and my applicationContext.xml also takes care of eliminating the need for the hibernate config xml.
If I exit the env. and open it again, it will repeat the same exercise. I have been pulling my hair out for more than a couple of days now.
I have all the WAS env variables set (ojdbc14.jar/zip).
You bet, I have searched for enough number of days for this problem.
I have tried using both possible dialects for oracle 9.
org.hibernate.dialect.OracleDialect <and> org.hibernate.dialect.Oracle9Dialect. I sincerely do not believe the problem would be in hibernate, but I also do not know where the problem could be. Any helpfullpointers in this direction would be highly usefull to me.

Any helpful suggestion, appreciated. :-)


TIA


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 20, 2007 7:57 am 
Expert
Expert

Joined: Thu Sep 04, 2003 8:23 am
Posts: 368
Do you know where the nullpointer come from ? Don't you have any way to debug your program to know which part throws the NPE ?
Maybe WAS is using is own version of ojdbc.jar : you may try to replace it with the one provided by oracle

_________________
Seb
(Please don't forget to give credits if you found this answer useful :)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 20, 2007 8:04 am 
Newbie

Joined: Tue Mar 20, 2007 4:40 am
Posts: 6
Location: India
Thanks for your reply.
There is no trace at all.

It just says.. Hibernate : inserting into .....<tablename & values>
java.lang.NPE


How could WAS be using its own ojdbc14?
I have configured my datasource to ojdbc14 (and ofcourse second one for mysql, which works). I mean, even if it did, why would it allow only the first request to be successfull?

There is probably something else, which I am not able to read between the lines. :-(


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 21, 2007 6:41 am 
Newbie

Joined: Tue Mar 20, 2007 4:40 am
Posts: 6
Location: India
the sysouts.. just in case
Code:
[3/21/07 15:48:01:264 IST] 00000058 SystemOut     O Hibernate: insert into TEST_APPLICANT_DATA1 (FIRSTNAME, LASTNAME, ADDRESS, ADDRESS1, ZIPCODE, CITY, STATE, SELCREDIT, SSN, RESIDENCE, RESIDENTSINCE, PREVIOUSRESIDENT, QUOTATIONNUMBER) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[3/21/07 15:48:01:404 IST] 00000058 SystemOut     O updated the database with Serial value as :[3/21/07 15:48:01:404 IST] 00000058 SystemOut     O 8[3/21/07 15:48:14:529 IST] 00000043 SystemOut     O Hibernate: insert into TEST_APPLICANT_DATA1 (FIRSTNAME, LASTNAME, ADDRESS, ADDRESS1, ZIPCODE, CITY, STATE, SELCREDIT, SSN, RESIDENCE, RESIDENTSINCE, PREVIOUSRESIDENT, QUOTATIONNUMBER) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[3/21/07 15:48:14:529 IST] 00000043 SystemOut     O java.lang.NullPointerException[3/21/07 15:48:24:201 IST] 00000058 SystemOut     O Hibernate: insert into TEST_APPLICANT_DATA1 (FIRSTNAME, LASTNAME, ADDRESS, ADDRESS1, ZIPCODE, CITY, STATE, SELCREDIT, SSN, RESIDENCE, RESIDENTSINCE, PREVIOUSRESIDENT, QUOTATIONNUMBER) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[3/21/07 15:48:24:217 IST] 00000058 SystemOut     O updated the database with Serial value as :[3/21/07 15:48:24:217 IST] 00000058 SystemOut     O 10


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.