Uploaded image for project: 'JBoss Cache'
  1. JBoss Cache
  2. JBCACHE-1114

StackOverflowError with Glassfish TransactionManager

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.0.0.CR2, 1.4.1.SP3
    • Fix Version/s: 2.0.0.CR3, 1.4.1.SP4
    • Component/s: None
    • Labels:
      None

      Description

      Problem is Glassfish's Transaction impl includes any registered Synchronization in its toString() output. And then OrderedSynchronizationHandler.toString includes the Transaction in its ouput. Endless loop.

      java.lang.RuntimeException: java.lang.StackOverflowError
      at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:5875)
      at org.jboss.cache.TreeCache._replicate(TreeCache.java:5162)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jgroups.blocks.MethodCall.invoke(MethodCall.java:330)
      at org.jgroups.blocks.RpcDispatcher.handle(RpcDispatcher.java:281)
      at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:650)
      at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:535)
      at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:358)
      at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:775)
      at org.jgroups.JChannel.up(JChannel.java:1091)
      at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:377)
      at org.jgroups.stack.ProtocolStack.receiveUpEvent(ProtocolStack.java:393)
      at org.jgroups.stack.Protocol.passUp(Protocol.java:538)
      at org.jgroups.protocols.pbcast.STATE_TRANSFER.up(STATE_TRANSFER.java:158)
      at org.jgroups.stack.UpHandler.run(Protocol.java:60)
      Caused by: java.lang.StackOverflowError
      at java.lang.String.valueOf(String.java:2615)
      at java.lang.StringBuffer.append(StringBuffer.java:220)
      at org.jboss.cache.interceptors.OrderedSynchronizationHandler.toString(OrderedSynchronizationHandler.java:96)
      at java.lang.String.valueOf(String.java:2615)
      at java.util.AbstractCollection.toString(AbstractCollection.java:454)
      at java.util.Vector.toString(Vector.java:946)
      at java.lang.String.valueOf(String.java:2615)
      at java.lang.StringBuilder.append(StringBuilder.java:116)
      at com.sun.enterprise.distributedtx.J2EETransaction.toString(J2EETransaction.java:602)
      at java.lang.String.valueOf(String.java:2615)
      at java.lang.StringBuffer.append(StringBuffer.java:220)

      Possible solution is for OrderedSynchronizationHandler (and any other JBC Synchronization impl) to not call toString() on the tx, but rather build a String from the classname and the system identity hashcode.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                brian.stansberry Brian Stansberry
                Reporter:
                brian.stansberry Brian Stansberry
              • Votes:
                1 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: