Seam 2
  1. Seam 2
  2. JBSEAM-2977

Infinite loop (until out of memory exception) due to exception swallowing

    Details

    • Type: Bug Bug
    • Status: Closed (View Workflow)
    • Priority: Critical Critical
    • Resolution: Rejected
    • Affects Version/s: 2.0.2.CR1
    • Fix Version/s: None
    • Component/s: Exception Handling
    • Labels:
      None
    • Similar Issues:
      Show 10 results 

      Description

      To Jboss AS 4, I deployed an ear which contained jta-1.0.1B.jar and hibernate-validator, but not hibernate, hibernate-annotations and hibernate-entitymanager.
      This resulted in an infinite loop, until it went out of memory. Here's part of that stacktrace:

      17:33:04,953 ERROR [SeamPhaseListener] uncaught exception
      java.lang.IllegalStateException: Could not commit transaction
      at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener.java:613)
      at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsAfterPhase(SeamPhaseListener.java:341)
      at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:241)
      at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:192)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:280)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.ClassCastException: org.jboss.tm.usertx.client.ServerVMClientUserTransaction cannot be cast to javax.transaction.UserTransaction
      at org.jboss.seam.transaction.Transaction.getUserTransaction(Transaction.java:79)
      at org.jboss.seam.transaction.Transaction.createUTTransaction(Transaction.java:71)
      at org.jboss.seam.transaction.Transaction.getTransaction(Transaction.java:44)
      at sun.reflect.GeneratedMethodAccessor101.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
      at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
      at org.jboss.seam.Component.callComponentMethod(Component.java:2082)
      at org.jboss.seam.Component.unwrap(Component.java:2108)
      at org.jboss.seam.Component.getInstance(Component.java:1887)
      at org.jboss.seam.Component.getInstance(Component.java:1852)
      at org.jboss.seam.Component.getInstance(Component.java:1829)
      at org.jboss.seam.Component.getInstance(Component.java:1824)
      at org.jboss.seam.transaction.Transaction.instance(Transaction.java:36)
      at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener.java:600)
      ... 24 more
      17:33:04,968 ERROR [Contexts] could not discover transaction status
      17:33:04,984 ERROR [SeamPhaseListener] uncaught exception
      java.lang.ClassCastException: org.jboss.tm.usertx.client.ServerVMClientUserTransaction cannot be cast to javax.transaction.UserTransaction
      at org.jboss.seam.transaction.Transaction.getUserTransaction(Transaction.java:79)
      at org.jboss.seam.transaction.Transaction.createUTTransaction(Transaction.java:71)
      at org.jboss.seam.transaction.Transaction.getTransaction(Transaction.java:44)
      at sun.reflect.GeneratedMethodAccessor101.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
      at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
      at org.jboss.seam.Component.callComponentMethod(Component.java:2082)
      at org.jboss.seam.Component.unwrap(Component.java:2108)
      at org.jboss.seam.Component.getInstance(Component.java:1887)
      at org.jboss.seam.Component.getInstance(Component.java:1852)
      at org.jboss.seam.Component.getInstance(Component.java:1829)
      at org.jboss.seam.Component.getInstance(Component.java:1824)
      at org.jboss.seam.transaction.Transaction.instance(Transaction.java:36)
      at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsBeforePhase(SeamPhaseListener.java:317)
      at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:140)
      at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:114)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
      at java.lang.Thread.run(Thread.java:619)
      17:33:04,984 ERROR [SeamPhaseListener] swallowing exception
      java.lang.ClassCastException: org.jboss.tm.usertx.client.ServerVMClientUserTransaction cannot be cast to javax.transaction.UserTransaction
      at org.jboss.seam.transaction.Transaction.getUserTransaction(Transaction.java:79)
      at org.jboss.seam.transaction.Transaction.createUTTransaction(Transaction.java:71)
      at org.jboss.seam.transaction.Transaction.getTransaction(Transaction.java:44)
      at sun.reflect.GeneratedMethodAccessor101.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
      at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
      at org.jboss.seam.Component.callComponentMethod(Component.java:2082)
      at org.jboss.seam.Component.unwrap(Component.java:2108)
      at org.jboss.seam.Component.getInstance(Component.java:1887)
      at org.jboss.seam.Component.getInstance(Component.java:1852)
      at org.jboss.seam.Component.getInstance(Component.java:1829)
      at org.jboss.seam.Component.getInstance(Component.java:1824)
      at org.jboss.seam.transaction.Transaction.instance(Transaction.java:36)
      at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsBeforePhase(SeamPhaseListener.java:317)
      at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:140)
      at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:114)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
      at java.lang.Thread.run(Thread.java:619)
      17:33:05,000 ERROR [SeamPhaseListener] uncaught exception
      java.lang.IllegalStateException: Could not commit transaction
      at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener.java:613)
      at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsAfterPhase(SeamPhaseListener.java:341)
      at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:241)
      at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:192)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:280)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.ClassCastException: org.jboss.tm.usertx.client.ServerVMClientUserTransaction cannot be cast to javax.transaction.UserTransaction
      at org.jboss.seam.transaction.Transaction.getUserTransaction(Transaction.java:79)
      at org.jboss.seam.transaction.Transaction.createUTTransaction(Transaction.java:71)
      at org.jboss.seam.transaction.Transaction.getTransaction(Transaction.java:44)
      at sun.reflect.GeneratedMethodAccessor101.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
      at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
      at org.jboss.seam.Component.callComponentMethod(Component.java:2082)
      at org.jboss.seam.Component.unwrap(Component.java:2108)
      at org.jboss.seam.Component.getInstance(Component.java:1887)
      at org.jboss.seam.Component.getInstance(Component.java:1852)
      at org.jboss.seam.Component.getInstance(Component.java:1829)
      at org.jboss.seam.Component.getInstance(Component.java:1824)
      at org.jboss.seam.transaction.Transaction.instance(Transaction.java:36)
      at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener.java:600)
      ... 24 more
      17:33:05,015 ERROR [Contexts] could not discover transaction status
      17:33:05,015 ERROR [SeamPhaseListener] uncaught exception
      java.lang.ClassCastException: org.jboss.tm.usertx.client.ServerVMClientUserTransaction cannot be cast to javax.transaction.UserTransaction
      at org.jboss.seam.transaction.Transaction.getUserTransaction(Transaction.java:79)
      at org.jboss.seam.transaction.Transaction.createUTTransaction(Transaction.java:71)
      at org.jboss.seam.transaction.Transaction.getTransaction(Transaction.java:44)
      at sun.reflect.GeneratedMethodAccessor101.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
      at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
      at org.jboss.seam.Component.callComponentMethod(Component.java:2082)
      at org.jboss.seam.Component.unwrap(Component.java:2108)
      at org.jboss.seam.Component.getInstance(Component.java:1887)
      at org.jboss.seam.Component.getInstance(Component.java:1852)
      at org.jboss.seam.Component.getInstance(Component.java:1829)
      at org.jboss.seam.Component.getInstance(Component.java:1824)
      at org.jboss.seam.transaction.Transaction.instance(Transaction.java:36)
      at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsBeforePhase(SeamPhaseListener.java:317)
      at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:140)
      at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:114)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
      at java.lang.Thread.run(Thread.java:619)

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Pete Muir added a comment -

            Don't deploy jta-*.jar to jboss as.

            Show
            Pete Muir added a comment - Don't deploy jta-*.jar to jboss as.
            Hide
            Geoffrey De Smet added a comment -

            euhm

            I indeed caused it by a wrongful action (and I 've made many trying to deploy to JBoss AS 4...),
            but that shouldn't be able to cause an infinite loop.
            It brings down the other applications deployed on the same server.

            What if, instead of a ClassCastException, a DivideByZeroException (based on a random generated number that I use to divide by to initialize my solver algorithm) or an OutOfMemorryError is thrown, or a YouHaveNeverHeardOfThisException?
            Hibernate, Spring (and most of Seam) are developer friendly and deal with misconfiguration by generating a single, readable exception.

            Can I reopen this issue?

            Show
            Geoffrey De Smet added a comment - euhm I indeed caused it by a wrongful action (and I 've made many trying to deploy to JBoss AS 4...), but that shouldn't be able to cause an infinite loop. It brings down the other applications deployed on the same server. What if, instead of a ClassCastException, a DivideByZeroException (based on a random generated number that I use to divide by to initialize my solver algorithm) or an OutOfMemorryError is thrown, or a YouHaveNeverHeardOfThisException? Hibernate, Spring (and most of Seam) are developer friendly and deal with misconfiguration by generating a single, readable exception. Can I reopen this issue?
            Hide
            Pete Muir added a comment -

            No, the exception is correct, and this is the wrong JIRA for JBoss Transaction JIRAs.

            Show
            Pete Muir added a comment - No, the exception is correct, and this is the wrong JIRA for JBoss Transaction JIRAs.
            Hide
            Geoffrey De Smet added a comment -

            Yes, the exception is correct, but the infinite loop is not: imho, no exception thrown should be able to cause an infinite loop and kill (or hurt) the other applications deployed to the application server (due to resource starvation).

            Do you mean the fault is in JBoss Transaction, not JBoss Seam? If so, can we move the issue there?

            Show
            Geoffrey De Smet added a comment - Yes, the exception is correct, but the infinite loop is not: imho, no exception thrown should be able to cause an infinite loop and kill (or hurt) the other applications deployed to the application server (due to resource starvation). Do you mean the fault is in JBoss Transaction, not JBoss Seam? If so, can we move the issue there?

              People

              • Assignee:
                Unassigned
                Reporter:
                Geoffrey De Smet
              • Votes:
                2 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Development