DBCP Connections not recycling or closing.

I have implement DBCP using Jakarta-Commons. My connection resource seems to work fine and I am explicitly closing all connections I create. JSTL SQL tags are also using the JNDI resource. However my connection are not being closed or reused. When I allow JSE to crawl the site it quickly taps out the connection pool and Tomcat returns this error:
"javax.servlet.ServletException: Unable to get connection, DataSource invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted, cause: Timeout waiting for idle object"
Oracle 8i and 9i
commons-dbcp-1.1.jar
commons-pool-1.1.jar
Can anyone help with this?
Thanks
JP Steffen

Ok here is what I am doing.....
Server.xml
<Resource name="jdbc/siteoracle" auth="Container" scope="Shareable" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/siteoracle">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>username</name>
<value>myuser</value>
</parameter>
<parameter>
<name>password</name>
<value>mypword</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:oracle:oci:@MYODB</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>oracle.jdbc.driver.OracleDriver</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>10000</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>100</value>
</parameter>
<parameter>
<name>removeAbandoned</name>
<value>true</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>20</value>
</parameter>
</ResourceParams>
web.xml
<!-- Reference to JNDI Datasource -->
<resource-ref>
     <description>Oracle Datasource</description>
     <res-ref-name>jdbc/siteoracle</res-ref-name>
     <res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<!-- JSTL Datasource -->
<context-param>
     <param-name>javax.servlet.jsp.jstl.sql.dataSource</param-name>
     <param-value>jdbc/siteoracle</param-value>
</context-param>
Example Code:
(JSP Code)
<!--- Get the Main Info Content --->
<sql:query var="MyInfo" sql="SELECT myinfo.title FROM myuser.infolocal WHERE myinfoid = ?" >
     <sql:param value="${DefaultmyinfoID}" />
</sql:query>
(Servlet Code)
package Text;
import java.io.*;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.sql.*;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
// import Database.*;
public class LineText extends HttpServlet {
Connection conn;
DataSource pool;
public void doGet(
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
PrintWriter out = response.getWriter();
Clob linetext = null;
Connection conn=null;
Statement statement = null;
ResultSet rs = null;
String sql =
"select column_data " +
"from myuser.data_table " +
"where dataid = " +
request.getParameter("DataID") +
" and languageid = '" +
request.getParameter("LangID") + "'";
try {
Context env = new InitialContext();
pool = (DataSource)env.lookup("java:comp/env/jdbc/siteoracle");
} catch (NamingException e) {
System.out.println("Error: No InitialContext " + e.getMessage());
try {
// conn=DataBaseConnection.getConnection();
conn = pool.getConnection();
statement = conn.createStatement();
rs = statement.executeQuery(sql);
if (rs.next()) {
linetext = rs.getClob(1);
else {
return;
response.setContentType("text/html");
Reader in = linetext.getCharacterStream();
int length = (int)linetext.length();
char[] buffer = new char[1024];
while ((length = in.read(buffer)) != -1) {
out.write(buffer, 0, length);
in.close();
in = null;
out.flush();
catch (SQLException e) {
System.out.println(
"linetext.doGet() SQLException: " +
e.getMessage() + "executing ");
System.out.println(sql);
finally {
if (rs != null)
try { rs.close(); } catch (SQLException ignore) { }
if (statement != null)
try { statement.close(); } catch (SQLException ignore) { }
if (conn != null)
try { conn.close(); } catch (SQLException ignore) { }

Similar Messages

  • Database Connections Not Closing

    I'm using iBatis for PostgreSQL database access and frequently have problems with connections not being closed. Here is a copy of my sqlMapConfig file:
    ============================
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE sqlMapConfig
    PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
    "http://www.ibatis.com/dtd/sql-map-config-2.dtd">
    <sqlMapConfig>
    <properties resource="ibatis.properties" />
    <settings
    lazyLoadingEnabled="true"
    cacheModelsEnabled="true"
    enhancementEnabled="false"
    useStatementNamespaces="false"
    />
    <transactionManager type="JDBC" commitRequired="true">
    <dataSource type="DBCP">
    <property name="driverClassName" value="${driver}" />
    <property name="url" value="${url}" />
    <property name="username" value="${username}" />
    <property name="password" value="${password}" />
    <property name="maxActive" value="10"/>
    <property name="maxIdle" value="5"/>
    <property name="maxWait" value="5000"/>
    <property name="logAbandoned" value="true"/>
    <property name="removeAbandoned" value="true"/>
    <property name="removeAbandonedTimeout" value="1"/>
    <property name="Driver.logUnclosedConnections" value="true"/>
    </dataSource>
    </transactionManager>
    <sqlMap resource="job-sqlMap.xml" />
    </sqlMapConfig>
    ============================
    Due to the logAbandoned and removeAbandoned settings, I get a report in my log file whenever there is a connection that was not properly closed. Here is one of those log entries:
    23:22:51.483 (10) Finalizing a Connection that was never closed:
    java.lang.Throwable: Connection was created at this point:
    at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:175)
    at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
    at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
    at org.postgresql.Driver.makeConnection(Driver.java:393)
    at org.postgresql.Driver.connect(Driver.java:267)
    at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
    at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
    at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1148)
    at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:84)
    at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)
    at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
    at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:48)
    at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:89)
    at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForList(MappedStatement.java:139)
    at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:567)
    at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:541)
    at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)
    at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:94)
    at edu.calpoly.lib.multimedia.big.db.AutomaticPeriodUpdateIBatisImplDBHandler.getGamesWithAutomaticUpdatePolicy(AutomaticPeriodUpdateIBatisImplDBHandler.java:154)
    at edu.calpoly.lib.multimedia.big.game.AutoUpdateThread.run(AutoUpdateThread.java:155)
    The file: AutomaticPeriodUpdateIBatisImplDBHandler.java contains an iBatis call on line # 154:
    --> list = sqlMap.queryForList("getGamesWithAutoPolicy", null);
    from the map file:
    <select id="getGamesWithAutoPolicy" resultClass="java.util.HashMap">
    <![CDATA[
    SELECT gameid, policy
    FROM update_policy
    ]]>
    </select>
    Here is the code for the entire method that uses this transaction:
    ============================
    public List getGamesWithAutomaticUpdatePolicy() throws BIGDatabaseFacadeException
    List list = new ArrayList();
    try
    sqlMap.startTransaction();
    list = sqlMap.queryForList("getGamesWithAutoPolicy", null);
    sqlMap.commitTransaction();
    catch(SQLException sqle)
    throw new BIGDatabaseFacadeException(sqle);
    finally
    try
    sqlMap.endTransaction();
    catch(SQLException sqle)
    throw new BIGDatabaseFacadeException(sqle);
    return list;
    ============================
    I know that this should be handled as an automatic transaction, but I tried adding the start, commit and end transaction commands in my desperate attempt to fix this problem (but it still didn't help).
    Here is my code for creation of sqlMap -
    --> sqlMap = SqlMapClientBuilder.buildSqlMapClient(Resources.getResourceAsReader("sqlMaps.xml"));
    Except for the fact that occasionally connections are not closed, overall my database access using iBatis works very well.
    In the course of trying to fix this problem I've worked to update all my lib files to the latest versions, and here is current status:
    My iBatis lib file: ibatis-2.3.4.726.jar
    My JDBC driver: postgresql-8.4-701.jdbc3.jar
    Required commons files:
    commons-dbcp-1.2.2.jar
    commons-pool-1.5.3.jar
    Note that I tried adding --> commitRequired="true" to the transactionManager in sqlMaps.xml, hoping it might help, but no joy.
    Please help me figure out why my database connections often do not close. Thank you very much!

    I'm sorry, but I don't understand what you mean by "close the session." I believe iBatis is supposed to take care of all that automatically. My understanding is that all the user does is create the sqlMapClient and then use it along with various map files to query and update the database. iBatis does the rest.

  • Connection not closed in the database server end

    Hi,
    Our database server (sql server 2000) and java application are running in two different boxes. Because the java application sent to the db server quite a few queries that can not be completed (applications hangs there) due to huge amount of data (18 million records in one table and 1 million records in another table and there are joins among the three tables), we stopped the java program. However, in the db server end, the connections associated with these problem queries were not closed although the java app end already closed these connections by calling connection.close(). When this happened, we have to manually close the connection from sql server enterprise manager.
    Here are the questions.
    1)what could be the reason why db server does not close the connection?
    2)Is there any solution in the java end that could close the connection in the db server end when this situation happens? I say this situation happens, I mean in most cases when java application closes connection, db server closes connections in its end too.
    Thanks
    Mark

    mark.lin wrote:
    Thanks for your answers and questions.
    Here are the answers to your questions
    1)The jdbc driver is jturboJTurbo? Never heard of it. You mean this?
    http://www.newatlanta.com/products/jturbo/index.jsp
    Why pay for something when you have two options available that are free? One of them is from Microsoft itself. Whose idea was this?
    2)It's a desk top application.
    It seems to me that it should not be driver issue. I was this happened the Microsoft's own jdbc driver. By jdbc specification, although you don't close the connection explicitly in the program, the connection will be automatically closed in the java app end during garbage collection. Very bad - never depend on this. Always close your ResultSet, Statement, and Connection in reverse order of opening in a finally block, each one wrapped in individual try/catch blocks.
    One should never, ever depend on the GC to take care of resources like database connections or resource handles. Those should be cleaned up by your code.
    I tested this by intentionally not closing a connection. When I stops the application, the connection in the sql server end was also closed.
    But if you don't close the application and fail to close connections, you can see where eventually you'll exhaust the pool.
    It seems to me this is a sql server issue rather than a jdbc driver issue. I need way to prove this.
    Like I suggested, it's easy to swap in the jTDS driver and try it again. What do you have to lose?
    Or call Microsoft support and ask them. Or maybe JTurbo. You're paying for it - might as well use the support.
    %

  • TopLink logical connection not closed

    Hi everybody,
    I have a problem when using db adapter for polling databases tables. This is using TopLink to access database's data.
    My process was running w/o errors till I have started to use external data source defined in OAS.
    My oc4j-ra.xml file contains:
    ============================================================
         <connector-factory location="eis/DB/TestData" connector-name="Database Adapter">
              <config-property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
              <config-property name="connectionString" value=""/>
              <config-property name="userName" value=""/>
              <config-property name="password" value=""/>
              <config-property name="minConnections" value="5"/>
              <config-property name="maxConnections" value="5"/>
              <config-property name="minReadConnections" value="1"/>
              <config-property name="maxReadConnections" value="1"/>
              <config-property name="usesExternalConnectionPooling" value="true"/>
              <config-property name="dataSourceName" value="jdbc/TESTDS"/>
              <config-property name="usesExternalTransactionController" value="true"/>
              <config-property name="platformClassName" value="oracle.toplink.internal.databaseaccess.Oracle9Platform"/>
              <config-property name="usesNativeSequencing" value="true"/>
              <config-property name="sequencePreallocationSize" value="50"/>
              <config-property name="tableQualifier" value=""/>
              <config-property name="defaultNChar" value="false"/>
              <config-property name="usesBatchWriting" value="true"/>
         </connector-factory>
    ============================================================
    Once I have switched to this oc4j-ra.xml configuration file I got the following error in files logs (using the -Djdbc.connection.debug=true flag)
    ============================================================
    06/09/25 11:40:46 OrionCMTConnection not closed, check your code!
    06/09/25 11:40:46 Logical connection not closed, check your code!
    06/09/25 11:40:46 Created at:
    06/09/25 11:40:46 java.lang.Throwable: OrionCMTConnection created
    06/09/25 11:40:46      at com.evermind.sql.OrionCMTConnection.<init>(OrionCMTConnection.java:121)
    06/09/25 11:40:46      at com.evermind.sql.OrionCMTConnectionFinalize.<init>(OrionCMTConnectionFinalize.java:42)
    06/09/25 11:40:46      at com.evermind.util.ClassOptimizerFactory.getOrionCMTConnection(ClassOptimizerFactory.java:80)
    06/09/25 11:40:46      at com.evermind.sql.OrionCMTDataSource.getConnection(OrionCMTDataSource.java:237)
    06/09/25 11:40:46      at com.evermind.sql.OrionCMTDataSource.getConnection(OrionCMTDataSource.java:227)
    06/09/25 11:40:46      at oracle.toplink.jndi.JNDIConnector.connect(JNDIConnector.java:102)
    06/09/25 11:40:46      at oracle.toplink.sessions.DatabaseLogin.connect(DatabaseLogin.java:218)
    06/09/25 11:40:46      at oracle.toplink.internal.databaseaccess.DatabaseAccessor.reconnect(DatabaseAccessor.java:1323)
    06/09/25 11:40:46      at oracle.toplink.internal.databaseaccess.DatabaseAccessor.incrementCallCount(DatabaseAccessor.java:1198)
    06/09/25 11:40:46      at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:633)
    06/09/25 11:40:46      at oracle.toplink.publicinterface.Session.executeCall(Session.java:793)
    06/09/25 11:40:46      at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(CallQueryMechanism.java:131)
    06/09/25 11:40:46      at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(CallQueryMechanism.java:115)
    06/09/25 11:40:46      at oracle.toplink.internal.queryframework.CallQueryMechanism.executeSelectCall(CallQueryMechanism.java:194)
    06/09/25 11:40:46      at oracle.toplink.internal.queryframework.CallQueryMechanism.selectAllRows(CallQueryMechanism.java:565)
    06/09/25 11:40:46      at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:733)
    06/09/25 11:40:46      at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:708)
    06/09/25 11:40:46      at oracle.toplink.queryframework.ReadAllQuery.execute(ReadAllQuery.java:447)
    06/09/25 11:40:46      at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:493)
    06/09/25 11:40:46      at oracle.toplink.queryframework.ReadQuery.execute(ReadQuery.java:125)
    06/09/25 11:40:46      at oracle.toplink.publicinterface.Session.internalExecuteQuery(Session.java:1958)
    06/09/25 11:40:46      at oracle.toplink.threetier.ClientSession.internalExecuteQuery(ClientSession.java:390)
    06/09/25 11:40:46      at oracle.toplink.publicinterface.Session.executeQuery(Session.java:1086)
    06/09/25 11:40:46      at oracle.toplink.publicinterface.Session.executeQuery(Session.java:1038)
    06/09/25 11:40:46      at oracle.toplink.publicinterface.Session.executeQuery(Session.java:876)
    06/09/25 11:40:46      at oracle.tip.adapter.db.inbound.DestructivePollingStrategy.poll(DestructivePollingStrategy.java:211)
    06/09/25 11:40:46      at oracle.tip.adapter.db.InboundWork.runOnce(InboundWork.java:247)
    06/09/25 11:40:46      at oracle.tip.adapter.db.InboundWork.run(InboundWork.java:213)
    06/09/25 11:40:46      at oracle.tip.adapter.fw.jca.work.WorkerJob.go(WorkerJob.java:51)
    06/09/25 11:40:46      at oracle.tip.adapter.fw.common.ThreadPool.run(ThreadPool.java:267)
    06/09/25 11:40:46      at java.lang.Thread.run(Thread.java:534)
    ============================================================
    Any clue on this?
    Thankfully,
    amo

    Thanks Marc,
    I have finally noticed that was not related with some TopLink error.
    So, is there any other way to refer in the DBAdapter to an OAS datasource?
    Regards,
    amo

  • Problem in DBCP Connection Pooling with BLOB in Tomcat

    Hi All,
    I am using the DBCP connection pooling in tomcat server version 6.0.18.
    I have session table which maintains the session details of the user in BLOB column. Recently I am facing a problem. When a user logs in, I am storing the session details in the DB. It throws an exception like this. When I restart the tomcat, it just works fine. But after some days it is again throwing the same exception.
    Code:
    2009-01-27 06:03:13,789 DEBUG [org.springframework.jdbc.core.JdbcTemplate] - Executing prepared SQL statement [INSERT INTO SESSION (SESSION_CODE,LAST_ACCESS,VALID_SESSION,SESSION_DATA) VALUES(?,?,?,?)]
    2009-01-27 06:03:13,789 DEBUG [org.springframework.transaction.support.TransactionSynchronizationManager] - Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@154136a] for key [org.apache.commons.dbcp.BasicDataSource@bdec44] bound to thread [http-8443-6]
    2009-01-27 06:03:13,789 DEBUG [org.springframework.jdbc.core.StatementCreatorUtils] - Setting SQL statement parameter value: column index 1, parameter value [c2896a488efb7fe15430fab10d502577], value class [java.lang.String], SQL type unknown
    2009-01-27 06:03:13,789 DEBUG [org.springframework.jdbc.core.StatementCreatorUtils] - Setting SQL statement parameter value: column index 2, parameter value [1233064993], value class [java.lang.Long], SQL type unknown
    2009-01-27 06:03:13,789 DEBUG [org.springframework.jdbc.core.StatementCreatorUtils] - Setting SQL statement parameter value: column index 3, parameter value [1], value class [java.lang.Integer], SQL type unknown
    2009-01-27 06:03:13,789 DEBUG [org.springframework.jdbc.core.StatementCreatorUtils] - Setting SQL statement parameter value: column index 4, parameter value [org.springframework.jdbc.core.support.SqlLobValue@18af32e], value class [org.springframework.jdbc.core.support.SqlLobValue], SQL type 2004
    2009-01-27 06:03:13,789 DEBUG [org.springframework.jdbc.support.lob.DefaultLobHandler] - Set bytes for BLOB with length 390
    2009-01-27 06:03:13,789 DEBUG [org.springframework.transaction.support.TransactionSynchronizationManager] - Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@154136a] for key [org.apache.commons.dbcp.BasicDataSource@bdec44] bound to thread [http-8443-6]
    2009-01-27 06:03:13,790 DEBUG [org.springframework.transaction.support.TransactionSynchronizationManager] - Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@154136a] for key [org.apache.commons.dbcp.BasicDataSource@bdec44] bound to thread [http-8443-6]
    2009-01-27 06:03:13,790 DEBUG [org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator] - Unable to translate SQLException with Error code '17410', will now try the fallback translator
    2009-01-27 06:03:13,790 INFO [web.controller.LoginController] - Caught Exception while creating sesion in DB
    2009-01-27 06:03:13,790 DEBUG [org.springframework.jdbc.datasource.DataSourceTransactionManager] - Triggering beforeCompletion synchronization
    2009-01-27 06:03:13,790 DEBUG [org.springframework.jdbc.datasource.DataSourceTransactionManager] - Initiating transaction rollback
    2009-01-27 06:03:13,790 DEBUG [org.springframework.jdbc.datasource.DataSourceTransactionManager] - Rolling back JDBC transaction on Connection [jdbc:oracle:thin:@stagedb1c:2115:WEB1C, UserName=WEBAPP, Oracle JDBC driver]
    2009-01-27 06:03:13,791 DEBUG [org.springframework.jdbc.datasource.DataSourceTransactionManager] - Triggering afterCompletion synchronization
    2009-01-27 06:03:13,791 DEBUG [org.springframework.transaction.support.TransactionSynchronizationManager] - Clearing transaction synchronization
    2009-01-27 06:03:13,791 DEBUG [org.springframework.transaction.support.TransactionSynchronizationManager] - Removed value [org.springframework.jdbc.datasource.ConnectionHolder@154136a] for key [org.apache.commons.dbcp.BasicDataSource@bdec44] from thread [http-8443-6]
    2009-01-27 06:03:13,791 DEBUG [org.springframework.jdbc.datasource.DataSourceTransactionManager] - Releasing JDBC Connection [connection is closed] after transaction
    2009-01-27 06:03:13,791 DEBUG [org.springframework.jdbc.datasource.DataSourceUtils] - Returning JDBC Connection to DataSource
    2009-01-27 06:03:13,791 DEBUG [org.springframework.jdbc.datasource.DataSourceUtils] - Could not close JDBC Connection
    java.sql.SQLException: Already closed.
    at org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:84)
    at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:181)
    at org.springframework.jdbc.datasource.DataSourceUtils.doReleaseConnection(DataSourceUtils.java:313)
    at org.springframework.jdbc.datasource.DataSourceUtils.releaseConnection(DataSourceUtils.java:274)
    at org.springframework.jdbc.datasource.DataSourceTransactionManager.doCleanupAfterCompletion(DataSourceTransactionManager.java:316)
    at org.springframework.transaction.support.AbstractPlatformTransactionManager.cleanupAfterCompletion(AbstractPlatformTransactionManager.java:966)
    at org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:832)
    at org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:777)
    at web.controller.LoginController.onSubmit(LoginController.java:109)
    at org.springframework.web.servlet.mvc.SimpleFormController.processFormSubmission(SimpleFormController.java:267)
    at org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:265)
    at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
    at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:595)
    My Session table has the following structure:
    Code:
    Name Null? Type
    SESSION_CODE NOT NULL VARCHAR2(100)
    LAST_ACCESS NOT NULL NUMBER
    VALID_SESSION NOT NULL NUMBER
    SESSION_DATA NOT NULL BLOB
    I have the following in the Spring context file :
    Code:
    <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
    <property name="driverClassName" value="${jdbc.driverClassName}"/>
    <property name="url" value="${jdbc.url}"/>
    <property name="username" value="${jdbc.username}"/>
    <property name="password" value="${jdbc.password}"/>
    <property name="initialSize" value="5"/>
    <property name="maxActive" value="5"/>
    <property name="minIdle" value="2"/>
    <property name="poolPreparedStatements" value="true"/>
    <property name="defaultAutoCommit" value="false"/>
    </bean>
    I am using the oracle.jdbc.driver.OracleDriver as jdbc driver. And also using the commons-dbcp-1.2.2.jar and ojdbc14.jar.
    Can some one help me out to solve this issue?
    Thanks in Advance.

    I am also facing the same problem, please let me know if there any suggestions,
    DEBUG|2010-05-07 16:41:25,866|main|(SQLErrorCodeSQLExceptionTranslator.java:266)|org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator|Unable to translate SQLException with Error code '17410', will now try the fallback translator
    DEBUG|2010-05-07 16:41:25,866|main|(SQLStateSQLExceptionTranslator.java:94)|org.springframework.jdbc.support.SQLStateSQLExceptionTranslator|Extracted SQL state class '08' from value '08000'
    thanks
    sundaravel n

  • DBCP Connection pooling apparently failing!

    I am trying out the following code per directions from DBCP site, but the output indicates that after I call con.close(), the con.isClosed() return true. Does that mean that DBCP is not working the way I am setting it up or what? Please help!
    try
          Class.forName("oracle.jdbc.OracleDriver");
          StackObjectPool pool=new StackObjectPool(2);
          DriverManagerConnectionFactory confactory=new DriverManagerConnectionFactory(url,null);
          PoolableConnectionFactory poolconfactory=new PoolableConnectionFactory(confactory,pool,new StackKeyedObjectPoolFactory(2),null,false,true);
          PoolingDataSource source=new PoolingDataSource(pool);
          Connection con=source.getConnection();
          PreparedStatement stat=con.prepareStatement("select * from employee");
          stat.executeQuery();
          System.out.println(con.isClosed());
          stat.close();
          con.close();
          System.out.println(con.isClosed());
        catch (Exception ex)
          ex.printStackTrace();
        }

    Does that mean that DBCP is not working the way I am
    setting it up or what? Please help!It's probably working the way it should. The DBCP is probably wrapping the OracleConnection in its own wrapper. When you close the wrapper, it just changes its internal state to say it is closed but doesn't actually close the OracleConnection it has a reference to internally.
    Try seeing what class con really is:
    System.out.println(con.getClass().getName());Whatever class that is, it probably has a method to get the real connection so that you can make OracleConnection specific calls. If it does, type cast it to the implementor's Connection Class and get the real internal connection from con before you close it and then check its class name. After you close the con check the isClosed method on the internal OracleConnection.

  • 'Connection has already been closed'. Random error connecting with a pool

    Hi all,
    I've got a problem I cannot solve, and really hope in someone's help...
    The fact is: I'm working on a webapp which doesn't made use of frameworks or patterns or similars. I introduced the DAO pattern in order to organize and speed up the work. At the core of the new classes there is the DBDAO, and this is the way it obtains the connection:
          protected Connection conn = null;           ...             protected Connection getConnection()       {           try           {             if (conn == null || conn.isClosed())             {                     Context ctx = new InitialContext();                 javax.sql.DataSource ds=null;                     ds =(javax.sql.DataSource) ctx.lookup( "agespPool" );                     conn = ds.getConnection();                 conn.setAutoCommit(false);             }           }           catch (Exception ne)     ...
    Every new class that needs to access the db extends DBDAO and retrieves the conn with this method. In order to make things work without changing all the code, I modified the old class named 'Connessione' and made it extend DBDAO. Here is its method:
        public class Connessione extends DBDAO{     ...             public static synchronized Connection getConnessione() throws Exception {             return new Connessione().getConnection();         }
    That's all. Finished with the code.
    Now, if someone uses the new classes extending DBDAO, all goes well. But for some old function that still work with Connessione.getConnessione(), connection closes suddenly with no reason.
    For example, calling a page with some combo box populated with a db connection, you catch a:
        java.sql.SQLException: Connection has already been closed.             at weblogic.jdbc.wrapper.PoolConnection.checkConnection(PoolConnection.java:63)             at weblogic.jdbc.wrapper.ResultSetMetaData.preInvocationHandler(ResultSetMetaData.java:37)             at weblogic.jdbc.wrapper.ResultSetMetaData_oracle_jdbc_driver_OracleResultSetMetaData.getColumnType(Unknown Source)             at it.praxis.tim.agesp.pub.sql.PagingList.populate(PagingList.java:98)             at it.praxis.tim.agesp.pub.sql.PagingList.executeSQL(PagingList.java:53)             at jsp_servlet._jsp._todolist_new._richiesta.__listarichieste._jspService(__listarichieste.java:353)             at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
    or sometimes:
        - 20080417141147: <E> HtmlSelect.createHtmlSelect(4) - Errore!     java.sql.SQLException: Result set already closed     - 20080417141147: <E> HtmlSelect.createHtmlSelect(7) - Errore!     java.sql.SQLException: Connection has already been closed.     - 20080417141147: <E> ERRORE:  ricercaRichieste :     java.sql.SQLException: Statement has already been closed
    That is, the conn is closed while used to populate the combo box. I don't understand who closes it.
    Moreover, that happens randomly: 1 or 2 times over 4 hits on the page. The other times, all goes well. Most of the other pages, all goes well. So I don't think I have to search for a bug in the code.
    Now, I'm working with BEA WL 8.1 sp 5 and Oracle 9.2.0.1.0 .
    The error turns out even if I work locally (with Tomcat 5.5.23).
    The webapp made use of a custom driver beforehand, and I replaced it with oracle's driver.
    I tried to set the Connection Pool with oracle.jdbc.driver.OracleDriver and oracle.jdbc.OracleDriver .
    I left the default for the connection pool, and then tried to set (BEA):
    Connection Reserve Timeout: -1
    Test Created Connections: On
    with no changes.
    The connection suddenly and randomly closes.
    Any help would be appreciated...
    Many thanks

    the thing that you are instantiating isn't a Connection object, it's a Connessione object. That's returning one that's either been stashed from a previous call, or
    acquires one from the data sourcea new Connessione object means a call to getConnection that means a new Connection object. That code is synchronized, it has to be a new object.
    It is entirely possible that conn is not null if other actions have taken place in your constructor. Even assuming it is null, we don't know anything about the
    connection pool you're trying to use, though it looks like it's probably weblogic's one.The contructor doesn't know of the connection. As for the pool, it is weblogic's one.
    And even assuming both of these cases, we have no particular reason to believe that you're calling the getConnessione() method instead of accidentally calling
    getConnection() and thus no reason to believe that you're definitely carrying out the actions that you believe you're carrying out.I wrote that the problem comes out in the old code that once worked fine. That code only uses Connessione.getConnessione() .
    Conversely we have an error message that says you're closing connections elsewhere. Clearly there's a bug. It's presumably in your assumptions. You're
    arguing instead of checking them.If I have a wrapper logging the close() calls, I have to see every call logged. Even if there's a bug (but remember that the code worked fine with a previous custom datasource), why do you think I shouldn't see that close() logged?
    I may be wrong, but I already searched in that code. I'm arguing after all the checks.
    There is no other thread that can see that connHow do you know? I have that Connessione.getConnessione() in a jsp. It's synchronized. That gives a new connection. I see it passed only to an utility class that queries the db and reads the resultset.
    Who do you think can access that connection?

  • RFC connection not disconnected on timeout/logoff.

    Dear Sir,
    We have two systems of ITS, one with ITS 620/patch 16 connected to ECC 5.0 and second, with ITS 620/patch 4 connected with 4.7.
    The one with patch 16 is perfectly working while the one with patch 4 have following problem.
    1. ~event=logoff doesn't close the RFC session to R/3.
    2. After the timeout period i.e set in ~timeout and ~usertimeout parameters set in global services, the RFC connection doesn't get closed.
    Can this be a patch level problem?? or do the following R/3 parameters with 0 value have impact??
    a. em/stat_log_timeout
    b. gw/deallocate_timeout
    c. gw/reg_keepalive
    d. gw/timeout
    Please guide...

    Hi All,
    We are facing the same problem. but we are not using ITS, we are using
    WAS 6.20 on CRM4.0
    Problem is: Open RFC connections build in the system, are not closed after the user sessions are closed / terminated
    Can anyone help us to solve this problem.
    Thanks
    Kishora Reddy

  • Internet connection not waking up with ibook

    Hi. I have an ibook G4 and connect to the internet via Airport Extreme, using a router (Xbox). This has been working perfectly for months. Then recently I had to change some settings on my router. Since then I've found that the ibook won't connect to the internet again after it goes to sleep without me opening and closing the applications several times. It has also suddenly disconnected in the middle of a session once or twice. I've also found that I can't change the configurations on my airport base station without plugging it directly into the ibook, which I didn't have to do before. So far it has all worked in the end, but I hate having no idea why this is happening in case one day it goes down and I can't get it back up again.
    BTW, the airport connection itself seems to be fine.
    Really grateful if anyone can help.
    iBook   Mac OS X (10.4.1)  

    I'm having the same problem with my internet connection not waking up with the ibook...but I have not changed any settings on my router. Also, I didn't have this problem when I first got the machine - it just started doing this a week ago or so. Any ideas?
    Thanks,
    Stephanie
    iBook G4   Mac OS X (10.4.9)  

  • Connection not it's released.

    In what cases the following code wouldn't work?
    I'm doing this procedure to insert records on the database, however, to each record that is inserted is opened a new connection with the database.
    The connection is opened, but it not it's closed.
    Anyone know tell me what may be happening?
    I'm using JDeveloper Studio 11.1.1.4.0.
    ADF Swing.
            ApplicationModule am = null;
            public void adicionaRegistroIcatbEstacaoComView(Estacao estacaoAcess){
                String appModule = "hidro2.gov.snirh.ig.hidro.model.adf.app.AppModuleEstacao";
                String config = "AppModuleEstacaoLocal"; // Config name
                String viewObject = "IcatbEstacaoEnViewUp1";
                try{
                    if (am == null) {       
                        am = Configuration.createRootApplicationModule(appModule, config);
                    ViewObject vo = am.findViewObject(viewObject);
                    Row row = vo.createRow();
                    row.setAttribute("EstId", estacaoAcess.getEstId());
                    row.setAttribute("EstNm" , estacaoAcess.getEstNm());
                    row.setAttribute("EstStrId",estacaoAcess.getEstStrId());
                    row.setAttribute("EstCdFlu", estacaoAcess.getEstCdFlu());
                    row.setAttribute("EstCdPlu", estacaoAcess.getEstCdPlu());
                    row.setAttribute("EstIcCampanha", 0);
                    vo.getApplicationModule().getTransaction().commit();
                } catch (Exception e) {
                    e.printStackTrace();
                } finally {
                    if (am != null) {
                        Configuration.releaseRootApplicationModule(am, true);          
                        am.remove();
      }Edited by: Le on 11/08/2011 09:02

    ADF uses the application module pool, which in turn uses a connection pool. Your code look OK to me, only the am.remove() is a bit fishy as you returned the application module ans told the framework to keep it for reuse. I'm not sure what this am.remove() does in this case.
    The problem I see is that you create a root application module each time you call this function. This is a costly operation, as creating a root application module forced the framework to build it from scratch (and probably use a fresh db connection).
    I'm by no means an expert in ADF Swing, but you should avoid creating an application module each time you call a function. If you reuse an application module (which is the default case for web apps) your connections get reused too.
    Timo

  • Connection has already been closed

    We are on Weblogic 7.0 SP1 on HP UX 11i. Database is Oracle ver 9.0.1.3. Using
    thin driver for database access.
    Intermittently we get the error: "Connection has already been closed" from DAO
    programs. The stack trace shows that this error is preceded by java.sql.SQLException:
    java.lang.NullPointerException. The error is appearing in the finally block when
    we attempt to close the connection if it is not null. Here's the code piece:
    finally {
    try {
    if(connection != null)
    connection.close();
    connection = null;
    } catch (SQLException sqlException) {
    log4j.error(sqlException.toString());
    What we are not able to understand is, this piece of code can be executed only
    if connection object is not null and if so, why this error - 'Connection has already
    been closed'?
    We noticed a bug reported in SP1:
    Bug No: CR062827
    Description : Fixed a problem with prepared statement code that was provoking
    a null pointer exception; the prepared statement object was being set to null.
    Our error message is preceded by Nullpointer Exception and there is a possibility
    that it could be from PreparedStatement due to this bug. But, BEA has not given
    information on what happens to Connection when Prepared Statement throw this exception.
    Whether any of you facing the same kind of problem?
    Thanks in advance,

    chitra wrote:
    Here's the stack trace:
    2003-01-24 10:24:32,510 ERROR [ExecuteThread: '5' for queue: 'default'] (TestDao.java:203)
    - java.sql.SQLException: java.lang.NullPointerException
    2003-01-24 10:24:32,511 ERROR [ExecuteThread: '5' for queue: 'default'] (TestDao.java:228)
    - java.sql.SQLException: Connection has already been closed.
    Sometimes, we also get a different stack trace:
    2003-01-24 10:24:21,171 ERROR [ExecuteThread: '5' for queue: 'default'] (TestDao.java:203)
    - java.sql.SQLException: Closed Statement: next
    2003-01-24 10:24:21,180 ERROR [ExecuteThread: '5' for queue: 'default'] (TestDao.java:228)
    - java.sql.SQLException: Connection has alredy been closed
    ThanksHi, that's not a stacktrace. That's just the error message. Please turn on jdbc logging and show me
    the jdbc log
    file. A full stacktrace will pe printed for every SQLException, showing all the method calls.
    thanks,
    Joe
    >
    >
    Joseph Weinstein <[email protected]> wrote:
    chitra wrote:
    We are on Weblogic 7.0 SP1 on HP UX 11i. Database is Oracle ver 9.0.1.3.Using
    thin driver for database access.
    Intermittently we get the error: "Connection has already been closed"from DAO
    programs. The stack trace shows that this error is preceded by java.sql.SQLException:
    java.lang.NullPointerException. The error is appearing in the finallyblock when
    we attempt to close the connection if it is not null. Here's the codepiece:
    finally {
    try {
    if(connection != null)
    connection.close();
    connection = null;
    } catch (SQLException sqlException) {
    log4j.error(sqlException.toString());
    What we are not able to understand is, this piece of code can be executedonly
    if connection object is not null and if so, why this error - 'Connectionhas already
    been closed'?Let me see the full stacktrace of the NullPointerException and the
    'Connection is already closed' exception.
    As to the code above, I'm not saying you're doing this, but if any code
    above that finally block closed the connection, then you can get the
    'already closed' exception. In other words, connection.close() doesn't
    automatically make the reference null.
    Joe
    We noticed a bug reported in SP1:
    Bug No: CR062827
    Description : Fixed a problem with prepared statement code that wasprovoking
    a null pointer exception; the prepared statement object was being setto null.
    Our error message is preceded by Nullpointer Exception and there isa possibility
    that it could be from PreparedStatement due to this bug. But, BEAhas not given
    information on what happens to Connection when Prepared Statement throwthis exception.
    Whether any of you facing the same kind of problem?
    Thanks in advance,

  • ORCL Failed to connect to database instance: Closed Connection.

    Hi all,
    i am getting ORCL Failed to connect to database instance: Closed Connection, on my work environment but when i look into the database it is ok more over this ticket is generated from GridControl , i checked in trace-file but i haven't got any clue what to do in this case please any one help me on this why it is giving this kind of error
    (ORCL Failed to connect to database instance: Closed Connection.)
    Thanks
    venkat
    Edited by: madala03 on Apr 10, 2013 3:32 AM

    Hi ,
    thanks for the reply i checked in listener log , havent got any connection errors but in sqlnet.log
    i got this
    VERSION INFORMATION:
    TNS for Linux: Version 10.2.0.4.0 - Production
    TCP/IP NT Protocol Adapter for Linux: Version 10.2.0.4.0 - Production
    Time: 10-JAN-2011 12:08:29
    Tracing not turned on.
    Tns error struct:
    ns main err code: 12564
    TNS-12564: TNS:connection refused
    ns secondary err code: 0
    nt main err code: 0
    nt secondary err code: 0
    nt OS err code: 0

  • New error with upgrade jboss/tomcat: "Connection handle has been closed and is unusable"

    Hi,
    This error suddenly appeared when we upgraded from jboss3/tomcat5.0 to jboss4.2/tomcat5.5.
    here's the usecase:
    1) User clicks on report link
    2) Crystal reports web componnent displays screen to fill in report parameters.
    3) user enters parameters and clicks submit
    4) System throws Exception
    The same reports worked fine with jboss 3.2.6/tomcat 5.0. We haven't touched anything in this realm.
    Log Excerpt:
    09:42:18,842 INFO  [datasource] Openning rowset
    09:42:18,904 ERROR [reportdefinition] com.crystaldecisions.reports.queryengine.driverImpl.m: JDBC Error: Connection handle has been closed and is unusable
    09:42:18,905 ERROR [datasource] Failed to open rowset: the query failed to open rowset
    com.crystaldecisions.reports.reportdefinition.datainterface.g: JDBC Error: Connection handle has been closed and is unusable
         at com.crystaldecisions.reports.reportdefinition.datainterface.d.a(Unknown Source)
    To try to narrow down the problem, I've updated the jdbc configuration to
         <track-statements>true</track-statements>   
    here's a recap:
    This Boolean element specifies whether to check for unclosed statements when a connection is returned to the pool. If it is true, a warning message is issued for each unclosed statement. If the log4j category org.jboss.resource.adapter.jdbc.WrappedConnection has trace level enabled, a stack trace of the connection close call is logged as well. This is a debug feature that can be turned off in production.
    Interestingly enough, this error appears slightly upstream:
    (CachedConnectionManager.java:526) - Closing a connection for you.  Please close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection@c76003
    java.lang.Throwable: STACKTRACE
         at
    org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
         at com.crystaldecisions.reports.queryengine.driverImpl.k.a(Unknown Source)
         at com.crystaldecisions.reports.queryengine.driverImpl.o.if(Unknown Source)
         at com.crystaldecisions.reports.queryengine.av.new(Unknown Source)
         at com.crystaldecisions.reports.queryengine.av.byte(Unknown Source)
         at com.crystaldecisions.reports.reportdefinition.datainterface.b.a(Unknown Source)
         at com.crystaldecisions.reports.reportdefinition.datainterface.b.a(Unknown Source)
         at com.crystaldecisions.reports.reportdefinition.datainterface.b.a(Unknown Source)
         at com.crystaldecisions.reports.reportdefinition.datainterface.j.a(Unknown Source)
         at com.crystaldecisions.reports.dataengine.ba.try(Unknown Source)
         at com.crystaldecisions.reports.common.av.a(Unknown Source)
         at com.crystaldecisions.reports.common.ag.a(Unknown Source)
         at com.businessobjects.reports.sdk.b.e.a(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown
    So the question arises:
    1) Is the jboss datasource overly/aggressively closing result sets?
    2) or is there a coding error in CRXIR2?
    thanks,
    bill
    Full stack trace:
    [2008-03-13 17:26:18,905] [INFO ] org.jboss.resource.connectionmanager.CachedConnectionManager (CachedConnectionManager.java:526) - Closing a connection for you.  Please close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection@c76003
    java.lang.Throwable: STACKTRACE
         at org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:290)
         at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:417)
         at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
         at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
         at com.crystaldecisions.reports.queryengine.driverImpl.k.a(Unknown Source)
         at com.crystaldecisions.reports.queryengine.driverImpl.o.if(Unknown Source)
         at com.crystaldecisions.reports.queryengine.av.new(Unknown Source)
         at com.crystaldecisions.reports.queryengine.av.byte(Unknown Source)
         at com.crystaldecisions.reports.reportdefinition.datainterface.b.a(Unknown Source)
         at com.crystaldecisions.reports.reportdefinition.datainterface.b.a(Unknown Source)
         at com.crystaldecisions.reports.reportdefinition.datainterface.b.a(Unknown Source)
         at com.crystaldecisions.reports.reportdefinition.datainterface.j.a(Unknown Source)
         at com.crystaldecisions.reports.dataengine.ba.try(Unknown Source)
         at com.crystaldecisions.reports.common.av.a(Unknown Source)
         at com.crystaldecisions.reports.common.ag.a(Unknown Source)
         at com.businessobjects.reports.sdk.b.e.a(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.y.a(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.r.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.cf.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.z.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ak.if(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ad.int(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.bk.for(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.v.a(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.v.if(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.setTableLocation(Unknown Source)
         at com.crystaldecisions.reports.sdk.DatabaseController.setTableLocation(Unknown Source)
         at org.apache.jsp.reports.processreport_jsp.switchTables(processreport_jsp.java:131)
         at org.apache.jsp.reports.processreport_jsp.loadReport(processreport_jsp.java:68)
         at org.apache.jsp.reports.processreport_jsp._jspService(processreport_jsp.java:227)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.participate.shared.pagecache.client.PageCacheFilter.doFilter(PageCacheFilter.java:760)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.participate.util.servlet.ExpiredPasswordFilter.doFilter(ExpiredPasswordFilter.java:92)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.participate.pe.channels.client.servlet.ChannelUrlFilter.processUrl(ChannelUrlFilter.java:168)
         at com.participate.pe.channels.client.servlet.ChannelUrlFilter.doFilter(ChannelUrlFilter.java:100)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.participate.util.servlet.BlockIpAddressFilter.doFilter(BlockIpAddressFilter.java:224)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.outstart.multiapp.filters.KeepOtherSessionsAliveFilter.doFilter(KeepOtherSessionsAliveFilter.java:88)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.participate.util.servlet.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:151)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
         at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         at java.lang.Thread.run(Thread.java:619)

    <p>
    OK. I found the problem along with a workaround.
    </p>
    <p>
    <strong>The problem:</strong>
    </p>
    <p>
    a programming practice clashes with a new jboss 'safety check'.
    </p>
    <p>
    <strong>Programming practice:</strong>
    </p>
    <p>
    crystal reports gets a database connection in one jsp page, then tries to use it on another jsp/servlet
    </p>
    <p>
    <strong>Jboss safety check:</strong>
    Jboss/tomcat new comes configured out-of-the-box with a 'cached connection
    manager', which
    </p>
    <p>
    "Check[s] for unclosed connections and transaction terminated checks in servlets/jsps."
    </p>
    <p>
    <strong> Summary</strong>
    </p>
    <p>
    In short, if a servlet/jsp ends and it leaves a database connection open, Jboss will automatically close it.
    </p>
    <p>
    </p>
    <p>
    <strong>Workaround:</strong><br />
    Comment out two entries in these two files:
    </p>
    <p>
    1) conf/jboss4/pe/deploy/jboss-web.deployer/server.xml
    </p>
    <p>
    2) conf/jboss4/pe/deploy/jboss-web.deployer/META-INF/jboss-service.xml
    </p>
    <p>
    The two entries:
    </p>
    <p>
    </p>
    <p>
    1)
    </p>
    <p>
                 <Valve className="org.jboss.web.tomcat.service.jca.CachedConnectionValve"<br />
                    cachedConnectionManagerObjectName="jboss.jca:service=CachedConnectionManager"<br />
                    transactionManagerObjectName="jboss:service=TransactionManager" /><br />
    </p>
    <p>
    2)
    </p>
    <p>
          <depends>jboss.jca:service=CachedConnectionManager</depends><br />
    </p>
    <p>
    </p>
    <p>
    <strong>Comments on the workaround</strong>
    </p>
    <p>
    The 'cached connection manager' basically makes sure that the application cleans up after bad programmers. It seems most helpful in development, load testing, or trouble shooting.
    </p>
    <p>
    In production,  you can likely  comment them out with minimal
    impact on the application.
    </p>

  • How can I connect Notes to my iCloud account?

    How can I connect Notes to my iCloud account?

    Go to Settings>iCloud and turn Notes on. You need a 3G or newer iPod

  • My wireless keyboard no longer connects with my iMac since changing the batteries. It now shows as not connected, not paired and not configured. A friend recently connected his iPad to the iMac and since then the problem started. Any ideas to resolve this

    My wireless keyboard no longer connects with my iMac since changing the batteries. It now shows as not connected, not paired and not configured. A friend recently connected his iPad to the iMac and since then the problem started. Any ideas to resolve this?

    a friend told me that he wants my os x cd for my macbook pro to upgrade his imac.
    The discs that come with your Mac are "machine specfic" and cannot be used on another Mac.

Maybe you are looking for

  • Ask again:  Where can I find source code for CPRM algorithm?

    Hi, everyone. Where can I find reference implementation or some sample codes for CPRM(content protection for recordable media) algorithm? Can anyone help? Information about CPRM can be find here, http://www.4centity.com/ JAVA version is preferred and

  • CALL RFC DATA FROM TWO LINKED TABLES IN EXCEL VBA

    Hi, I am using Excel VBA to call information from tables in SAP. This is working correctly, however I now need to be able to call information from another table where the two tables are linked by a common data field. Example. The first table I have l

  • How do I save a Yahoo Mail page to my hard drive?

    I want to save a page of the Yahoo Mail to my hard drive. How do I do that? I have tried saving using "Save page" but that doesn't work. It saves an .html file and a folder file to only certain places. For example my home folder but not to my Downloa

  • Not delivered error when sending photos via messages-photos being received

    When using messages on iPhone 5 to send photos, I receive a not delivered error but the recipient tells me it has been received. I have tried turning phone off/on, signing out of messages on all devices then signing back in. Still occurring. Any idea

  • Photoshop Elements 4 on Intel based iMac

    Wondering if anyone has specifically used Photoshop Elements 4 on the new Intel iMac and if you found it ran slow in Rosetta or had any problems. I see several postings in which Photoshop Elements 3, Photoshop CS and Photoshop CS1 have been used on t