Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    SQLConnectionManager bug?

    Hi,

    I'm playing with smartgwtEE until one of our customers give us a green light for our project. I use commons-pool (DBCP) for connection pooling with the following configuration.

    Code:
    <Resource name="jdbc/cpceDB"
                     auth="Container"
                     type="javax.sql.DataSource"
                     factory="org.apache.commons.dbcp.BasicDataSourceFactory"
                     driverClassName="oracle.jdbc.driver.OracleDriver"
                     url="jdbc:oracle:thin:@localhost:1521:xe"
                     username="username"
                     password="pwd"
                     initialSize="5"                 
                     maxActive="50"                 
                     maxIdle="-1"
                     maxWait="-1"
                     poolPreparedStatements="false"/>
    I use xml datasource just as the built-in example. After switching from smartgwtEE version 2.1 to 2.3, I get the following Exception every time I make a database operation (read/save etc) but when I replace the "isomorphic_sql.jar" with the previous "isomorphic_sql.jar" from version 2.1 everything works fine.

    Code:
    === 2010-08-20 22:53:05,859 [or19] ERROR SQLConnectionManager - [builtinApplication.CAMP_FIELD_ASSIGNMENT_fetch] Error attempting to commit and close a 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.apache.commons.dbcp.DelegatingConnection.close(DelegatingConnection.java:214)
    	at org.apache.commons.dbcp.PoolableConnection.reallyClose(PoolableConnection.java:102)
    	at com.isomorphic.sql.SQLConnectionManager.free(SQLConnectionManager.java:267)
    	at com.isomorphic.sql.SQLDataSource.executeWindowedSelect(SQLDataSource.java:1590)
    	at com.isomorphic.sql.SQLDataSource.SQLExecute(SQLDataSource.java:1158)
    	at com.isomorphic.sql.SQLDataSource.execute(SQLDataSource.java:251)
    	at com.isomorphic.application.AppBase.executeDefaultDSOperation(AppBase.java:721)
    	at com.isomorphic.application.AppBase.executeAppOperation(AppBase.java:658)
    	at com.isomorphic.application.AppBase.execute(AppBase.java:491)
    	at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1382)
    	at com.tmobile.erpcs.cpce.server.CampainImportDMI.setSelectedCampId(CampainImportDMI.java:28)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:879)
    	at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:553)
    	at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:63)
    	at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1379)
    	at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:155)
    	at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:106)
    	at com.isomorphic.servlet.IDACall.doPost(IDACall.java:54)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
    	at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    	at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    	at com.tmobile.erpcs.cpce.server.filter.SecurityFilter.doFilter(SecurityFilter.java:76)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
    	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873)
    	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
    	at java.lang.Thread.run(Unknown Source)
    It seems there is a bug in the version 2.3 isomorphic_sql.jar
    Last edited by Yared; 20 Aug 2010, 20:47.

    #2
    We aren't seeing this issue with a similar setup (Oracle via DBCP). Please try the most recent nightly and let us know if you see the same issue.

    Comment


      #3
      I just checked the latest nightly from http://www.smartclient.com/builds/Sm...val/2010-09-08 and the issue is no more there.

      Many thanks!

      Comment


        #4
        Sorry, but the issue is still there.

        At first it seems to work. But after some database operations, the same error message started to show up and that every time a database operation is executed.

        Comment

        Working...
        X