-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: HelpError: A JTA EntityManager can not use getTransaction ()
PostPosted: Mon Sep 14, 2009 2:39 pm 
Newbie

Joined: Mon Sep 14, 2009 12:34 pm
Posts: 4
UI am getting this message when using JPA Entity Manager. The provider is Hibernate.
The offending call is :
entityManager.merge(entity);

How do I get an entitymanager that I can use to merge()?

Thanks in advance,
Lee


Code:
java.lang.IllegalStateException: A JTA EntityManager cannot use getTransaction()
   at org.hibernate.ejb.AbstractEntityManagerImpl.getTransaction(AbstractEntityManagerImpl.java:324)
   at org.springframework.orm.jpa.DefaultJpaDialect.beginTransaction(DefaultJpaDialect.java:70)
   at org.springframework.orm.jpa.vendor.HibernateJpaDialect.beginTransaction(HibernateJpaDialect.java:53)
   at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:330)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:369)
   at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:340)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:102)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:625)
   at com.aam2.mailingplatform.repository.IPDao$$EnhancerByCGLIB$$4af933d7.getAll(<generated>)
   at com.aam2.mailingplatform.engine.operations.IPOperations.getIpInfoList(IPOperations.java:33)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.