Announcement

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

    Error : Error attempting to commit and close a connection when fetching data using DS

    1. SmartGWTPower: 2.4, Hosted Mode, Firefox 4
    2.

    === 2011-07-05 15:34:23,711 [l0-5] ERROR SQLConnectionManager - [builtinApplication.FILEIMPORTCatalogExistData_fetch] Error attempting to commit and close a connection
    java.sql.SQLException: Protocol violation
    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:120)
    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:137)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:250)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:330)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:355)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:598)
    at oracle.jdbc.driver.T4C7Ocommoncall.receive(T4C7Ocommoncall.java:136)
    at oracle.jdbc.driver.T4CConnection.logoff(T4CConnection.java:597)
    at oracle.jdbc.driver.PhysicalConnection.close(PhysicalConnection.java:4864)
    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:268)
    at com.isomorphic.sql.SQLDataSource.executeWindowedSelect(SQLDataSource.java:1820)
    at com.isomorphic.sql.SQLDataSource.SQLExecute(SQLDataSource.java:1287)
    at com.isomorphic.sql.SQLDataSource.processRequest(SQLDataSource.java:280)
    at com.isomorphic.sql.SQLDataSource.executeFetch(SQLDataSource.java:224)
    at com.isomorphic.datasource.DataSource.execute(DataSource.java:1048)
    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:1443)
    at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:173)
    at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:130)
    at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:95)
    at com.isomorphic.servlet.IDACall.doPost(IDACall.java:54)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:324)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
    at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
    at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
    at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
    === 2011-07-05 15:34:23,711 [l0-5] ERROR IDACall - Top-level servlet error:
    java.lang.OutOfMemoryError: Java heap space
    at oracle.jdbc.driver.PhysicalConnection.getCharBuffer(PhysicalConnection.java:12650)
    at oracle.jdbc.driver.OracleStatement.prepareAccessors(OracleStatement.java:1044)
    at oracle.jdbc.driver.T4CTTIdcb.receiveCommon(T4CTTIdcb.java:262)
    at oracle.jdbc.driver.T4CTTIdcb.receive(T4CTTIdcb.java:126)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1047)
    at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:188)
    at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:1011)
    at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:1118)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1472)
    at oracle.jdbc.driver.OracleStatement.doScrollExecuteCommon(OracleStatement.java:7176)
    at oracle.jdbc.driver.OracleStatement.doScrollStmtExecuteQuery(OracleStatement.java:7366)
    at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1743)
    at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:1279)
    at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
    at com.isomorphic.sql.SQLDataSource.executeWindowedSelect(SQLDataSource.java:1741)
    at com.isomorphic.sql.SQLDataSource.SQLExecute(SQLDataSource.java:1287)
    at com.isomorphic.sql.SQLDataSource.processRequest(SQLDataSource.java:280)
    at com.isomorphic.sql.SQLDataSource.executeFetch(SQLDataSource.java:224)
    at com.isomorphic.datasource.DataSource.execute(DataSource.java:1048)
    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:1443)
    at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:173)
    at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:130)
    at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:95)
    at com.isomorphic.servlet.IDACall.doPost(IDACall.java:54)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)

    Please let me know the reason for the above exception.

    #2
    A number of things can go wrong once you run out of memory.

    java.lang.OutOfMemoryError: Java heap space
    Try increasing the max heap size (-Xmx setting ) when launching dev mode.

    Comment


      #3
      Before heap issues there is a exception when the datasource trying to get data. I am not sure whether the issues is from the datasource or anwhere else.


      Tried and doesn't work when i increased the hep memory
      Last edited by krishnafse2009; 5 Jul 2011, 12:06.

      Comment


        #4
        I able to identify the root of the issues.

        dataExistGrid.setGroupByMaxRecords(10000) is causing the problem. When ever i try to group the records more than 1000, i am running into trouble.

        Please let me know how to address the group by. I need to group by the data.

        Comment


          #5
          Set the memory larger. This only affects hosted mode, as in compiled mode there is no JVM to run out of memory.

          Keep in mind, depending on whether you need to support IE6, you may not want to load more than about 2000 records for client-side grouping. Beyond this limit, for older browsers, use a TreeGrid with load on demand instead.

          Comment


            #6
            The issue comes in IE 8 and hosted Mode/deployed.

            Comment


              #7
              If you're loading 1000 records from the server and running out of memory on the server, you have some kind of severe installation issue. On any kind of normal machine, this won't happen until somewhere upwards of 1M records at least.

              Comment


                #8
                There is no server issue here. When I try to fetch data using a datasource attached to a grid, I am getting the exception. In the grid I am using group by. When ever i use group in a grid that has more than 1000 records we are getting this exception. The issues i groupbyfield and not hte server. All other 200+ DS are working fine . they dont have the group by.

                Could you pls provide me any example that has the below criteria:

                Listgrid that has 10000+ records to be displayed and group by a field.
                Last edited by krishnafse2009; 6 Jul 2011, 09:55.

                Comment


                  #9
                  You posted a stack trace and it's a server-side stack trace. If you're getting some other error that's not from the server, post that error.

                  Comment


                    #10
                    I posted the server side stack trace. you are correct. I dont have any stacke trace other than the server.

                    My question is: how come all other DS works and one particular DS does not which has the groupbyField and returns 10000 records.

                    I am able to get a listgrid with data (300) records abd the group by field.

                    the whole issues datasource throws a exception if there any group by field is invoked on 1000+ records comes as a result.
                    I did not see any issues in server becos there is no server side code for fetching the data. only DS fetches the data from the server.

                    Why there is always a protocal violation when you use groupbyField which returns more than 1000+ records. Pls see the stack trace again.
                    === 2011-07-06 14:04:42,134 [l0-2] ERROR SQLConnectionManager - [builtinApplication.FILEIMPORTCatalogExistData_fetch] Error attempting to commit and close a connection
                    java.sql.SQLException: Protocol violation
                    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:120)
                    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:137)
                    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:250)
                    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:330)
                    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:355)
                    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:598)
                    at oracle.jdbc.driver.T4C7Ocommoncall.receive(T4C7Ocommoncall.java:136)
                    at oracle.jdbc.driver.T4CConnection.logoff(T4CConnection.java:597)
                    at oracle.jdbc.driver.PhysicalConnection.close(PhysicalConnection.java:4864)
                    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:268)
                    at com.isomorphic.sql.SQLDataSource.executeWindowedSelect(SQLDataSource.java:1820)
                    at com.isomorphic.sql.SQLDataSource.SQLExecute(SQLDataSource.java:1287)
                    at com.isomorphic.sql.SQLDataSource.processRequest(SQLDataSource.java:280)
                    at com.isomorphic.sql.SQLDataSource.executeFetch(SQLDataSource.java:224)
                    at com.isomorphic.datasource.DataSource.execute(DataSource.java:1048)
                    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:1443)
                    at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:173)
                    at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:130)
                    at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:95)
                    at com.isomorphic.servlet.IDACall.doPost(IDACall.java:54)
                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
                    at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
                    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
                    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
                    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
                    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
                    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
                    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
                    at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
                    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
                    at org.mortbay.jetty.Server.handle(Server.java:324)
                    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
                    at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
                    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
                    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
                    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
                    at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
                    at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
                    === 2011-07-06 14:04:42,134 [l0-2] ERROR IDACall - Top-level servlet error:
                    java.lang.OutOfMemoryError: Java heap space
                    at oracle.jdbc.driver.PhysicalConnection.getCharBuffer(PhysicalConnection.java:12650)
                    at oracle.jdbc.driver.OracleStatement.prepareAccessors(OracleStatement.java:1044)
                    at oracle.jdbc.driver.T4CTTIdcb.receiveCommon(T4CTTIdcb.java:262)
                    at oracle.jdbc.driver.T4CTTIdcb.receive(T4CTTIdcb.java:126)
                    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1047)
                    at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:188)
                    at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:1011)
                    at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:1118)
                    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1472)
                    at oracle.jdbc.driver.OracleStatement.doScrollExecuteCommon(OracleStatement.java:7176)
                    at oracle.jdbc.driver.OracleStatement.doScrollStmtExecuteQuery(OracleStatement.java:7366)
                    at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1743)
                    at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:1279)
                    at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
                    at com.isomorphic.sql.SQLDataSource.executeWindowedSelect(SQLDataSource.java:1741)
                    at com.isomorphic.sql.SQLDataSource.SQLExecute(SQLDataSource.java:1287)
                    at com.isomorphic.sql.SQLDataSource.processRequest(SQLDataSource.java:280)
                    at com.isomorphic.sql.SQLDataSource.executeFetch(SQLDataSource.java:224)
                    at com.isomorphic.datasource.DataSource.execute(DataSource.java:1048)
                    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:1443)
                    at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:173)
                    at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:130)
                    at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:95)
                    at com.isomorphic.servlet.IDACall.doPost(IDACall.java:54)
                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
                    at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
                    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
                    Last edited by krishnafse2009; 6 Jul 2011, 10:13.

                    Comment


                      #11
                      Look further down the stack - an out of memory error precedes the protocol violation error. The protocol violation is just some later consequence of running out of memory - fix the out of memory error by increasing the heap size, and the protocol violation will go away.

                      Comment

                      Working...
                      X