Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-6244

Disabling transactions results in WARN level UnsupportedOperationException being thrown

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • EAP_EWP 5.1.1 ER2
    • EAP_EWP 5.1.0
    • Seam2
    • None
    • JBoss Enterprise Application Platform 5.1
      Seam 2.2.2.EAP5

    • Hide

      1. Install EAP 5.1
      2. Edit the registration examples 'components.xml' from:

      <?xml version="1.0" encoding="UTF-8"?>
      <components xmlns="http://jboss.com/products/seam/components"
      xmlns:core="http://jboss.com/products/seam/core"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation=
      "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.2.xsd
      http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.2.xsd">
      <core:init jndi-pattern="@jndiPattern@"/>
      </components>

      To:

      <?xml version="1.0" encoding="UTF-8"?>
      <components xmlns="http://jboss.com/products/seam/components"
      xmlns:core="http://jboss.com/products/seam/core"
      xmlns:transaction="http://jboss.com/products/seam/transaction"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.2.xsd http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.2.xsd http://jboss.com/products/seam/transaction http://www.jboss.com/products/seam/transaction-2.2.xsd">
      <core:init jndi-pattern="@jndiPattern@"/>
      <core:init transaction-management-enabled="false"/>
      <transaction:no-transaction/>
      </components>

      3. Access the 'registration' example at http://localhost:8080/seam-registration/register.seam
      4. Observer that the WARN is logged in the server.log

      Show
      1. Install EAP 5.1 2. Edit the registration examples 'components.xml' from: <?xml version="1.0" encoding="UTF-8"?> <components xmlns="http://jboss.com/products/seam/components" xmlns:core="http://jboss.com/products/seam/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.2.xsd http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.2.xsd "> <core:init jndi-pattern="@jndiPattern@"/> </components> To: <?xml version="1.0" encoding="UTF-8"?> <components xmlns="http://jboss.com/products/seam/components" xmlns:core="http://jboss.com/products/seam/core" xmlns:transaction="http://jboss.com/products/seam/transaction" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.2.xsd http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.2.xsd http://jboss.com/products/seam/transaction http://www.jboss.com/products/seam/transaction-2.2.xsd "> <core:init jndi-pattern="@jndiPattern@"/> <core:init transaction-management-enabled="false"/> <transaction:no-transaction/> </components> 3. Access the 'registration' example at http://localhost:8080/seam-registration/register.seam 4. Observer that the WARN is logged in the server.log
    • Workaround Exists
    • Hide

      The issue can be avoided if you do not include <transaction:no-transaction/> in the components.xml as suggested in the documentation.

      Show
      The issue can be avoided if you do not include <transaction:no-transaction/> in the components.xml as suggested in the documentation.
    • Hide
      There was a bug in ending request, where Business context is destroyed in transaction wrapper and it should be done only if a transaction management is set up. If there were set up no transaction management it was wrong to do it and then it fails with NO TRANSACTION available
      Show
      There was a bug in ending request, where Business context is destroyed in transaction wrapper and it should be done only if a transaction management is set up. If there were set up no transaction management it was wrong to do it and then it fails with NO TRANSACTION available
    • Not Yet Documented

      When disabling transactions as described in the documentation [1], an UnsupportedOperationException [2] is logged at WARN level.

      [1] http://docs.redhat.com/docs/en-US/JBoss_Enterprise_Web_Platform/5/html/Seam_Reference_Guide/persistence.seam-managed-transactions.html

      [2] WARN [Contexts] Exception destroying context
      java.lang.UnsupportedOperationException: no transaction
      at org.jboss.seam.transaction.NoTransaction.begin(NoTransaction.java:36)
      at org.jboss.seam.util.Work.workInTransaction(Work.java:58)
      at org.jboss.seam.contexts.Contexts.flushAndDestroyContexts(Contexts.java:350)
      at org.jboss.seam.contexts.FacesLifecycle.endRequest(FacesLifecycle.java:129)
      at org.jboss.seam.jsf.SeamPhaseListener.afterRenderResponse(SeamPhaseListener.java:514)
      at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:249)
      at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:196)
      at com.sun.faces.lifecycle.Phase.handleAfterPhase(Phase.java:175)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:114)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
      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:235)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
      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:158)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)
      at java.lang.Thread.run(Thread.java:636)

            mnovotny@redhat.com Marek Novotny
            rhn-support-jshepher Jason Shepherd
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: