Hi Geir, The stack trace looks like the springframework is confused.
Do you have any transaction requirements specified on the method that is executing the query? That's what I assume is causing the call from the proxy into the transaction framework.
How are you defining the em variable. Is it injected, or do you manage it yourself?
The strangest thing is where doBegin calls em.close(). I can't explain this part.
Craig On Jan 9, 2008, at 7:47 AM, Geir Magnusson Jr. wrote:
<openjpa-1.0.1-r420667:592145 nonfatal user error> org.apache.openjpa.persistence.InvalidStateException: This operation cannot be performed while a Transaction is active.at org.apache.openjpa.kernel.BrokerImpl.close(BrokerImpl.java:4014)at org.apache.openjpa.kernel.DelegatingBroker.close (DelegatingBroker.java:1282) at org.apache.openjpa.persistence.EntityManagerImpl.close (EntityManagerImpl.java:1002) at org.springframework.orm.jpa.JpaTransactionManager.doBegin (JpaTransactionManager.java:372) at org.springframework.transaction.support.AbstractPlatformTransactionMan ager.getTransaction(AbstractPlatformTransactionManager.java:350) at org.springframework.transaction.interceptor.TransactionAspectSupport.c reateTransactionIfNecessary(TransactionAspectSupport.java:262) at org.springframework.transaction.interceptor.TransactionInterceptor.inv oke(TransactionInterceptor.java:102) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed (ReflectiveMethodInvocation.java:166) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke (JdkDynamicAopProxy.java:204)at $Proxy31.loadAll(Unknown Source) at com.joost.md.tools.importexport.OMUtil.getDams(OMUtil.java:184)I don't understand what's happening here. All that loadAll is doing is :em.createNamedQuery(includeHidden ? "dam.all" : "dam.allvisible").getResultList();and I'm not doing anything explicit w/ txn. This happens only rarely. Normally things are peachy.tia
Craig Russell Architect, Sun Java Enterprise System http://java.sun.com/products/jdo 408 276-5638 mailto:[EMAIL PROTECTED] P.S. A good JDO? O, Gasp!
smime.p7s
Description: S/MIME cryptographic signature
