0

Bug in latest ZK Integration for Spring Security?

asked 2011-03-23 06:01:30 +0800

juwian gravatar image juwian
96 1 3

When throwing a WrongValueException from a controller handling the event on clicking a button where user input is validated I notice...

SERIOUS: Failed to invoke class org.zkoss.spring.security.ui.ZkExceptionTranslationListener


...in my stdout log.. This occurs with ZK 5.0.6 and 5.0.7 freshly.

I also notice that the error-boxes appear the first time a WrongValueException is thrown, but after reloading the page they don't appear next to my input-field any more (upon throwing WrongValueException).. I suspect this has to do with something going wrong down the chain handling security.. Something which is stateful because I need to restart the entire server to be able to see the errobox pop-up again the first time I click my button..the next time the issue is back again..

Any ideas? Not being able to validate and prompt user with errorboxes upon invalid input after having had a page-reload is quite a serious issue I'd say.

Thankful for all input as I'm stranded on this issue right now.

delete flag offensive retag edit

8 Replies

Sort by ยป oldest newest

answered 2011-03-23 07:02:10 +0800

juwian gravatar image juwian
96 1 3

It seems the exception "Failed to invoke.." is thrown from in org.zkoss.zk.ui.util.Configuration

http://grepcode.com/file/repo1.maven.org/maven2/org.zkoss.zk/zk/5.0.0.RC/org/zkoss/zk/ui/util/Configuration.java

..and more precisely..


try {

	final EventThreadCleanup cleanup = (EventThreadCleanup)klass.newInstance();
	cleanup.cleanup(comp, evt, errs);
	cleanups.add(cleanup);
} catch (Throwable t) {

	if (errs != null) errs.add(t);

	if (!silent)
		log.error("Failed to invoke "+klass, t);
            }


Something must go wrong when executing "cleanup.cleanup(comp, evt, errs);" for a thread where a WrongValueException earlier has been thrown. Any ideas?

link publish delete flag offensive edit

answered 2011-03-23 07:17:46 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

Strange, but why you post the ...zk/5.0.0.RC/o... version. It's an dependency problem ? Which zkspring version you use?

link publish delete flag offensive edit

answered 2011-03-23 07:38:26 +0800

juwian gravatar image juwian
96 1 3

(Ok sorry yes the link above to grepcode was to an earlier version. The code snipped in question is however to be found in the same class in the latest release of zk which I utilize in my project.)

I utilize zk 5.0.6 with zkspring 3, that is the latest versions. I also tried zk 5.0.7 freshly without overcoming the experienced issue.
I might add that Firefox shows the errorbox one first time upon throwing WrongValueException (after reloading the same page it is however never shown again for the exception in question). In Internet Explorer it never seems to show up, even after a fresh restart of Tomcat.

link publish delete flag offensive edit

answered 2011-03-23 09:52:07 +0800

juwian gravatar image juwian
96 1 3

I tried downloading and readding all jar files for spring, hibernate, zk, zk-spring-core, zk-spring (with dependencies) but no. The issue remains.

And a thrown WrongValueException still results in SEVERE: Failed to invoke class org.zkoss.spring.security.ui.ZkExceptionTranslationListener as well as no error pop-up box in GUI (except for the first time after a server restart when loading page in Firefox, any reloading of page or attempt to trigger event where exception is thrown from client in Internet explorer will fail).

Help!

link publish delete flag offensive edit

answered 2011-03-23 20:36:29 +0800

ashishd gravatar image ashishd flag of Taiwan
1972 6

Hi juwian,
Could you log this issue to ZK Spring issue tracker and also provide a working sample that will reproduce this issue. If not a sample at least describe your page and use case.

Thanks

link publish delete flag offensive edit

answered 2011-03-24 09:16:35 +0800

juwian gravatar image juwian
96 1 3

Ok so now I've posted the issue to ZK Spring issue tracker with ID: 3240863 as well as uploaded an example project available for download to reproduce the issue.

https://sourceforge.net/tracker/?func=detail&aid=3240863&group_id=152762&atid=785191



To download example project for easy reproduction of the issue (open index.zul after having loaded the entire dynamic web app in Tomcat)
http://tinyurl.com/67zvrjg


Note: the download is an archive-RAR file of approx 59 MiB (the larger size is due to all jars included). Simply extract the folder in your Eclipse workspace, then import it as a project (dynamic web proj) and have it added to a Tomcat 7 server.

Let me know if you're looking at the issue or have any input / updates..


Best regards,
Juwian

link publish delete flag offensive edit

answered 2011-03-24 20:14:35 +0800

ashishd gravatar image ashishd flag of Taiwan
1972 6

Hi juwian,
ZK Spring project is on google code so please post future bugs/features requests regarding ZK Spring on its google code tracker here
I have already moved your reported issue from SF to GC tracker and here is the link to it that you can follow to track its progress.
Your example code is highly appreciated.

link publish delete flag offensive edit

answered 2011-03-29 10:06:15 +0800

juwian gravatar image juwian
96 1 3

Ok, thanks!

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: 2011-03-23 06:01:30 +0800

Seen: 1,051 times

Last updated: Mar 29 '11

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