-->
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.  [ 2 posts ] 
Author Message
 Post subject: Hibernate Crashing Complete Application
PostPosted: Sat Apr 30, 2005 6:02 am 
Newbie

Joined: Fri Apr 29, 2005 1:18 pm
Posts: 1
Location: New Delhi, India
Hi,

We are using hibernate for the first time.
The application is now on production and it sometimes experiences a complete crash.
The problem is very critical and we would be greatful if anyone can help us out of this.
Following is the description:

Application Environment:

1) Application Server : JRun 4 patch 4
2) Database Server : Oracle 9.2.0.1.0
3) Database Driver : oracle.jdbc.driver.OracleDriver
4) Hibernate : 2.1.7c
5) Others : Struts, Java, JSP
6) Web Server : IIS

Note : We have used the session per query pattern (which we now know is a big anti-pattern).
Note : We are also using a mix of datasource jdbc connection, dedicated jdbc connection and hibernate (using Jrun Datasource).

Problem Description
The application crashes randomly during use on production. Once the application is down, we need to restart the application
server. The errors we receive in the Jrun log are primarily as follows:

1) NullPointerExceptions (wherever hibernate is being used)
2) [1]net.sf.hibernate.exception.GenericJDBCException: Could not execute query
3) SEVERE: Closed Statement
4) SEVERE: Exception in CommitmentReportDAO : getRecipientEmail() Error :java.sql.SQLException: ORA-01000: maximum open cursors exceeded
5) SEVERE: Closed Statement
[1]java.lang.NullPointerException
at oracle.jdbc.driver.OraclePreparedStatement.setString(OraclePreparedStatement.java:1082)


No application page using hibernate is able to execute. Application server has to be restarted all over again to receive a normal functioning. After restarting the complete application works just fine. Somehow, the load of the number of users, long usage is getting hibernate crash. I understand that this might be due to some incorrect usage/understanding or some incorrect settings at our end.

Is this a problem with Hibernate?

We suspect some problem with the database connection. We now have ensured that all places where direct/datasource
jdbc connections are also being
properly closed along with statements and resultsets. Also, we have ensured that the all places where hibernatesession is being used,
we have closed the hibernate session appropriately too. We plan to review the Jrun datasource and Oracle connection settings. These changes will be done to the production server in a few days.

I hope we are following the right path.

We would highly appreciate if anyone can help us nailing down this problem. Is there any other place/configuration that should be
taken care of? What other areas we should look for improvements? Also please suggest, what should be the appropriate
datasource, oracle connection settings for a good traffic (250 simultaneous users) business application.


Thanks,

Harish Bhatt
hbhatt1979@yahoo.com
hb_1979@rediffmail.com


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 01, 2005 6:41 am 
Regular
Regular

Joined: Tue Oct 26, 2004 3:54 pm
Posts: 60
If I remember well, when you supply your own connection sources to Hibernate you should disable PreparedStatement caching.

Try this :

hibernate.statement_cache.size=0

In your configuration (properties or xml).

Giulio


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.