[ https://issues.apache.org/jira/browse/DELTASPIKE-552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13954392#comment-13954392 ]
Akhbar Falafel commented on DELTASPIKE-552: ------------------------------------------- Using @Specializes causes this error on deployment: {code} WELD-001409: Ambiguous dependencies for type TransactionStrategy with qualifiers @Default at injection point [BackedAnnotatedField] @Inject private org.apache.deltaspike.jpa.impl.transaction.TransactionalInterceptor.transactionStrategy at org.apache.deltaspike.jpa.impl.transaction.TransactionalInterceptor.transactionStrategy(TransactionalInterceptor.java:0) Possible dependencies: - Managed Bean [class foo.bar.CustomUserTransactionStrategy] with qualifiers [@Default @Any], - Managed Bean [class org.apache.deltaspike.jpa.impl.transaction.ResourceLocalTransactionStrategy] with qualifiers [@Any @Default] at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:376) at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:289) at org.jboss.weld.bootstrap.Validator.validateInterceptor(Validator.java:552) at org.jboss.weld.bootstrap.ConcurrentValidator$2.doWork(ConcurrentValidator.java:85) at org.jboss.weld.bootstrap.ConcurrentValidator$2.doWork(ConcurrentValidator.java:83) at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60) at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53) at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_51] ... 3 more {code} > "Failed to Create Component Instance" when using EntityRepository > ----------------------------------------------------------------- > > Key: DELTASPIKE-552 > URL: https://issues.apache.org/jira/browse/DELTASPIKE-552 > Project: DeltaSpike > Issue Type: Bug > Components: Data-Module, JPA-Module > Affects Versions: 0.6 > Environment: Wildfly 8.0.0 > Reporter: Akhbar Falafel > Assignee: Thomas Hug > > 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. -- This message was sent by Atlassian JIRA (v6.2#6252)