IBM Support

PI53661: When inside an @Transactional declarative transaction, an error is thrown upon entering an @TransactionScoped context.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • In code running within a transaction started using an
    @Transactional annotation, entering an @TransactionScoped
    context causes an error as shown below:
    
    org.jboss.weld.context.ContextNotActiveException:
    WELD-001303: No active contexts for scope type
    javax.transaction.TransactionScoped
    at
    org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManage
    rImpl.java:708)
    at [user code]
    
    Customers will also see an FFDC output containing the
    following exception:
    
    java.lang.IllegalStateException: UserTransaction method
    forbidden in this context
    at
    com.ibm.tx.jta.embeddable.impl.EmbeddableUserTransactionImpl
    .checkEnabled(EmbeddableUserTransactionImpl.java:157)
    at
    com.ibm.tx.jta.embeddable.impl.EmbeddableUserTransactionImpl
    .getStatus(EmbeddableUserTransactionImpl.java:106)
    at
    com.ibm.ws.transaction.services.UserTransactionService.getSt
    atus(UserTransactionService.java:80)
    at
    com.ibm.tx.jta.cdi.TransactionContext.isActive(TransactionCo
    ntext.java:84)
    
    The underlying cause of this is the implementation of
    TransactionScoped attempting to access UserTransaction while
    it is disabled by the use of the @Transactional annotation.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  Users of IBM WebSphere Application Server   *
    *                  Liberty Profile using the                   *
    *                  @TransactionScoped and @Transactional       *
    *                  annotations between versions 8.5.5.6 and    *
    *                  8.5.5.8                                     *
    ****************************************************************
    * PROBLEM DESCRIPTION: When inside an @Transactional           *
    *                      declarative transaction, an error is    *
    *                      thrown upon entering an                 *
    *                      @TransactionScoped context.             *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    In code running within a transaction started using an
    @Transactional annotation, entering an @TransactionScoped
    context causes an error as shown below:
    
    org.jboss.weld.context.ContextNotActiveException: WELD-001303:
    No active contexts for scope type
    javax.transaction.TransactionScoped
    at
    org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImp
    l.java:708)
    at [user code]
    
    Customers will also see an FFDC output containing the following
    exception:
    
    java.lang.IllegalStateException: UserTransaction method
    forbidden in this context
            at
    com.ibm.tx.jta.embeddable.impl.EmbeddableUserTransactionImpl.che
    ckEnabled(EmbeddableUserTransactionImpl.java:157)
            at
    com.ibm.tx.jta.embeddable.impl.EmbeddableUserTransactionImpl.get
    Status(EmbeddableUserTransactionImpl.java:106)
            at
    com.ibm.ws.transaction.services.UserTransactionService.getStatus
    (UserTransactionService.java:80)
            at
    com.ibm.tx.jta.cdi.TransactionContext.isActive(TransactionContex
    t.java:84)
    
    The underlying cause of this is the implementation of
    TransactionScoped attempting to access UserTransaction while it
    is disabled by the use of the @Transactional annotation.
    

Problem conclusion

  • Declarative transactions disable the UserTransaction interface,
    which the @TransactionScope code was trying to use to get the
    status of the transaction. The code has been altered to use a
    different interface that is never disabled.
    
    The fix for this APAR is currently targeted for inclusion in fix
    pack 8.5.5.9.  Please refer to the Recommended Updates page for
    delivery information:
    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI53661

  • Reported component name

    WAS LIBERTY COR

  • Reported component ID

    5725L2900

  • Reported release

    855

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2015-12-07

  • Closed date

    2015-12-16

  • Last modified date

    2015-12-16

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    WAS LIBERTY COR

  • Fixed component ID

    5725L2900

Applicable component levels

  • R855 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSD28V","label":"WebSphere Application Server Liberty Core"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"855","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
28 April 2022