Uploaded image for project: 'DeltaSpike'
  1. DeltaSpike
  2. DELTASPIKE-513

Transactional interceptor throws NPE for missing EntityManager

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.5
    • 0.6
    • JPA-Module
    • None

    Description

      The @Transactional interceptor currently fails with a NullPointerException if no EntityManager can be found for the requested qualifier.

      java.lang.NullPointerException
      	at org.apache.deltaspike.jpa.impl.transaction.ResourceLocalTransactionStrategy.getTransaction(ResourceLocalTransactionStrategy.java:296)
      	at org.apache.deltaspike.jpa.impl.transaction.ResourceLocalTransactionStrategy.rollbackAllTransactions(ResourceLocalTransactionStrategy.java:262)
      	at org.apache.deltaspike.jpa.impl.transaction.ResourceLocalTransactionStrategy.execute(ResourceLocalTransactionStrategy.java:141)
      	at org.apache.deltaspike.jpa.impl.transaction.TransactionalInterceptor.executeInTransaction(TransactionalInterceptor.java:57)
      

      Instead there should be an exception telling the user what exactly is wrong so that it is easier to fix such an issue.

      Attachments

        Issue Links

          Activity

            People

              chkal Christian Kaltepoth
              chkal Christian Kaltepoth
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: