[jira] [Commented] (DELTASPIKE-552) "Failed to Create Component Instance" when using EntityRepository
[ https://issues.apache.org/jira/browse/DELTASPIKE-552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13954838#comment-13954838 ] Akhbar Falafel commented on DELTASPIKE-552: --- Excellent! That solved our issues with EAR files on Wildfly. Thanks for your guidance on this! > "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)
[jira] [Commented] (DELTASPIKE-552) "Failed to Create Component Instance" when using EntityRepository
[ https://issues.apache.org/jira/browse/DELTASPIKE-552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13954668#comment-13954668 ] Gerhard Petracek commented on DELTASPIKE-552: - if you need CMT you just need an empty TransactionStrategy which just uses return invocationContext.proceed(); > "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)
[jira] [Commented] (DELTASPIKE-552) "Failed to Create Component Instance" when using EntityRepository
[ https://issues.apache.org/jira/browse/DELTASPIKE-552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13954664#comment-13954664 ] Akhbar Falafel commented on DELTASPIKE-552: --- So can I not use CMT with EntityRepository? I'm forced to use BMT? > "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)
[jira] [Commented] (DELTASPIKE-552) "Failed to Create Component Instance" when using EntityRepository
[ https://issues.apache.org/jira/browse/DELTASPIKE-552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13954609#comment-13954609 ] Gerhard Petracek commented on DELTASPIKE-552: - that means that it doesn't work in an ear-file (since it works in a war-file) or you are using CMT instead of BMT. to check #1 you can inject TransactionStrategy e.g. in a @Startup ejb and log the class which gets used. > "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)
[jira] [Commented] (DELTASPIKE-552) "Failed to Create Component Instance" when using EntityRepository
[ https://issues.apache.org/jira/browse/DELTASPIKE-552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13954501#comment-13954501 ] Akhbar Falafel commented on DELTASPIKE-552: --- That results in... {code} Caused by: org.apache.deltaspike.data.api.QueryInvocationException: Failed calling Repository: [Repository=foo.bar.MyEntityRepository,entity=foo.bar.MyEntity,method=save,exception=class java.lang.IllegalStateException,message=A JTA EntityManager cannot use getTransaction() at org.apache.deltaspike.data.impl.handler.QueryHandler.invoke(QueryHandler.java:92) [deltaspike-data-module-impl-0.6.jar:0.6] at com.sun.proxy.$Proxy279.save(Unknown Source) at foo.bar.services.MyEntityManagerEJB.performTest(MyEntityManagerEJB.java:179) [MyProject-services-0.1-SNAPSHOT.jar:] ... 140 more Caused by: java.lang.IllegalStateException: A JTA EntityManager cannot use getTransaction() {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)
[jira] [Commented] (DELTASPIKE-552) "Failed to Create Component Instance" when using EntityRepository
[ https://issues.apache.org/jira/browse/DELTASPIKE-552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13954401#comment-13954401 ] Gerhard Petracek commented on DELTASPIKE-552: - you might get an issue with ear-files. in a war-file the approach with @Alternative works. maybe global alternatives help in your case: annotate CustomUserTransactionStrategy with @Alternative but remove any config in beans.xml instead add the config to META-INF/apache-deltaspike.properties content: globalAlternatives.org.apache.deltaspike.jpa.impl.transaction.ResourceLocalTransactionStrategy=[your package].CustomUserTransactionStrategy > "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)
[jira] [Commented] (DELTASPIKE-552) "Failed to Create Component Instance" when using EntityRepository
[ 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)
[jira] [Commented] (DELTASPIKE-552) "Failed to Create Component Instance" when using EntityRepository
[ https://issues.apache.org/jira/browse/DELTASPIKE-552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13954388#comment-13954388 ] Romain Manni-Bucau commented on DELTASPIKE-552: --- hmm looks like a wildfly big. You can try @Specializes instead of @Alternative as workaround > "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)
[jira] [Commented] (DELTASPIKE-552) "Failed to Create Component Instance" when using EntityRepository
[ https://issues.apache.org/jira/browse/DELTASPIKE-552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13954385#comment-13954385 ] Akhbar Falafel commented on DELTASPIKE-552: --- Yes, of course. That's what I had. :) I still get the same error. > "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)
[jira] [Commented] (DELTASPIKE-552) "Failed to Create Component Instance" when using EntityRepository
[ https://issues.apache.org/jira/browse/DELTASPIKE-552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13954380#comment-13954380 ] Romain Manni-Bucau commented on DELTASPIKE-552: --- foo.bar.YourImpl was a sample it needs to be the qualified name of CustomUserTransactionStrategy > "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)
[jira] [Commented] (DELTASPIKE-552) "Failed to Create Component Instance" when using EntityRepository
[ https://issues.apache.org/jira/browse/DELTASPIKE-552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13954373#comment-13954373 ] Akhbar Falafel commented on DELTASPIKE-552: --- Yes, but when I do I get this error on startup: {code} WELD-001422: Enabled alternative foo.bar.YourImpl in vfs:/Volumes/Untitled/Servers/wildfly-8.0.1.Final-SNAPSHOT/standalone/deployments/MyProject-ear.ear/MyProject-services-0.1-SNAPSHOT.jar/META-INF/beans.xml@10 is not an alternative {code} Thoughts? > "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)
[jira] [Commented] (DELTASPIKE-552) "Failed to Create Component Instance" when using EntityRepository
[ https://issues.apache.org/jira/browse/DELTASPIKE-552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13954369#comment-13954369 ] Romain Manni-Bucau commented on DELTASPIKE-552: --- Did you activate the alternative? {code} foo.bar.YourImpl {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)
[jira] [Commented] (DELTASPIKE-552) "Failed to Create Component Instance" when using EntityRepository
[ https://issues.apache.org/jira/browse/DELTASPIKE-552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13954364#comment-13954364 ] Akhbar Falafel commented on DELTASPIKE-552: --- H... I've tried incorporating the code in that workaround, but it isn't being called. Here's what I've got implemented: {code} @Dependent @Alternative public class CustomUserTransactionStrategy extends BeanManagedUserTransactionStrategy { private static final long serialVersionUID = 820285503281945663L; /* * (non-Javadoc) * * @see * org.apache.deltaspike.jpa.impl.transaction.BeanManagedUserTransactionStrategy * #resolveUserTransaction() */ @Override protected UserTransaction resolveUserTransaction() { InitialContext context = null; try { context = new InitialContext(); UserTransaction returnUserTransaction = (javax.transaction.UserTransaction) context .lookup("java:comp/UserTransaction"); return returnUserTransaction; } catch (NamingException ne) { try { javax.transaction.UserTransaction ut = (javax.transaction.UserTransaction) context .lookup("UserTransaction"); ut.getStatus(); return ut; } catch (NamingException ne2) { // // Try the other JBoss location // return (UserTransaction) context // .lookup("java:jboss/UserTransaction"); } catch (Exception e) { // throw ne; } } UserTransaction returnUserTransaction = super.resolveUserTransaction(); return returnUserTransaction; } } {code} Am I missing something? Is there something more I need to do? beans.xml modifications? > "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) >
[jira] [Commented] (DELTASPIKE-552) "Failed to Create Component Instance" when using EntityRepository
[ https://issues.apache.org/jira/browse/DELTASPIKE-552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13951304#comment-13951304 ] Gerhard Petracek commented on DELTASPIKE-552: - see the github link posted by ken (it contains a workaround -> the basic approach can be used for a custom implementation of #resolveUserTransaction) > "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)
[jira] [Commented] (DELTASPIKE-552) "Failed to Create Component Instance" when using EntityRepository
[ https://issues.apache.org/jira/browse/DELTASPIKE-552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13951297#comment-13951297 ] Akhbar Falafel commented on DELTASPIKE-552: --- Gerhard -- I'm not seeing any recommendations for workaround in WFLY-2936. Maybe I'm just missing it. Can you shed some light on it? > "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)
[jira] [Commented] (DELTASPIKE-552) "Failed to Create Component Instance" when using EntityRepository
[ https://issues.apache.org/jira/browse/DELTASPIKE-552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13951216#comment-13951216 ] Romain Manni-Bucau commented on DELTASPIKE-552: --- FYI https://issues.jboss.org/browse/WFLY-2960 and https://issues.jboss.org/browse/WFLY-2936 > "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)