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