aspose file tools*
The moose likes Websphere and the fly likes WAS 6.0 Strange prob. First request= success. 2nd Req= NPE !!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "WAS 6.0 Strange prob. First request= success. 2nd Req= NPE !!!" Watch "WAS 6.0 Strange prob. First request= success. 2nd Req= NPE !!!" New topic
Author

WAS 6.0 Strange prob. First request= success. 2nd Req= NPE !!!

sarvananda sarvananda
Greenhorn

Joined: Mar 20, 2007
Posts: 21
Dear All,
I am fairly new to Spring and Hibernate. As of now I am working on 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 dug every possible forums history for this problem.
I have searched for enough number of days for this problem.
I have RTFM, but with no hope.
I have all the WAS env variables set (ojdbc14.jar/zip).
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. I had posted this on the spring and hibernate forums as well, but not with much help(cos even I believed there was no problem in the way I was using bot of 'em)
Any helpfullpointers in this direction would be highly usefull to me.

TIA
sarvananda sarvananda
Greenhorn

Joined: Mar 20, 2007
Posts: 21
sorry for the dual posting. Just the bad day(S)! :-(
sarvananda sarvananda
Greenhorn

Joined: Mar 20, 2007
Posts: 21
The sysouts... just in case
sarvananda sarvananda
Greenhorn

Joined: Mar 20, 2007
Posts: 21
its sorted out now. Setting the statement cache size to 0 in the conn.props solved it. Thanks to all.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: WAS 6.0 Strange prob. First request= success. 2nd Req= NPE !!!