Hi,
I tried using below hibernate.property
Code:
hibernate.dialect=org.hibernate.dialect.MySQLDialect
hibernate.show_sql=true
#set this to avoid "cannot open connection" problem
hibernate.connection.release_mode=after_transaction
#hibernate.transaction.jta.platform=org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform
hibernate.transaction.jta.platform=org.hibernate.service.jta.platform.internal.JBossStandAloneJtaPlatform
#hibernate.current_session_context_class=jta
hibernate.transaction.manager_lookup_class=org.hibernate.transaction.JBossTransactionManagerLookup
hibernate.transaction.factory_class=org.hibernate.transaction.JTATransactionFactory
I able to resolve this
ARJUNA022006: The ORB has not been initialized yet
by removing jbossjts-4.16.4.Final.jar
I am getting this error now.
Code:
09:58:47,515 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] (http-localhost-127.0.0.1-8080-1) Creating new transaction with name [com.b2b.security.service.AuthenticationServiceImpl.supports]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT,readOnly
09:58:47,531 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] (http-localhost-127.0.0.1-8080-1) Initiating transaction commit
09:58:47,531 DEBUG [org.springframework.security.authentication.ProviderManager] (http-localhost-127.0.0.1-8080-1) Authentication attempt using $Proxy43
09:58:47,531 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] (http-localhost-127.0.0.1-8080-1) Creating new transaction with name [com.b2b.security.service.AuthenticationServiceImpl.authenticate]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT,readOnly
09:58:47,531 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] (http-localhost-127.0.0.1-8080-1) Participating in existing transaction
09:58:47,562 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] (http-localhost-127.0.0.1-8080-1) Participating transaction failed - marking existing transaction as rollback-only
09:58:47,562 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] (http-localhost-127.0.0.1-8080-1) Setting JTA transaction rollback-only
09:58:47,562 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] (http-localhost-127.0.0.1-8080-1) Initiating transaction rollback
09:58:47,562 DEBUG [org.springframework.security.web.context.HttpSessionSecurityContextRepository] (http-localhost-127.0.0.1-8080-1) SecurityContext is empty or contents are anonymous - context will not be stored in HttpSession.
09:58:47,562 DEBUG [org.springframework.security.web.context.SecurityContextPersistenceFilter] (http-localhost-127.0.0.1-8080-1) SecurityContextHolder now cleared, as request processing completed
09:58:47,562 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/eCatalog].[eCatalog]] (http-localhost-127.0.0.1-8080-1) Servlet.service() for servlet eCatalog threw exception: org.hibernate.HibernateException: Unable to locate current JTA transaction
at org.hibernate.context.internal.JTASessionContext.currentSession(JTASessionContext.java:88) [hibernate-core-4.1.7.Final.jar:4.1.7.Final]
at org.springframework.orm.hibernate4.SpringSessionContext.currentSession(SpringSessionContext.java:90) [org.springframework.orm-3.1.3.RELEASE.jar:3.1.3.RELEASE]
at org.hibernate.internal.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:941) [hibernate-core-4.1.7.Final.jar:4.1.7.Final]
at com.b2b.spring.dao.HibernateBaseDAO.getCurrentSession(HibernateBaseDAO.java:25) [classes:]
at com.b2b.admin.dao.OrganizationDAOImpl.listById(OrganizationDAOImpl.java:33) [classes:]
at com.b2b.admin.service.OrganizationServiceImpl.findById(OrganizationServiceImpl.java:28) [classes:]
And this is my pointcut
Code:
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="update*" propagation="REQUIRES_NEW" />
<tx:method name="create*" propagation="REQUIRES_NEW" />
<tx:method name="save*" propagation="REQUIRES_NEW" />
<tx:method name="delete*" propagation="REQUIRED" />
<tx:method name="upload*" propagation="REQUIRED" />
<tx:method name="list*" read-only="true" />
<tx:method name="find*" read-only="true" />
<tx:method name="*" read-only="true" />
</tx:attributes>
</tx:advice>
Thank you