Ошибка SessionFactoryHandlergetSessionFactory: org.hibernate.HibernateException: невозможно найти текущую транзакцию JTA - PullRequest
0 голосов
/ 24 сентября 2019

Мое приложение перенесено из JDK1.7 в JDK1.8 и из JBOSS4 в JBOSS-EAP6.4.0.После миграции я получаю ниже Проблема.Пожалуйста, помогите мне сделать любую конфигурацию в моем JBOSS6

Exception:
===========

20:01:17,584 ERROR [com.excelacom.century.cpf.web.importexcel.helper.SessionFactoryHandler] (http-/127.0.0.1:8080-2) SessionFactoryHandlergetSessionFactory error: org.hibernate.HibernateException: Unable to locate current JTA transaction
    at org.hibernate.context.JTASessionContext.currentSession(JTASessionContext.java:61) [hibernate-3.2.6.ga.jar:3.2.6.ga]
    at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:544) [hibernate-3.2.6.ga.jar:3.2.6.ga]
    at com.excelacom.century.cpf.web.importexcel.helper.SessionFactoryHandler.getSessionFactory(SessionFactoryHandler.java:50) [importexcel-ui-0.1.jar:]
    at com.excelacom.century.cpf.web.importexcel.helper.ImportHelper.importScreenExcelFile(ImportHelper.java:223) [importexcel-ui-0.1.jar:]
    at com.excelacom.century.cpf.web.importexcel.controller.ImportController.uploadExcelFile(ImportController.java:172) [importexcel-ui-0.1.jar:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_172]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_172]

20:01:17,643 INFO  [com.excelacom.century.cpf.web.importexcel.helper.SessionFactoryHandler] (http-/127.0.0.1:8080-2) SessionFactoryHandler getSessionFactory Exit
20:01:17,646 SEVERE [org.hibernate.transaction.JTATransaction] (http-/127.0.0.1:8080-2) Could not find UserTransaction in JNDI: javax.naming.NameNotFoundException: UserTransaction -- service jboss.naming.context.java.UserTransaction
    at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:104)
    at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:197)
    at org.jboss.as.naming.InitialContext$DefaultInitialContext.lookup(InitialContext.java:243)
    at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:183)

20:01:17,709 ERROR [com.excelacom.century.cpf.web.importexcel.helper.ImportHelper] (http-/127.0.0.1:8080-2) Error in ImportHelper.importScreenExcelFile: : org.hibernate.TransactionException: Could not find UserTransaction in JNDI: 
    at org.hibernate.transaction.JTATransaction.<init>(JTATransaction.java:64) [hibernate-3.2.6.ga.jar:3.2.6.ga]
    at org.hibernate.transaction.JTATransactionFactory.createTransaction(JTATransactionFactory.java:57) [hibernate-3.2.6.ga.jar:3.2.6.ga]
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
    at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_172]
Caused by: javax.naming.NameNotFoundException: UserTransaction -- service jboss.naming.context.java.UserTransaction
    at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:104)
    at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:197)
    at org.jboss.as.naming.InitialContext$DefaultInitialContext.lookup(InitialContext.java:243)


hibernate.connection.datasource = java:jboss/OracleDSPC
hibernate.transaction.factory_class = \org.hibernate.transaction.JTATransactionFactory
hibernate.transaction.manager_lookup_class = \org.hibernate.transaction.JBossTransactionManagerLookup
hibernate.jta.UserTransaction=weblogic.transaction.UserTransaction
hibernate.connection.release_mode=auto
hibernate.connection.pool_size=10
hibernate.bytecode.provider=cglib
show_sql=true
hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
hibernate.hbm2ddl.auto=update 
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...