7 Replies Latest reply: Apr 6, 2011 2:20 PM by 796440 RSS

    JDBC ROLLBACK FAILED

    827229
      I use BEA WLS 10.01 with oracle 10g

      i can execute the query on database normally, but on application side i cant.

      When i deploy the application: I got this error:

      "Error 500 --- Internal Server Error" on screen and the error on log file is:

      <[ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1293542999689> <BEA-101020> <[weblogic.servlet.internal.WebAppServletContext@8b865fa - appName: 'Ykm', name: 'Ykm.war', context-path: '/Ykm'] Servlet failed with Exception
      org.hibernate.TransactionException: JDBC rollback failed
           at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:170)
           at com.sgc.framework.db.FilterListener.degisiklikleriGeriAlBaglantiyiKapat(FilterListener.java:57)
           at com.sgc.framework.db.FilterListener.doFilter(FilterListener.java:35)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
           at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3393)
           at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
           at weblogic.security.service.SecurityManager.runAs(Unknown Source)
           at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)
           at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)
           at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
           at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
           at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
      java.sql.SQLException: Closed Connection
           at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
           at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
           at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
           at oracle.jdbc.driver.PhysicalConnection.rollback(PhysicalConnection.java:1142)
           at org.hibernate.transaction.JDBCTransaction.rollbackAndResetAutoCommit(JDBCTransaction.java:183)
           at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:162)
           at com.sgc.framework.db.FilterListener.degisiklikleriGeriAlBaglantiyiKapat(FilterListener.java:57)
           at com.sgc.framework.db.FilterListener.doFilter(FilterListener.java:35)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
           at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3393)
           at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
           at weblogic.security.service.SecurityManager.runAs(Unknown Source)
           at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)
           at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)
           at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
           at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
           at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
        • 1. Re: JDBC ROLLBACK FAILED
          jschellSomeoneStoleMyAlias
          You are attempting some action after the connection is closed. That action fails. Then the framework attempts a rollback which fails because the connection is closed.

          As a guess this is either because you did something odd with the transaction control or because you are attempting something in the database layer that shouldn't be in the database layer at all (like formatting the data for display.)
          • 2. Re: JDBC ROLLBACK FAILED
            827229
            SO genous buddy, what had been changed that causes not to be able to execute the query on application although it could be directly executed on database ?
            That is the point .... ?
            • 3. Re: JDBC ROLLBACK FAILED
              forumKid2
              Executing a query directly on a database using TOAD or SQL Developer, etc? If so, that's not a valid test since you open your database tool and it opens the connection.

              When you bring an application into play you are talking about connection management. So somewhere in your application you are closing the database connection before you are done using it with your query, which is what jschell pointed out.

              Edited by: ForumKid2 on Dec 29, 2010 11:43 AM
              • 4. Re: JDBC ROLLBACK FAILED
                852459
                Use c3p0 properties.

                <!-- c3p0 Connection Pool Properties -->
                <property name="initialPoolSize" value="10" />
                <property name="minPoolSize" value="5" />
                <property name="maxPoolSize" value="25" />
                <property name="acquireRetryAttempts" value="10" />
                <property name="acquireIncrement" value="5" />
                <property name="idleConnectionTestPeriod" value="3600" />
                <property name="maxIdleTime" value="19800" />
                <property name="maxConnectionAge" value="21600" />
                <property name="preferredTestQuery" value="SELECT 1" />
                <property name="testConnectionOnCheckin" value="false" />

                Voila !!
                • 5. Re: JDBC ROLLBACK FAILED
                  abillconsl
                  user13564432 wrote:
                  SO genous buddy, what had been changed that causes not to be able to execute the query on application although it could be directly executed on database ?
                  That is the point .... ?
                  What kind of a reply is that to someone who is trying to help you?
                  • 6. Re: JDBC ROLLBACK FAILED
                    jschellSomeoneStoleMyAlias
                    abillconsl wrote:
                    user13564432 wrote:
                    SO genous buddy, what had been changed that causes not to be able to execute the query on application although it could be directly executed on database ?
                    That is the point .... ?
                    What kind of a reply is that to someone who is trying to help you?
                    Certainly at best a confusing one. I had no idea what they were stating/asking with that.
                    • 7. Re: JDBC ROLLBACK FAILED
                      796440
                      user13564432 wrote:
                      SO genous buddy,
                      Wow, what a jerk.