-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4199808
By: ilcavero
I'm trying to sync ZK with spring using the recommended solution of
<listener>
<listener-class>org.zkoss.zkplus.spring.SpringTransactionSynchronizationListener
</listener-class>
</listener>
but I get
org.zkoss.lang.SystemException: java.lang.NoSuchFieldException:
currentTransactionInfo
...
at org.zkoss.lang.ThreadLocals.getThreadLocal(ThreadLocals.java:51)
at org.zkoss.zkplus.spring.SpringTransactionSynchronizationListener.getThreadLoc
al(SpringTransactionSynchronizationListener.java:143)
at org.zkoss.zkplus.spring.SpringTransactionSynchronizationListener.getThreadLoc
als(SpringTransactionSynchronizationListener.java:111)
at org.zkoss.zkplus.spring.SpringTransactionSynchronizationListener.prepare(Spri
ngTransactionSynchronizationListener.java:65)
...
at the beginning of the application. I suspect that this is caused by an incompatibility between SpringTransactionSynchronizationListener and Spring 2.0.2. Has anyone tried out this configuration?
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4200625
By: henrichen
Looks that it is the reason as what you said. Can you confirm that by testing the code with previous version of Spring framework? Thanks.
/henri
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4268482
By: alphahome
I got this error with spring 2.02 too
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4271796
By: sousa1981
The better way to we help each other is to post code, so we could see and comment about it.
My opinion there is problem with ZK using spring in same case.
When I try to use SPRING with SCOPE="SESSION", the problem arrive. but with SCOPE="SINGLETON" there is no problem.
I post it as future request or a bug but no answer about this matter.
Marcos de Sousa
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4271918
By: alphahome
I have solved this problem.This happen when using spring 2.0.2+.
org.springframework.transaction.interceptor.TransactionAspectSupport has rename the private var "currentTransactionInfo" to "transactionInfoHolder",edit the org.zkoss.zkplus.spring.SpringTransactionSynchronizationListener will fix it.
how to modify?
first line 111: _threadLocals[6] = getThreadLocal(cls, "transactionInfoHolder").get(); then line 133:getThreadLocal(cls, "transactionInfoHolder").set(_threadLocals[6]);
I have tested it.
Asked: 2007-03-09 14:35:14 +0800
Seen: 222 times
Last updated: Apr 20 '07