I am using Hibernate 3.2.2 , Oracle 10g(10.1.3) Application Server and Oracle 10g Database .
My App server works fine beginning the day and at the end of the day, when I go through the logs, i find many CLOSED CONNECTION exceptions thrown.
why is it? I am not closing the session anywhere between. Any users of my application never complain that some error has occured. My db server seems to work fine.
Hibernate.cfg.xml properties
<hibernate-configuration>
<session-factory>
<!-- This property specifies the JNDI datasource to be used for connections -->
<property name="connection.datasource">java:/OracleDS</property>
<property name="dialect">
org.hibernate.dialect.Oracle9Dialect
</property>
<property name="use_sql_comments">false</property>
<property name="show_sql">false</property>
<property name="format_sql">false</property>
<property name="transaction.factory_class">
org.hibernate.transaction.JDBCTransactionFactory
</property>
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
</session-factory>
</hibernate-configuration>
Full Stack Trace:
04 Mar 2008 07:54:42 [DEBUG] AJPRequestHandler-HTTPThreadGroup-4 org.hibernate.jdbc.AbstractBatcherpreparing statement
04 Mar 2008 07:54:42 [DEBUG] AJPRequestHandler-HTTPThreadGroup-4 org.hibernate.util.JDBCExceptionReportercould not execute q\
uery [select * from ( select ROW_NUMBER() OVER(ORDER BY
THIS_.DOCUMENT_NUMBER) rn,
this_.EPISODE_ID as EPISODE1_13_0_, this_.PATIENT_BILLING_STATUS_ID as PATIENT2_13_0_, this_.BATCH_ID as BAT\
CH3_13_0_, this_.CONCURRENCY_ID as CONCURRE4_13_0_, this_.JOB_ID as JOB5_13_0_, this_.PATIENT_ID as PATIENT6_13_0_, this_.EN\
TRY_DATE as ENTRY7_13_0_, this_.ADMIT_DATE as ADMIT8_13_0_, this_.DISCHARGE_DATE as DISCHARGE9_13_0_, this_.ASSIGNMENT_OVERR\
IDE as ASSIGNMENT10_13_0_, this_.UPFRONT_PAYMENT_AMT as UPFRONT11_13_0_, this_.DOCUMENT_NUMBER as DOCUMENT12_13_0_, this_.PR\
_STATUS_CODE as PR13_13_0_, this_.CD_STATUS_CODE as CD14_13_0_, this_.PE_STATUS_CODE as PE15_13_0_, this_.INVEDITS_STATUS_CO\
DE as INVEDITS16_13_0_, this_.INVGEN_STATUS_CODE as INVGEN17_13_0_, this_.CANCELLED_FLAG as CANCELLED18_13_0_, this_.REVIEW_\
FLAG as REVIEW19_13_0_, this_.PREPAY_AMOUNT as PREPAY20_13_0_, this_.QC_PR_FLAG as QC21_13_0_, this_.QC_CD_FLAG as QC22_13_0\
_, this_.QC_PE_FLAG as QC23_13_0_, this_.QC_PAYPOSTING_FLAG as QC24_13_0_, this_.WORK_RELATED as WORK25_13_0_, this_.NON_COV\
ERED as NON26_13_0_, this_.INJURY as INJURY13_0_, this_.ACCIDENT as ACCIDENT13_0_, this_.INJURY_OR_ACCIDENT_DATE as INJURY29\
_13_0_, this_.OTHER_ACCIDENT as OTHER30_13_0_, this_.MRN as MRN13_0_, this_.DRN as DRN13_0_, this_.CREATE_USER_ID as CREATE3\
3_13_0_, this_.CREATE_DATE as CREATE34_13_0_, this_.CHANGE_USER_ID as CHANGE35_13_0_, this_.CHANGE_DATE as CHANGE36_13_0_, t\
his_.WF_ITEMKEY as WF37_13_0_, this_.WF_STATUS_CODE as WF38_13_0_, this_.PRIOR_AUTH as PRIOR39_13_0_, this_.AGE_FLAG as AGE4\
0_13_0_, this_.HYPOTHERMIA_FLAG as HYPOTHE41_13_0_, this_.HYPOTENSION_FLAG as HYPOTEN42_13_0_, this_.EMERGENCY_FLAG as EMERG\
ENCY43_13_0_, this_.REBILL_STATUS_CODE as REBILL44_13_0_, this_.EPISODE_STATUS_CODE as EPISODE45_13_0_, this_.CONVERSION_STA\
TE as CONVERSION46_13_0_, this_.OLDINVOICE as OLDINVOICE13_0_, this_.COLLABORATING_EPISODE_ID as COLLABO48_13_0_, this_.COLL\
ABORATING_RELATION_CODE as COLLABO49_13_0_,batch2_.BATCH_ID as BATCH1_0_1_, batch2_.JOB_ID as JOB3_0_1_, batch2_.BATCH_CODE \
as BATCH4_0_1_, batch2_.ENTRY_DATE as ENTRY5_0_1_, batch2_.RECEIVED_DATE as RECEIVED6_0_1_, batch2_.BATCH_COMMENT as BATCH7_\
0_1_, batch2_.CHECK_SUM as CHECK8_0_1_, batch2_.ENTRY_USER_ID as ENTRY9_0_1_, batch2_.REFUND_STATUS_CODE as REFUND10_0_1_, b\
atch2_.FOLDER_REF as FOLDER11_0_1_, batch2_.CREATE_USER_ID as CREATE12_0_1_, batch2_.CREATE_DATE as CREATE13_0_1_, batch2_.C\
as DEFAULT41_2_2_, job3_.SUBSTITUTE_PROV_ID as SUBSTITUTE42_2_2_, job3_.ACCEPT_ASSIGNMENT_FLAG as ACCEPT43_2_2_, job3_.REFUN\
DS_PREAUDIT_RPT as REFUNDS44_2_2_, job3_.STMTS_PROCESS_STATUS as STMTS45_2_2_, job3_.LETTERS_PROCESS_STATUS as LETTERS46_2_2\
_, job3_.CLAIMS_PROCESS_STATUS as CLAIMS47_2_2_, job3_.STMT_PROCESS_ID as STMT48_2_2_, job3_.CREDIT_CARD as CREDIT49_2_2_, j\
ob3_.PATIENT_BALANCE_WRITE_OFF as PATIENT50_2_2_, job3_.PATIENT_CREDIT_WRITE_OFF as PATIENT51_2_2_, job3_.MIN_STATEMENT_AMOU\
NT as MIN52_2_2_, job3_.NATIONAL_PROVIDERID_GROUP as NATIONAL53_2_2_, job3_.AGEING_DAYS as AGEING54_2_2_, job3_.CLAIM_REBILL\
_COUNT as CLAIM55_2_2_, job3_.NON_PRIMARY_AGEING_DAYS as NON56_2_2_, job3_.NON_PRIMARY_CLAIM_REBILL_COUNT as NON57_2_2_,pati\
ent4_.PATIENT_ID as PATIENT1_26_3_, patient4_.BILLING_STATUS_CODE as BILLING2_26_3_, patient4_.PERSON_ID as PERSON3_26_3_, p\
atient4_.JOB_ID as JOB4_26_3_, patient4_.PATIENT_ACCOUNT_NUMBER as PATIENT5_26_3_, patient4_.STATUS_CODE as STATUS6_26_3_, p\
atient4_.PATIENT_COMMENT as PATIENT7_26_3_, patient4_.STATEMENT_CYCLE as STATEMENT8_26_3_, patient4_.PREPAY_AMOUNT as PREPAY\
9_26_3_, patient4_.CREDIT_STATUS_CODE as CREDIT10_26_3_, patient4_.CREDIT_AMOUNT as CREDIT11_26_3_, patient4_.LAST_STMT_DATE\
as LAST12_26_3_, patient4_.LAST_STMT_AMOUNT as LAST13_26_3_, patient4_.LAST_STMT_COUNT as LAST14_26_3_, patient4_.MRN as MR\
N26_3_, patient4_.DQUENT_AMOUNT as DQUENT16_26_3_, patient4_.DQUENT_STATUS_CODE as DQUENT17_26_3_, patient4_.DQUENT_DATE as \
DQUENT18_26_3_, patient4_.COLLECTION_DATE as COLLECTION19_26_3_, patient4_.CREATE_USER_ID as CREATE20_26_3_, patient4_.CREAT\
E_DATE as CREATE21_26_3_, patient4_.CHANGE_USER_ID as CHANGE22_26_3_, patient4_.CHANGE_DATE as CHANGE23_26_3_, patient4_.BIL\
L_STATUS as BILL24_26_3_, patient4_.BS_DATE as BS25_26_3_, patient4_.ACCOUNT_STATUS as ACCOUNT26_26_3_, patient4_.ACCOUNT_ST\
ATUS_DATE as ACCOUNT27_26_3_,episodeins5_.EPISODE_ID as EPISODE2_0__, episodeins5_.EPISODE_INSURANCE_ID as EPISODE1_0__, epi\
sodeins5_.EPISODE_INSURANCE_ID as EPISODE1_28_4_, episodeins5_.EPISODE_ID as EPISODE2_28_4_, episodeins5_.INS_COMPANY_ID as \
INS3_28_4_, episodeins5_.PERSON_INSURANCE_ID as PERSON4_28_4_, episodeins5_.INSURANCE_ORDER_CODE as INSURANCE5_28_4_, episod\
eins5_.CREATE_USER_ID as CREATE6_28_4_, episodeins5_.CREATE_DATE as CREATE7_28_4_, episodeins5_.CHANGE_USER_ID as CHANGE8_28\
_4_, episodeins5_.CHANGE_DATE as CHANGE9_28_4_, episodeins5_.PRIOR_AUTHORIZATION as PRIOR10_28_4_
from EPISODE this_ inner join BATCH batch2_ on
this_.BATCH_ID=batch2_.BATCH_ID inner join JOB job3_ on
this_.JOB_ID=job3_.JOB_ID inner join PATIENT patient4_ on
this_.PATIENT_ID=patient4_.PATIENT_ID inner join
EPISODE_INSURANCE episodeins5_ on
this_.EPISODE_ID=episodeins5_.EPISODE_ID where this_.BATCH_ID
=? order by this_.Document_Number desc ) where rn
=?]
java.sql.SQLException: Closed Connection
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:240)
at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:931)
at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:827)
at oracle.jdbc.OracleConnectionWrapper.prepareStatement(OracleConnectionWrapper.java:73)
at oracle_jdbc_driver_LogicalConnection_Proxy.prepareStatement()
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:442)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:368)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:105)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561)
at org.hibernate.loader.Loader.doQuery(Loader.java:661)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2145)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
at org.hibernate.loader.Loader.list(Loader.java:2024)
at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:111)
at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1655)
at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:142)
at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:164)
at com.abc.dataentry.patientregistration.dao.EpisodeDAO.findByBatchId(EpisodeDAO.java:100)
at com.abc.dataentry.patientregistration.service.PatientRegistrationService.getEpisodeFromBatch(PatientRegistrationS\
ervice.java:138)
at com.abc.dataentry.patientregistration.PatientRegistrationHelper.getEpisodeFromBatch(PatientRegistrationHelper.jav\
a:137)
at com.abc.dataentry.patientregistration.action.PatientRegistrationAction.doExecute(PatientRegistrationAction.java:2\
54)
at com.abc.action.FirstClaimAction.execute(FirstClaimAction.java:242)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:368)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:105)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561)
at org.hibernate.loader.Loader.doQuery(Loader.java:661)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2145)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
at org.hibernate.loader.Loader.list(Loader.java:2024)
at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:111)
at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1655)
at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:142)
at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:164)
at com.abc.dataentry.patientregistration.dao.EpisodeDAO.findByBatchId(EpisodeDAO.java:100)
at com.abc.dataentry.patientregistration.service.PatientRegistrationService.getEpisodeFromBatch(PatientRegistrationS\
ervice.java:138)
at com.abc.dataentry.patientregistration.PatientRegistrationHelper.getEpisodeFromBatch(PatientRegistrationHelper.jav\
a:137)
at com.abc.dataentry.patientregistration.action.PatientRegistrationAction.doExecute(PatientRegistrationAction.java:2\
54)
at com.abc.action.FirstClaimAction.execute(FirstClaimAction.java:242)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:302)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:190)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:619)
04 Mar 2008 07:54:42 [WARN] AJPRequestHandler-HTTPThreadGroup-4 org.hibernate.util.JDBCExceptionReporterSQL Error: 17008, SQ\
LState: null
04 Mar 2008 07:54:42 [ERROR] AJPRequestHandler-HTTPThreadGroup-4 org.hibernate.util.JDBCExceptionReporterClosed Connection
04 Mar 2008 07:54:42 [DEBUG] AJPRequestHandler-HTTPThreadGroup-4 org.hibernate.jdbc.JDBCContextafter autocommit
at com.abc.action.FirstClaimAction.execute(FirstClaimAction.java:242)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:302)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:190)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:619)
04 Mar 2008 07:54:42 [WARN] AJPRequestHandler-HTTPThreadGroup-4 org.hibernate.util.JDBCExceptionReporterSQL Error: 17008, SQ\
LState: null
04 Mar 2008 07:54:42 [ERROR] AJPRequestHandler-HTTPThreadGroup-4 org.hibernate.util.JDBCExceptionReporterClosed Connection
04 Mar 2008 07:54:42 [DEBUG] AJPRequestHandler-HTTPThreadGroup-4 org.hibernate.jdbc.JDBCContextafter autocommit
04 Mar 2008 07:54:42 [DEBUG] AJPRequestHandler-HTTPThreadGroup-4 org.hibernate.jdbc.ConnectionManageraggressively releasing \
JDBC connection
04 Mar 2008 07:54:42 [DEBUG] AJPRequestHandler-HTTPThreadGroup-4 org.hibernate.jdbc.ConnectionManagerreleasing JDBC connecti\
on [ (open PreparedStatements: 1, globally: 2) (open ResultSets: 0, globally: 0)]
04 Mar 2008 07:54:42 [ERROR] AJPRequestHandler-HTTPThreadGroup-4 com.abc.dataentry.patientregistration.service.PatientRegist\
rationService.getEpisodeFromBatch(PatientRegistrationService.java:171) - Exception Occured: batchId -143758 episodeIndex-1 e\
x-org.hibernate.exception.GenericJDBCException: could not execute query
org.hibernate.exception.GenericJDBCException: could not execute query
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.doList(Loader.java:2148)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
at org.hibernate.loader.Loader.list(Loader.java:2024)
at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:111)
at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1655)
at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:142)
at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:164)
at com.abc.dataentry.patientregistration.dao.EpisodeDAO.findByBatchId(EpisodeDAO.java:100)
Any suggestion please. ?????
_________________ Everything has an answer.................................................. Either possible or not
|