Uploaded image for project: 'ENTSBT'
  1. ENTSBT
  2. ENTSBT-1332

Enabling pooledPreparedStatements causes a StackOverflowError on transaction timeout.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • db, narayana, springboot
    • None
    • False
    • None
    • False

      If the Narayana transaction manager has dbcp + pooledPreparedStatements enabled, the transactions are not timed out properly.

      It throws the following error:

       

      
      java.lang.StackOverflowError: null
      at java.base/java.lang.StringBuilder.<init>(StringBuilder.java:103) ~[na:na]
      at java.base/java.lang.Object.toString(Object.java:246) ~[na:na]
      at java.base/java.lang.String.valueOf(String.java:2951) ~[na:na]
      at java.base/java.lang.StringBuilder.append(StringBuilder.java:172) ~[na:na]
      at org.apache.commons.pool2.impl.BaseGenericObjectPool.toStringAppendFields(BaseGenericObjectPool.java:1400) ~[commons-pool2-2.9.0.jar:2.9.0]
      at org.apache.commons.pool2.impl.GenericKeyedObjectPool.toStringAppendFields(GenericKeyedObjectPool.java:1626) ~[commons-pool2-2.9.0.jar:2.9.0]
      at java.base/java.lang.String.valueOf(String.java:2951) ~[na:na]
      at java.base/java.lang.StringBuilder.append(StringBuilder.java:172) ~[na:na]
      at org.apache.commons.pool2.impl.GenericKeyedObjectPool.toStringAppendFields(GenericKeyedObjectPool.java:1634) ~[commons-pool2-2.9.0.jar:2.9.0]
      at org.apache.commons.pool2.BaseObject.toString(BaseObject.java:31) ~[commons-pool2-2.9.0.jar:2.9.0]
      at org.apache.commons.dbcp2.PoolingConnection.toString(PoolingConnection.java:606) ~[commons-dbcp2-2.8.0.jar:2.8.0]
      at java.base/java.lang.String.valueOf(String.java:2951) ~[na:na]
      at java.base/java.lang.StringBuilder.append(StringBuilder.java:172) ~[na:na]
      at org.apache.commons.pool2.impl.GenericKeyedObjectPool.toStringAppendFields(GenericKeyedObjectPool.java:1634) ~[commons-pool2-2.9.0.jar:2.9.0]
      at org.apache.commons.pool2.BaseObject.toString(BaseObject.java:31) ~[commons-pool2-2.9.0.jar:2.9.0]
      at org.apache.commons.dbcp2.PoolingConnection.toString(PoolingConnection.java:606) ~[commons-dbcp2-2.8.0.jar:2.8.0]
      at org.apache.commons.dbcp2.DelegatingConnection.checkOpen(DelegatingConnection.java:599) ~[commons-dbcp2-2.8.0.jar:2.8.0]
      at org.apache.commons.dbcp2.DelegatingConnection.prepareStatement(DelegatingConnection.java:298) ~[commons-dbcp2-2.8.0.jar:2.8.0]
      at org.apache.commons.dbcp2.DelegatingConnection.prepareStatement(DelegatingConnection.java:301) ~[commons-dbcp2-2.8.0.jar:2.8.0]
      at org.test.DBController.insertOperation(DBController.java:37) ~[classes/:na]

      Reproducer:

      https://github.com/avi5kdonrh/transaction-timeout

              cmoullia Charles Moulliard
              rhn-support-adongre Avinash Dongre
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: