0

ZK compatibility with Spring2.0.2+hibernate

asked 2007-03-09 14:35:14 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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?

delete flag offensive retag edit

4 Replies

Sort by ยป oldest newest

answered 2007-03-10 01:19:09 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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

link publish delete flag offensive edit

answered 2007-04-18 19:17:15 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4268482

By: alphahome

I got this error with spring 2.02 too

link publish delete flag offensive edit

answered 2007-04-20 12:04:08 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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

link publish delete flag offensive edit

answered 2007-04-20 13:32:09 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2007-03-09 14:35:14 +0800

Seen: 222 times

Last updated: Apr 20 '07

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More