[JBoss JIRA] (JGRP-1697) Timeout in FLUSH will block all cluster
by Bela Ban (JIRA)
[ https://issues.jboss.org/browse/JGRP-1697?page=com.atlassian.jira.plugin.... ]
Bela Ban reassigned JGRP-1697:
------------------------------
Assignee: Vladimir Blagojevic (was: Bela Ban)
> Timeout in FLUSH will block all cluster
> ---------------------------------------
>
> Key: JGRP-1697
> URL: https://issues.jboss.org/browse/JGRP-1697
> Project: JGroups
> Issue Type: Bug
> Environment: 3.4.0.Alpha2
> Reporter: shen kim
> Assignee: Vladimir Blagojevic
> Fix For: 3.5
>
>
> When I defined FLUSH like this:
> <UDP />
> <PING />
> <MERGE2 />
> <FD_SOCK />
> <FD_ALL />
> <VERIFY_SUSPECT />
> <pbcast.NAKACK2 />
> <UNICAST3 />
> <pbcast.STABLE />
> <pbcast.GMS />
> <UFC />
> <MFC />
> <FRAG2 />
> <pbcast.STATE_TRANSFER />
> <pbcast.FLUSH timeout="0"/>
> If I set timeout to 0, and sending message to all cluster, the all cluster would be block until the new member join cluster.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 3 months
[JBoss JIRA] (JGRP-1795) OOBTest testRandomRegularAndOOBMulticasts fails to receive all messages
by Richard Achmatowicz (JIRA)
[ https://issues.jboss.org/browse/JGRP-1795?page=com.atlassian.jira.plugin.... ]
Richard Achmatowicz commented on JGRP-1795:
-------------------------------------------
Preliminary results from the QA lab look good - this failure is no longer occurring in the cases where it was previously for the three or four jobs I have looked at.
> OOBTest testRandomRegularAndOOBMulticasts fails to receive all messages
> -----------------------------------------------------------------------
>
> Key: JGRP-1795
> URL: https://issues.jboss.org/browse/JGRP-1795
> Project: JGroups
> Issue Type: Bug
> Affects Versions: 3.2.13
> Environment: RHEL(3/24), WIN (1/6), Solaris (6/24) where (x/y) means x failures over y test executions.
> Reporter: Richard Achmatowicz
> Assignee: Bela Ban
> Fix For: 3.2.13
>
>
> This test does the following with two channels a and b:
> - adds a DISCARD layer to a to disccard 50% of down messages
> - sends 20 messages to the group, randomly using a and b as senders, and randomly choosing OOB or non-OOB
> - wait 10 seconds for 20 messages to be received by each of a and b
> - print out the messages received
> - remove the DISCARD layer from a
> - wait 2.5 seconds for further messages to arrive
> - assert that 20 messages have arrived for each channel a and b
> The test fails on the assertion, with results such as:
> {noformat}
> expected 20 elements, but got 19 (list=[1, 4, 3, 8, 6, 7, 10, 13, 15, 20, 2, 5, 9, 12, 14, 16, 17, 18, 19]), missing=[0, 11]
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 3 months
[JBoss JIRA] (DROOLS-443) WELD-001408 Unsatisfied dependencies for type [Bpmn2TypeDefinition] with qualifiers [@Default] at injection point [[field] @Inject private org.jbpm.designer.validation.BPMN2FileNameValidator.resourceType]
by Ivan Flores Correa (JIRA)
Ivan Flores Correa created DROOLS-443:
-----------------------------------------
Summary: WELD-001408 Unsatisfied dependencies for type [Bpmn2TypeDefinition] with qualifiers [@Default] at injection point [[field] @Inject private org.jbpm.designer.validation.BPMN2FileNameValidator.resourceType]
Key: DROOLS-443
URL: https://issues.jboss.org/browse/DROOLS-443
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 6.1.0.Final
Environment: Ubuntu Linux - jboss-as-7.1.1.Final
Reporter: Ivan Flores Correa
Assignee: Mark Proctor
Today update source and install librery, but to deploy kie-wb in jboss-as-7.1.1.Final, this error show me, and not deploy
11:55:57,511 WARN [org.jboss.weld.Bootstrap] (MSC service thread 1-8) WELD-001440 Scope type @javax.enterprise.context.RequestScoped() used on injection point [field] @RequestScoped @Inject private org.jbpm.designer.repository.vfs.VFSRepository.descriptor
11:55:57,527 INFO [org.jboss.errai.cdi.server.events.ShutdownEventObserver] (MSC service thread 1-8) Shutting down CDI-to-ErraiBus event bridge
11:55:57,531 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC00001: Failed to start service jboss.deployment.unit."kie-wb-6.1.0-SNAPSHOT-jboss-as7.war".WeldService: org.jboss.msc.service.StartException in service jboss.deployment.unit."kie-wb-6.1.0-SNAPSHOT-jboss-as7.war".WeldService: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [Bpmn2TypeDefinition] with qualifiers [@Default] at injection point [[field] @Inject private org.jbpm.designer.validation.BPMN2FileNameValidator.resourceType]
at org.jboss.as.weld.services.WeldService.start(WeldService.java:83)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_45]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45]
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [Bpmn2TypeDefinition] with qualifiers [@Default] at injection point [[field] @Inject private org.jbpm.designer.validation.BPMN2FileNameValidator.resourceType]
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:275)
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:244)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:107)
at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:127)
at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:346)
at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:331)
at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:366)
at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:83)
at org.jboss.as.weld.services.WeldService.start(WeldService.java:76)
... 5 more
11:55:57,755 INFO [org.jboss.as.server] (HttpManagementService-threads - 5) JBAS015870: Deploy of deployment "kie-wb-6.1.0-SNAPSHOT-jboss-as7.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"kie-wb-6.1.0-SNAPSHOT-jboss-as7.war\".WeldService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"kie-wb-6.1.0-SNAPSHOT-jboss-as7.war\".WeldService: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [Bpmn2TypeDefinition] with qualifiers [@Default] at injection point [[field] @Inject private org.jbpm.designer.validation.BPMN2FileNameValidator.resourceType]"}}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 3 months
[JBoss JIRA] (WFLY-2960) Hibernate 4.3.1 can't find [java:jboss/UserTransaction] - JTA
by ofbiz brazil (JIRA)
[ https://issues.jboss.org/browse/WFLY-2960?page=com.atlassian.jira.plugin.... ]
ofbiz brazil edited comment on WFLY-2960 at 2/25/14 10:05 AM:
--------------------------------------------------------------
So, JpaTransactionManager allows to inject a LocalContainerEntityManagerFactoryBean, while JtaTransactionManager doesn't allow.
Another point to be on the same page, please take a look at my LocalContainerEntityManagerFactoryBean creation, there's a section where I set a JpaPropertyMap, where I informed which JTA provider I will use:
hibernate.transaction.factory_class=org.hibernate.transaction.JTATransactionFactory
hibernate.transaction.jta.platform=org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform
@Bean
public LocalContainerEntityManagerFactoryBean entityManagerFactory() throws NamingException, IOException {
final String[] entityManagerPackagesToScan = entityManagerProperty.getPackagesToScan();
final String entityManagerPersistenceUnitName = entityManagerProperty.getPersistenceUnitName();
final LocalContainerEntityManagerFactoryBean entityManagerFactoryBean = new LocalContainerEntityManagerFactoryBean();
if (!entityManagerPersistenceUnitName.isEmpty()) {
entityManagerFactoryBean.setPersistenceUnitName(entityManagerPersistenceUnitName);
}
entityManagerFactoryBean.setDataSource(dataSource());
entityManagerFactoryBean.setPackagesToScan(entityManagerPackagesToScan);
entityManagerFactoryBean.setJpaVendorAdapter(hibernateProperty.getJpaVendorAdapter());
entityManagerFactoryBean.setJpaPropertyMap(hibernateProperty.getJPAPropertyMap());
return entityManagerFactoryBean;
}
By the way, JpaTransactionManager and JtaTransactionManager implements PlatformTransactionManager, which is the main interface to manage transactions.
I found out a Spring post, showing how to just use a JtaTransactionManager, but it's needed to set up a UserTransactionImp. Would it be possible in Wildfly? Because in this case they're using Atomikos.
Cheers,
was (Author: ofbizbrazil):
So, JpaTransactionManager allows to inject a LocalContainerEntityManagerFactoryBean, while JtaTransactionManager doesn't allow.
By the way, JpaTransactionManager and JtaTransactionManager implements PlatformTransactionManager, which is the main interface to manage transactions.
I found out a Spring post, showing how to just use a JtaTransactionManager, but it's needed to set up a UserTransactionImp. Would it be possible in Wildfly? Because in this case they're using Atomikos.
Cheers,
> Hibernate 4.3.1 can't find [java:jboss/UserTransaction] - JTA
> -------------------------------------------------------------
>
> Key: WFLY-2960
> URL: https://issues.jboss.org/browse/WFLY-2960
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: JPA / Hibernate
> Affects Versions: 8.0.0.Final
> Environment: Spring 4.0.1, Hibernate 4.3.1, Hibernate Validator 5.0.3.Final, EJB 3.1
> Reporter: ofbiz brazil
> Assignee: Scott Marlow
> Priority: Critical
>
> 1) There's no UserTransaction implemented by WildFly.
> JNDI tree view shows:
> === WildFly 8.0.0Final ===
> "java:jboss" => {
> "UserTransaction" => {
> "class-name" => "javax.transaction.UserTransaction",
> "value" => "UserTransaction"
> },
> === JBoss 7.1.1 ===
> "java:jboss" => {
> "UserTransaction" => {
> "class-name" => "org.jboss.tm.usertx.client.ServerVMClientUserTransaction",
> "value" => "org.jboss.tm.usertx.client.ServerVMClientUserTransaction@9e85f"
> },
> 2) Method locateUserTransaction in JBossAppServerJtaPlatform can't get transaction objet from JNDI tree.
> 3) Hibernate Configuration
> hibernate.default_schema=dbo
> hibernate.default_catalog=XX
> hibernate.database=SQL_SERVER
> hibernate.dialect=org.hibernate.dialect.SQLServer2008Dialect
> hibernate.show_sql=false
> hibernate.generate_ddl=false
> hibernate.hbm2ddl.auto=validate
> hibernate.transaction.factory_class=org.hibernate.transaction.JTATransactionFactory
> hibernate.transaction.jta.platform=org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform
> hibernate.current_session_context_class=org.springframework.orm.hibernate4.SpringJtaSessionContext
> hibernate.connection.release_mode=auto
> 4) Runtime Exception in console
> Caused by: org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.engine.jndi.JndiException: unable to find UserTransaction
> at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:430) [spring-orm-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:373) [spring-tx-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:420) [spring-tx-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:257) [spring-tx-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:95) [spring-tx-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) [spring-aop-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at com.sun.proxy.$Proxy102.findByUserProfile(Unknown Source)
> at com.sbb.useraccess.ejb.AccessibleItemBean.findByUserProfile(AccessibleItemBean.java:74) [classes:]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_51]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_51]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_51]
> at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_51]
> at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
> at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:407)
> at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.delegateInterception(Jsr299BindingsInterceptor.java:70) [wildfly-weld-8.0.0.Final.jar:8.0.0.Final]
> at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:80) [wildfly-weld-8.0.0.Final.jar:8.0.0.Final]
> at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:93) [wildfly-weld-8.0.0.Final.jar:8.0.0.Final]
> at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
> at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43) [wildfly-ejb3-8.0.0.Final.jar:8.0.0.Final]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:407)
> at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
> at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:83) [wildfly-weld-8.0.0.Final.jar:8.0.0.Final]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45) [wildfly-ee-8.0.0.Final.jar:8.0.0.Final]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
> at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.as.ejb3.component.singleton.SingletonComponentInstanceAssociationInterceptor.processInvocation(SingletonComponentInstanceAssociationInterceptor.java:52) [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]
> ... 99 more
> Caused by: javax.persistence.PersistenceException: org.hibernate.engine.jndi.JndiException: unable to find UserTransaction
> at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1763) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1677) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.jpa.spi.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:1771) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.jpa.internal.TransactionImpl.begin(TransactionImpl.java:64) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
> at org.springframework.orm.jpa.DefaultJpaDialect.beginTransaction(DefaultJpaDialect.java:67) [spring-orm-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.orm.jpa.vendor.HibernateJpaDialect.beginTransaction(HibernateJpaDialect.java:110) [spring-orm-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:380) [spring-orm-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> ... 141 more
> Caused by: org.hibernate.engine.jndi.JndiException: unable to find UserTransaction
> at org.hibernate.engine.transaction.jta.platform.internal.JBossAppServerJtaPlatform.locateUserTransaction(JBossAppServerJtaPlatform.java:77) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.engine.transaction.jta.platform.internal.AbstractJtaPlatform.retrieveUserTransaction(AbstractJtaPlatform.java:124) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.engine.transaction.internal.jta.JtaTransaction.locateUserTransaction(JtaTransaction.java:84) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.engine.transaction.internal.jta.JtaTransaction.doBegin(JtaTransaction.java:69) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:162) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.internal.SessionImpl.beginTransaction(SessionImpl.java:1431) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.jpa.internal.TransactionImpl.begin(TransactionImpl.java:61) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
> ... 144 more
> Caused by: org.hibernate.engine.jndi.JndiException: Unable to lookup JNDI name [java:jboss/UserTransaction]
> at org.hibernate.engine.jndi.internal.JndiServiceImpl.locate(JndiServiceImpl.java:117) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.engine.transaction.jta.platform.internal.JBossAppServerJtaPlatform.locateUserTransaction(JBossAppServerJtaPlatform.java:70) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> ... 150 more
> Caused by: javax.naming.NamingException: JBAS014237: Only session and message-driven beans with bean-managed transaction demarcation are allowed to access UserTransaction [Root exception is java.lang.IllegalStateException: JBAS014237: Only session and message-driven beans with bean-managed transaction demarcation are allowed to access UserTransaction]
> at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:142)
> at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:81)
> at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:202)
> at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:179)
> at org.jboss.as.naming.InitialContext$DefaultInitialContext.lookup(InitialContext.java:235)
> at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:179)
> at javax.naming.InitialContext.lookup(InitialContext.java:415) [rt.jar:1.7.0_51]
> at javax.naming.InitialContext.lookup(InitialContext.java:415) [rt.jar:1.7.0_51]
> at org.hibernate.engine.jndi.internal.JndiServiceImpl.locate(JndiServiceImpl.java:114) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> ... 151 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)
> ... 159 more
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 3 months
[JBoss JIRA] (WFLY-2960) Hibernate 4.3.1 can't find [java:jboss/UserTransaction] - JTA
by Scott Marlow (JIRA)
[ https://issues.jboss.org/browse/WFLY-2960?page=com.atlassian.jira.plugin.... ]
Scott Marlow updated WFLY-2960:
-------------------------------
Forum Reference: http://lists.jboss.org/pipermail/wildfly-dev/2014-February/001833.html
> Hibernate 4.3.1 can't find [java:jboss/UserTransaction] - JTA
> -------------------------------------------------------------
>
> Key: WFLY-2960
> URL: https://issues.jboss.org/browse/WFLY-2960
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: JPA / Hibernate
> Affects Versions: 8.0.0.Final
> Environment: Spring 4.0.1, Hibernate 4.3.1, Hibernate Validator 5.0.3.Final, EJB 3.1
> Reporter: ofbiz brazil
> Assignee: Scott Marlow
> Priority: Critical
>
> 1) There's no UserTransaction implemented by WildFly.
> JNDI tree view shows:
> === WildFly 8.0.0Final ===
> "java:jboss" => {
> "UserTransaction" => {
> "class-name" => "javax.transaction.UserTransaction",
> "value" => "UserTransaction"
> },
> === JBoss 7.1.1 ===
> "java:jboss" => {
> "UserTransaction" => {
> "class-name" => "org.jboss.tm.usertx.client.ServerVMClientUserTransaction",
> "value" => "org.jboss.tm.usertx.client.ServerVMClientUserTransaction@9e85f"
> },
> 2) Method locateUserTransaction in JBossAppServerJtaPlatform can't get transaction objet from JNDI tree.
> 3) Hibernate Configuration
> hibernate.default_schema=dbo
> hibernate.default_catalog=XX
> hibernate.database=SQL_SERVER
> hibernate.dialect=org.hibernate.dialect.SQLServer2008Dialect
> hibernate.show_sql=false
> hibernate.generate_ddl=false
> hibernate.hbm2ddl.auto=validate
> hibernate.transaction.factory_class=org.hibernate.transaction.JTATransactionFactory
> hibernate.transaction.jta.platform=org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform
> hibernate.current_session_context_class=org.springframework.orm.hibernate4.SpringJtaSessionContext
> hibernate.connection.release_mode=auto
> 4) Runtime Exception in console
> Caused by: org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.engine.jndi.JndiException: unable to find UserTransaction
> at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:430) [spring-orm-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:373) [spring-tx-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:420) [spring-tx-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:257) [spring-tx-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:95) [spring-tx-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) [spring-aop-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at com.sun.proxy.$Proxy102.findByUserProfile(Unknown Source)
> at com.sbb.useraccess.ejb.AccessibleItemBean.findByUserProfile(AccessibleItemBean.java:74) [classes:]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_51]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_51]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_51]
> at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_51]
> at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
> at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:407)
> at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.delegateInterception(Jsr299BindingsInterceptor.java:70) [wildfly-weld-8.0.0.Final.jar:8.0.0.Final]
> at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:80) [wildfly-weld-8.0.0.Final.jar:8.0.0.Final]
> at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:93) [wildfly-weld-8.0.0.Final.jar:8.0.0.Final]
> at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
> at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43) [wildfly-ejb3-8.0.0.Final.jar:8.0.0.Final]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:407)
> at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
> at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:83) [wildfly-weld-8.0.0.Final.jar:8.0.0.Final]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45) [wildfly-ee-8.0.0.Final.jar:8.0.0.Final]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
> at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.as.ejb3.component.singleton.SingletonComponentInstanceAssociationInterceptor.processInvocation(SingletonComponentInstanceAssociationInterceptor.java:52) [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]
> ... 99 more
> Caused by: javax.persistence.PersistenceException: org.hibernate.engine.jndi.JndiException: unable to find UserTransaction
> at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1763) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1677) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.jpa.spi.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:1771) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.jpa.internal.TransactionImpl.begin(TransactionImpl.java:64) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
> at org.springframework.orm.jpa.DefaultJpaDialect.beginTransaction(DefaultJpaDialect.java:67) [spring-orm-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.orm.jpa.vendor.HibernateJpaDialect.beginTransaction(HibernateJpaDialect.java:110) [spring-orm-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:380) [spring-orm-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> ... 141 more
> Caused by: org.hibernate.engine.jndi.JndiException: unable to find UserTransaction
> at org.hibernate.engine.transaction.jta.platform.internal.JBossAppServerJtaPlatform.locateUserTransaction(JBossAppServerJtaPlatform.java:77) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.engine.transaction.jta.platform.internal.AbstractJtaPlatform.retrieveUserTransaction(AbstractJtaPlatform.java:124) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.engine.transaction.internal.jta.JtaTransaction.locateUserTransaction(JtaTransaction.java:84) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.engine.transaction.internal.jta.JtaTransaction.doBegin(JtaTransaction.java:69) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:162) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.internal.SessionImpl.beginTransaction(SessionImpl.java:1431) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.jpa.internal.TransactionImpl.begin(TransactionImpl.java:61) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
> ... 144 more
> Caused by: org.hibernate.engine.jndi.JndiException: Unable to lookup JNDI name [java:jboss/UserTransaction]
> at org.hibernate.engine.jndi.internal.JndiServiceImpl.locate(JndiServiceImpl.java:117) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.engine.transaction.jta.platform.internal.JBossAppServerJtaPlatform.locateUserTransaction(JBossAppServerJtaPlatform.java:70) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> ... 150 more
> Caused by: javax.naming.NamingException: JBAS014237: Only session and message-driven beans with bean-managed transaction demarcation are allowed to access UserTransaction [Root exception is java.lang.IllegalStateException: JBAS014237: Only session and message-driven beans with bean-managed transaction demarcation are allowed to access UserTransaction]
> at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:142)
> at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:81)
> at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:202)
> at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:179)
> at org.jboss.as.naming.InitialContext$DefaultInitialContext.lookup(InitialContext.java:235)
> at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:179)
> at javax.naming.InitialContext.lookup(InitialContext.java:415) [rt.jar:1.7.0_51]
> at javax.naming.InitialContext.lookup(InitialContext.java:415) [rt.jar:1.7.0_51]
> at org.hibernate.engine.jndi.internal.JndiServiceImpl.locate(JndiServiceImpl.java:114) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> ... 151 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)
> ... 159 more
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 3 months
[JBoss JIRA] (WFLY-2960) Hibernate 4.3.1 can't find [java:jboss/UserTransaction] - JTA
by ofbiz brazil (JIRA)
[ https://issues.jboss.org/browse/WFLY-2960?page=com.atlassian.jira.plugin.... ]
ofbiz brazil edited comment on WFLY-2960 at 2/25/14 9:53 AM:
-------------------------------------------------------------
So, JpaTransactionManager allows to inject a LocalContainerEntityManagerFactoryBean, while JtaTransactionManager doesn't allow.
By the way, JpaTransactionManager and JtaTransactionManager implements PlatformTransactionManager, which is the main interface to manage transactions.
I found out a Spring post, showing how to just use a JtaTransactionManager, but it's needed to set up a UserTransactionImp. Would it be possible in Wildfly? Because in this case they're using Atomikos.
Cheers,
was (Author: ofbizbrazil):
So, JpaTransactionManager allows to inject a LocalContainerEntityManagerFactoryBean, while JtaTransactionManager doesn't allow.
By the way, JpaTransactionManager and JtaTransactionManager implements PlatformTransactionManager, which in the main interface for Spring manage Transactions.
The focus point that rocks me, is why in JBoss 7.1.1. works without issues?
I found out a Spring post, showing how to just use a JtaTransactionManager, but it's needed to set up a UserTransactionImp. Would it be possible in Wildfly? Because in this case they're using Atomikos.
Cheers,
> Hibernate 4.3.1 can't find [java:jboss/UserTransaction] - JTA
> -------------------------------------------------------------
>
> Key: WFLY-2960
> URL: https://issues.jboss.org/browse/WFLY-2960
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: JPA / Hibernate
> Affects Versions: 8.0.0.Final
> Environment: Spring 4.0.1, Hibernate 4.3.1, Hibernate Validator 5.0.3.Final, EJB 3.1
> Reporter: ofbiz brazil
> Assignee: Scott Marlow
> Priority: Critical
>
> 1) There's no UserTransaction implemented by WildFly.
> JNDI tree view shows:
> === WildFly 8.0.0Final ===
> "java:jboss" => {
> "UserTransaction" => {
> "class-name" => "javax.transaction.UserTransaction",
> "value" => "UserTransaction"
> },
> === JBoss 7.1.1 ===
> "java:jboss" => {
> "UserTransaction" => {
> "class-name" => "org.jboss.tm.usertx.client.ServerVMClientUserTransaction",
> "value" => "org.jboss.tm.usertx.client.ServerVMClientUserTransaction@9e85f"
> },
> 2) Method locateUserTransaction in JBossAppServerJtaPlatform can't get transaction objet from JNDI tree.
> 3) Hibernate Configuration
> hibernate.default_schema=dbo
> hibernate.default_catalog=XX
> hibernate.database=SQL_SERVER
> hibernate.dialect=org.hibernate.dialect.SQLServer2008Dialect
> hibernate.show_sql=false
> hibernate.generate_ddl=false
> hibernate.hbm2ddl.auto=validate
> hibernate.transaction.factory_class=org.hibernate.transaction.JTATransactionFactory
> hibernate.transaction.jta.platform=org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform
> hibernate.current_session_context_class=org.springframework.orm.hibernate4.SpringJtaSessionContext
> hibernate.connection.release_mode=auto
> 4) Runtime Exception in console
> Caused by: org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.engine.jndi.JndiException: unable to find UserTransaction
> at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:430) [spring-orm-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:373) [spring-tx-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:420) [spring-tx-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:257) [spring-tx-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:95) [spring-tx-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) [spring-aop-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at com.sun.proxy.$Proxy102.findByUserProfile(Unknown Source)
> at com.sbb.useraccess.ejb.AccessibleItemBean.findByUserProfile(AccessibleItemBean.java:74) [classes:]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_51]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_51]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_51]
> at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_51]
> at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
> at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:407)
> at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.delegateInterception(Jsr299BindingsInterceptor.java:70) [wildfly-weld-8.0.0.Final.jar:8.0.0.Final]
> at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:80) [wildfly-weld-8.0.0.Final.jar:8.0.0.Final]
> at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:93) [wildfly-weld-8.0.0.Final.jar:8.0.0.Final]
> at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
> at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43) [wildfly-ejb3-8.0.0.Final.jar:8.0.0.Final]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:407)
> at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
> at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:83) [wildfly-weld-8.0.0.Final.jar:8.0.0.Final]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45) [wildfly-ee-8.0.0.Final.jar:8.0.0.Final]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
> at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.as.ejb3.component.singleton.SingletonComponentInstanceAssociationInterceptor.processInvocation(SingletonComponentInstanceAssociationInterceptor.java:52) [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]
> ... 99 more
> Caused by: javax.persistence.PersistenceException: org.hibernate.engine.jndi.JndiException: unable to find UserTransaction
> at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1763) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1677) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.jpa.spi.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:1771) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.jpa.internal.TransactionImpl.begin(TransactionImpl.java:64) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
> at org.springframework.orm.jpa.DefaultJpaDialect.beginTransaction(DefaultJpaDialect.java:67) [spring-orm-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.orm.jpa.vendor.HibernateJpaDialect.beginTransaction(HibernateJpaDialect.java:110) [spring-orm-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:380) [spring-orm-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> ... 141 more
> Caused by: org.hibernate.engine.jndi.JndiException: unable to find UserTransaction
> at org.hibernate.engine.transaction.jta.platform.internal.JBossAppServerJtaPlatform.locateUserTransaction(JBossAppServerJtaPlatform.java:77) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.engine.transaction.jta.platform.internal.AbstractJtaPlatform.retrieveUserTransaction(AbstractJtaPlatform.java:124) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.engine.transaction.internal.jta.JtaTransaction.locateUserTransaction(JtaTransaction.java:84) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.engine.transaction.internal.jta.JtaTransaction.doBegin(JtaTransaction.java:69) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:162) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.internal.SessionImpl.beginTransaction(SessionImpl.java:1431) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.jpa.internal.TransactionImpl.begin(TransactionImpl.java:61) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
> ... 144 more
> Caused by: org.hibernate.engine.jndi.JndiException: Unable to lookup JNDI name [java:jboss/UserTransaction]
> at org.hibernate.engine.jndi.internal.JndiServiceImpl.locate(JndiServiceImpl.java:117) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.engine.transaction.jta.platform.internal.JBossAppServerJtaPlatform.locateUserTransaction(JBossAppServerJtaPlatform.java:70) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> ... 150 more
> Caused by: javax.naming.NamingException: JBAS014237: Only session and message-driven beans with bean-managed transaction demarcation are allowed to access UserTransaction [Root exception is java.lang.IllegalStateException: JBAS014237: Only session and message-driven beans with bean-managed transaction demarcation are allowed to access UserTransaction]
> at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:142)
> at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:81)
> at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:202)
> at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:179)
> at org.jboss.as.naming.InitialContext$DefaultInitialContext.lookup(InitialContext.java:235)
> at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:179)
> at javax.naming.InitialContext.lookup(InitialContext.java:415) [rt.jar:1.7.0_51]
> at javax.naming.InitialContext.lookup(InitialContext.java:415) [rt.jar:1.7.0_51]
> at org.hibernate.engine.jndi.internal.JndiServiceImpl.locate(JndiServiceImpl.java:114) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> ... 151 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)
> ... 159 more
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 3 months
[JBoss JIRA] (WFLY-2960) Hibernate 4.3.1 can't find [java:jboss/UserTransaction] - JTA
by ofbiz brazil (JIRA)
[ https://issues.jboss.org/browse/WFLY-2960?page=com.atlassian.jira.plugin.... ]
ofbiz brazil edited comment on WFLY-2960 at 2/25/14 9:52 AM:
-------------------------------------------------------------
So, JpaTransactionManager allows to inject a LocalContainerEntityManagerFactoryBean, while JtaTransactionManager doesn't allow.
By the way, JpaTransactionManager and JtaTransactionManager implements PlatformTransactionManager, which in the main interface for Spring manage Transactions.
The focus point that rocks me, is why in JBoss 7.1.1. works without issues?
I found out a Spring post, showing how to just use a JtaTransactionManager, but it's needed to set up a UserTransactionImp. Would it be possible in Wildfly? Because in this case they're using Atomikos.
Cheers,
was (Author: ofbizbrazil):
So, JpaTransactionManager allows to inject a LocalContainerEntityManagerFactoryBean, while JtaTransactionManager doesn't allow.
By the way, JpaTransactionManager and JtaTransactionManager implements PlatformTransactionManager, which in the main interface for Spring manage Transactions.
The focus point that rocks me, is why in JBoss 7.1.1. works without issues?
> Hibernate 4.3.1 can't find [java:jboss/UserTransaction] - JTA
> -------------------------------------------------------------
>
> Key: WFLY-2960
> URL: https://issues.jboss.org/browse/WFLY-2960
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: JPA / Hibernate
> Affects Versions: 8.0.0.Final
> Environment: Spring 4.0.1, Hibernate 4.3.1, Hibernate Validator 5.0.3.Final, EJB 3.1
> Reporter: ofbiz brazil
> Assignee: Scott Marlow
> Priority: Critical
>
> 1) There's no UserTransaction implemented by WildFly.
> JNDI tree view shows:
> === WildFly 8.0.0Final ===
> "java:jboss" => {
> "UserTransaction" => {
> "class-name" => "javax.transaction.UserTransaction",
> "value" => "UserTransaction"
> },
> === JBoss 7.1.1 ===
> "java:jboss" => {
> "UserTransaction" => {
> "class-name" => "org.jboss.tm.usertx.client.ServerVMClientUserTransaction",
> "value" => "org.jboss.tm.usertx.client.ServerVMClientUserTransaction@9e85f"
> },
> 2) Method locateUserTransaction in JBossAppServerJtaPlatform can't get transaction objet from JNDI tree.
> 3) Hibernate Configuration
> hibernate.default_schema=dbo
> hibernate.default_catalog=XX
> hibernate.database=SQL_SERVER
> hibernate.dialect=org.hibernate.dialect.SQLServer2008Dialect
> hibernate.show_sql=false
> hibernate.generate_ddl=false
> hibernate.hbm2ddl.auto=validate
> hibernate.transaction.factory_class=org.hibernate.transaction.JTATransactionFactory
> hibernate.transaction.jta.platform=org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform
> hibernate.current_session_context_class=org.springframework.orm.hibernate4.SpringJtaSessionContext
> hibernate.connection.release_mode=auto
> 4) Runtime Exception in console
> Caused by: org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.engine.jndi.JndiException: unable to find UserTransaction
> at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:430) [spring-orm-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:373) [spring-tx-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:420) [spring-tx-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:257) [spring-tx-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:95) [spring-tx-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) [spring-aop-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at com.sun.proxy.$Proxy102.findByUserProfile(Unknown Source)
> at com.sbb.useraccess.ejb.AccessibleItemBean.findByUserProfile(AccessibleItemBean.java:74) [classes:]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_51]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_51]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_51]
> at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_51]
> at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
> at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:407)
> at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.delegateInterception(Jsr299BindingsInterceptor.java:70) [wildfly-weld-8.0.0.Final.jar:8.0.0.Final]
> at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:80) [wildfly-weld-8.0.0.Final.jar:8.0.0.Final]
> at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:93) [wildfly-weld-8.0.0.Final.jar:8.0.0.Final]
> at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
> at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43) [wildfly-ejb3-8.0.0.Final.jar:8.0.0.Final]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:407)
> at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
> at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:83) [wildfly-weld-8.0.0.Final.jar:8.0.0.Final]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45) [wildfly-ee-8.0.0.Final.jar:8.0.0.Final]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
> at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.as.ejb3.component.singleton.SingletonComponentInstanceAssociationInterceptor.processInvocation(SingletonComponentInstanceAssociationInterceptor.java:52) [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]
> ... 99 more
> Caused by: javax.persistence.PersistenceException: org.hibernate.engine.jndi.JndiException: unable to find UserTransaction
> at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1763) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1677) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.jpa.spi.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:1771) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.jpa.internal.TransactionImpl.begin(TransactionImpl.java:64) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
> at org.springframework.orm.jpa.DefaultJpaDialect.beginTransaction(DefaultJpaDialect.java:67) [spring-orm-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.orm.jpa.vendor.HibernateJpaDialect.beginTransaction(HibernateJpaDialect.java:110) [spring-orm-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:380) [spring-orm-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> ... 141 more
> Caused by: org.hibernate.engine.jndi.JndiException: unable to find UserTransaction
> at org.hibernate.engine.transaction.jta.platform.internal.JBossAppServerJtaPlatform.locateUserTransaction(JBossAppServerJtaPlatform.java:77) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.engine.transaction.jta.platform.internal.AbstractJtaPlatform.retrieveUserTransaction(AbstractJtaPlatform.java:124) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.engine.transaction.internal.jta.JtaTransaction.locateUserTransaction(JtaTransaction.java:84) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.engine.transaction.internal.jta.JtaTransaction.doBegin(JtaTransaction.java:69) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:162) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.internal.SessionImpl.beginTransaction(SessionImpl.java:1431) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.jpa.internal.TransactionImpl.begin(TransactionImpl.java:61) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
> ... 144 more
> Caused by: org.hibernate.engine.jndi.JndiException: Unable to lookup JNDI name [java:jboss/UserTransaction]
> at org.hibernate.engine.jndi.internal.JndiServiceImpl.locate(JndiServiceImpl.java:117) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.engine.transaction.jta.platform.internal.JBossAppServerJtaPlatform.locateUserTransaction(JBossAppServerJtaPlatform.java:70) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> ... 150 more
> Caused by: javax.naming.NamingException: JBAS014237: Only session and message-driven beans with bean-managed transaction demarcation are allowed to access UserTransaction [Root exception is java.lang.IllegalStateException: JBAS014237: Only session and message-driven beans with bean-managed transaction demarcation are allowed to access UserTransaction]
> at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:142)
> at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:81)
> at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:202)
> at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:179)
> at org.jboss.as.naming.InitialContext$DefaultInitialContext.lookup(InitialContext.java:235)
> at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:179)
> at javax.naming.InitialContext.lookup(InitialContext.java:415) [rt.jar:1.7.0_51]
> at javax.naming.InitialContext.lookup(InitialContext.java:415) [rt.jar:1.7.0_51]
> at org.hibernate.engine.jndi.internal.JndiServiceImpl.locate(JndiServiceImpl.java:114) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> ... 151 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)
> ... 159 more
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 3 months
[JBoss JIRA] (WFLY-2960) Hibernate 4.3.1 can't find [java:jboss/UserTransaction] - JTA
by ofbiz brazil (JIRA)
[ https://issues.jboss.org/browse/WFLY-2960?page=com.atlassian.jira.plugin.... ]
ofbiz brazil edited comment on WFLY-2960 at 2/25/14 9:48 AM:
-------------------------------------------------------------
So, JpaTransactionManager allows to inject a LocalContainerEntityManagerFactoryBean, while JtaTransactionManager doesn't allow.
By the way, JpaTransactionManager and JtaTransactionManager implements PlatformTransactionManager, which in the main interface for Spring manage Transactions.
The focus point that rocks me, is why in JBoss 7.1.1. works without issues?
was (Author: ofbizbrazil):
So, JpaTransactionManager allows to inject aLocalContainerEntityManagerFactoryBean, while JtaTransactionManager doesn't allow.
By the way, JpaTransactionManager and JtaTransactionManager implements PlatformTransactionManager, which in the main interface for Spring manage Transactions.
The focus point that rocks me, is why in JBoss 7.1.1. works without issues?
> Hibernate 4.3.1 can't find [java:jboss/UserTransaction] - JTA
> -------------------------------------------------------------
>
> Key: WFLY-2960
> URL: https://issues.jboss.org/browse/WFLY-2960
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: JPA / Hibernate
> Affects Versions: 8.0.0.Final
> Environment: Spring 4.0.1, Hibernate 4.3.1, Hibernate Validator 5.0.3.Final, EJB 3.1
> Reporter: ofbiz brazil
> Assignee: Scott Marlow
> Priority: Critical
>
> 1) There's no UserTransaction implemented by WildFly.
> JNDI tree view shows:
> === WildFly 8.0.0Final ===
> "java:jboss" => {
> "UserTransaction" => {
> "class-name" => "javax.transaction.UserTransaction",
> "value" => "UserTransaction"
> },
> === JBoss 7.1.1 ===
> "java:jboss" => {
> "UserTransaction" => {
> "class-name" => "org.jboss.tm.usertx.client.ServerVMClientUserTransaction",
> "value" => "org.jboss.tm.usertx.client.ServerVMClientUserTransaction@9e85f"
> },
> 2) Method locateUserTransaction in JBossAppServerJtaPlatform can't get transaction objet from JNDI tree.
> 3) Hibernate Configuration
> hibernate.default_schema=dbo
> hibernate.default_catalog=XX
> hibernate.database=SQL_SERVER
> hibernate.dialect=org.hibernate.dialect.SQLServer2008Dialect
> hibernate.show_sql=false
> hibernate.generate_ddl=false
> hibernate.hbm2ddl.auto=validate
> hibernate.transaction.factory_class=org.hibernate.transaction.JTATransactionFactory
> hibernate.transaction.jta.platform=org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform
> hibernate.current_session_context_class=org.springframework.orm.hibernate4.SpringJtaSessionContext
> hibernate.connection.release_mode=auto
> 4) Runtime Exception in console
> Caused by: org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.engine.jndi.JndiException: unable to find UserTransaction
> at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:430) [spring-orm-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:373) [spring-tx-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:420) [spring-tx-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:257) [spring-tx-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:95) [spring-tx-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) [spring-aop-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at com.sun.proxy.$Proxy102.findByUserProfile(Unknown Source)
> at com.sbb.useraccess.ejb.AccessibleItemBean.findByUserProfile(AccessibleItemBean.java:74) [classes:]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_51]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_51]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_51]
> at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_51]
> at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
> at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:407)
> at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.delegateInterception(Jsr299BindingsInterceptor.java:70) [wildfly-weld-8.0.0.Final.jar:8.0.0.Final]
> at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:80) [wildfly-weld-8.0.0.Final.jar:8.0.0.Final]
> at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:93) [wildfly-weld-8.0.0.Final.jar:8.0.0.Final]
> at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
> at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43) [wildfly-ejb3-8.0.0.Final.jar:8.0.0.Final]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:407)
> at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
> at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:83) [wildfly-weld-8.0.0.Final.jar:8.0.0.Final]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45) [wildfly-ee-8.0.0.Final.jar:8.0.0.Final]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
> at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.as.ejb3.component.singleton.SingletonComponentInstanceAssociationInterceptor.processInvocation(SingletonComponentInstanceAssociationInterceptor.java:52) [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]
> ... 99 more
> Caused by: javax.persistence.PersistenceException: org.hibernate.engine.jndi.JndiException: unable to find UserTransaction
> at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1763) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1677) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.jpa.spi.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:1771) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.jpa.internal.TransactionImpl.begin(TransactionImpl.java:64) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
> at org.springframework.orm.jpa.DefaultJpaDialect.beginTransaction(DefaultJpaDialect.java:67) [spring-orm-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.orm.jpa.vendor.HibernateJpaDialect.beginTransaction(HibernateJpaDialect.java:110) [spring-orm-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:380) [spring-orm-4.0.1.RELEASE.jar:4.0.1.RELEASE]
> ... 141 more
> Caused by: org.hibernate.engine.jndi.JndiException: unable to find UserTransaction
> at org.hibernate.engine.transaction.jta.platform.internal.JBossAppServerJtaPlatform.locateUserTransaction(JBossAppServerJtaPlatform.java:77) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.engine.transaction.jta.platform.internal.AbstractJtaPlatform.retrieveUserTransaction(AbstractJtaPlatform.java:124) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.engine.transaction.internal.jta.JtaTransaction.locateUserTransaction(JtaTransaction.java:84) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.engine.transaction.internal.jta.JtaTransaction.doBegin(JtaTransaction.java:69) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:162) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.internal.SessionImpl.beginTransaction(SessionImpl.java:1431) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.jpa.internal.TransactionImpl.begin(TransactionImpl.java:61) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
> ... 144 more
> Caused by: org.hibernate.engine.jndi.JndiException: Unable to lookup JNDI name [java:jboss/UserTransaction]
> at org.hibernate.engine.jndi.internal.JndiServiceImpl.locate(JndiServiceImpl.java:117) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> at org.hibernate.engine.transaction.jta.platform.internal.JBossAppServerJtaPlatform.locateUserTransaction(JBossAppServerJtaPlatform.java:70) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> ... 150 more
> Caused by: javax.naming.NamingException: JBAS014237: Only session and message-driven beans with bean-managed transaction demarcation are allowed to access UserTransaction [Root exception is java.lang.IllegalStateException: JBAS014237: Only session and message-driven beans with bean-managed transaction demarcation are allowed to access UserTransaction]
> at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:142)
> at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:81)
> at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:202)
> at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:179)
> at org.jboss.as.naming.InitialContext$DefaultInitialContext.lookup(InitialContext.java:235)
> at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:179)
> at javax.naming.InitialContext.lookup(InitialContext.java:415) [rt.jar:1.7.0_51]
> at javax.naming.InitialContext.lookup(InitialContext.java:415) [rt.jar:1.7.0_51]
> at org.hibernate.engine.jndi.internal.JndiServiceImpl.locate(JndiServiceImpl.java:114) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
> ... 151 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)
> ... 159 more
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 3 months