commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Basavesh B (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DBCP-290) java.sql.SQLException: Closed Statement
Date Wed, 30 Jun 2010 21:17:50 GMT

    [ https://issues.apache.org/jira/browse/DBCP-290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12884062#action_12884062
] 

Basavesh B commented on DBCP-290:
---------------------------------

Dear Jira,

 

I am facing the same issue as what you are reported in the Forum. I would
appreciate if you can let me know how this was resolved. Thanks in Advance.

We are using WAS 6.0 in the production environment and having this problem.

 

Here is the log.

[6/30/10 10:08:00:833 EDT] 00000034 SystemOut     O If Last case

[6/30/10 10:08:00:834 EDT] 00000034               E   StatementCallback;
uncategorized SQLException for SQL [SELECT count(*) FROM USER WHERE
UPPER(USER_ID) = UPPER('cj4') ]; SQL state [null]; error code [0];
DSRA9110E: Connection is closed.; nested exception is
com.ibm.websphere.ce.cm.ObjectClosedException: DSRA9110E: Connection is
closed.

 
org.springframework.jdbc.UncategorizedSQLException: StatementCallback;
uncategorized SQLException for SQL [SELECT count(*) FROM VPT.VPT_USER WHERE
UPPER(USER_ID) = UPPER('zmmicj4') ]; SQL state [null]; error code [0];
DSRA9110E: Connection is closed.; nested exception is
com.ibm.websphere.ce.cm.ObjectClosedException: DSRA9110E: Connection is
closed.

        at
org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQ
LStateSQLExceptionTranslator.java:124)

        at
org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translat
e(SQLErrorCodeSQLExceptionTranslator.java:322)

        at
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:407)

        at
org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:458)

        at
org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:466)

        at
org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:
474)

        at
org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:
479)

        at
org.springframework.jdbc.core.JdbcTemplate.queryForInt(JdbcTemplate.java:488
)

        at com.hbc.vp.daos.LoginDAOImpl.getUserCount(LoginDAOImpl.java:142)

        at com.hbc.vp.daos.LoginDAOImpl.getUserCount(LoginDAOImpl.java:112)

        at
com.hbc.vp.services.LoginService.authenticateUser(LoginService.java:245)

        at
com.hbc.vp.controllers.LoginController.login(LoginController.java:131)

        at sun.reflect.GeneratedMethodAccessor411.invoke(Unknown Source)

        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:37)

----------------------------

 
Thanks

Basavesh

 



> java.sql.SQLException: Closed Statement 
> ----------------------------------------
>
>                 Key: DBCP-290
>                 URL: https://issues.apache.org/jira/browse/DBCP-290
>             Project: Commons Dbcp
>          Issue Type: Bug
>    Affects Versions: 1.2.2
>            Reporter: kan
>             Fix For: 1.3
>
>
> We are getting below exception in production randomly..Using Spring(2.5) JDBC for all
our DB related functionality.We don't handle any DB resources directly.everything thru Spring
JDBC template. This app was running fine in Weblogic but after migrating to Tomcat6+DBCP(1.2.2)
we are seeing the below exception. 
> We also looked our code base for any threading or concurrency issues..we were not able
spot any issues. 
> I have observed one more thing..why checkOpen in DelegatingPreparedStatement didn't catch
this but OracleStatement thinks the statement is closed.
> Is it bcos the DBCP is returing the closed connection? (DBCP-273)
> Caused by: org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback;
uncategorized SQLException for SQL [INSERT INTO AUDIT_TRAIL ( DEAL_ID , AUDIT_TRAIL_ID ) VALUES
( ?,? ) ]; SQL state [null]; error code [17009]; Closed Statement; nested exception is java.sql.SQLException:
Closed Statement 
>         at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:124)

>         at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:322)

>         at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:607)

>         at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:792) 
>         at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:815) 
>         at org.springframework.jdbc.object.SqlUpdate.update(SqlUpdate.java:168) 
>         at com.dao.DealXAuditTrailDaoBase.insertDealXAuditTrailVoBase(Unknown Source)

>         at com.deal.DealTO.insertAuditTrail(DealTO.java:183) 
>         at com.deal.DealTO.processAuditTrail(DealTO.java:168) 
>         at com.deal.DealTO.update(DealTO.java:110) 
>         at com.deal.DealTO$$FastClassByCGLIB$$fba55fe6.invoke(<generated>) 
>         at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) 
>         at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700)

>         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)

>         at com.businessrules.SpexBusinessRuleValidator.invoke(SpexBusinessRuleValidator.java:64)

>         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)

>         at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)

>         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)

>         at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635)

>         at com.deal.DealTO$$EnhancerByCGLIB$$54d9c9a4.update(<generated>) 
>         at com.entity.EntityGeneralInfoController.copyFieldsToDeal(EntityGeneralInfoController.java:1158)

>         at com.entity.EntityGeneralInfoController.doSave(EntityGeneralInfoController.java:429)

>         ... 30 more 
> Caused by: java.sql.SQLException: Closed Statement 
>         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)

>         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)

>         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)

>         at oracle.jdbc.driver.OracleStatement.ensureOpen(OracleStatement.java:3249) 
>         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2867)

>         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:2957)

>         at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)

>         at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)

>         at org.springframework.jdbc.core.JdbcTemplate$2.doInPreparedStatement(JdbcTemplate.java:798)

>         at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:591)

>         <Resource name="oracleDS" auth="Container" 
>                                 type="javax.sql.DataSource" 
>                                 driverClassName="oracle.jdbc.OracleDriver" 
>                                 url="jdbc:oracle:thin:@xxxxx:1521:xxxxx" 
>                                 username="xxxx" password="xxxx" 
>                                 initialSize="2" maxActive="30" maxIdle="30" maxWait="3000"
minIdle="0" 
>                                 testOnBorrow="true" testOnReturn="false" testWhileIdle="false"

>                                 poolPreparedStatements="true" maxOpenPreparedStatements="10"

>                                 removedAbandoned="true" removeAbandonedTimeout="60" 
>                                 logAbandoned="true" validationQuery="select count(*)
from dual"/> 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message