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

"Failed to Create Component Instance" when using EntityRepository

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 0.6
    • None
    • Data-Module, JPA-Module
    • None
    • Wildfly 8.0.0

    Description

      I have code being deployed to Wildfly 8.0.0 that makes use of an EntityRepository from the Deltaspike Data Module, injected into a stateless EJB. When I attempt to call a method within the code, I get the following Exception:

      Caused by: java.lang.IllegalStateException: JBAS011048: Failed to construct component instance
      at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:162)
      at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:133)
      at org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:89)
      at org.jboss.as.ejb3.component.interceptors.NonPooledEJBComponentInstanceAssociatingInterceptor.processInvocation(NonPooledEJBComponentInstanceAssociatingInterceptor.java:53) [wildfly-ejb3-8.0.0.Final.jar:8.0.0.Final]
      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
      at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:273) [wildfly-ejb3-8.0.0.Final.jar:8.0.0.Final]
      ... 100 more

      ...

      Caused by: java.lang.IllegalStateException: JBAS014237: Only session and message-driven beans with bean-managed transaction demarcation are allowed to access UserTransaction
      at org.jboss.as.ejb3.component.allowedmethods.AllowedMethodsInformation.realCheckPermission(AllowedMethodsInformation.java:138) [wildfly-ejb3-8.0.0.Final.jar:8.0.0.Final]
      at org.jboss.as.ejb3.component.allowedmethods.AllowedMethodsInformation.checkAllowed(AllowedMethodsInformation.java:112) [wildfly-ejb3-8.0.0.Final.jar:8.0.0.Final]
      at org.jboss.as.ejb3.subsystem.EJB3UserTransactionAccessControlService$1.authorizeAccess(EJB3UserTransactionAccessControlService.java:53) [wildfly-ejb3-8.0.0.Final.jar:8.0.0.Final]
      at org.jboss.as.txn.service.UserTransactionAccessControlService.authorizeAccess(UserTransactionAccessControlService.java:83)
      at org.jboss.as.txn.service.UserTransactionBindingService$1.getReference(UserTransactionBindingService.java:71)
      at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:140)
      ... 198 more

      This code worked flawlessly on JBoss EAP 6.2, so it appears to be something specific to Wildfly. It has not been modified at all. However, if I remove references to my EntityRepository and re-run my code it works without issue.

      Attachments

        Issue Links

          Activity

            People

              thomashug Thomas Hug
              sdnakhla Akhbar Falafel
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: