0

Strange, random bsh interpreter error

asked 2009-02-04 16:33:23 +0800

cvarona gravatar image cvarona
554 1 6

Hi,

I've come across a weird error which appears once in a while, rather unexpectedly; it's triggered by pressing a button within a window which is a child to a certain tabpanel. The window and it's contents have been set into the panel via Executions.createComponentsDirectly. The button is bound to an onClick event listeners which detaches the window the button is found in and closes the tab.

The error manifests itself as a popup window complaining about some non-existing 'system' field; this is what I can see in the console I've started the serving hosting the zk application:

bsh.InterpreterError: set: Field access: bsh.ReflectError: No such field: system : at Line: -1 : in file: <Called from J
ava Code> : <Compiled Java Code>

at bsh.Interpreter.setu(Unknown Source)
at bsh.Interpreter.initRootSystemObject(Unknown Source)
at bsh.Interpreter.<init>(Unknown Source)
at bsh.Interpreter.eval(Unknown Source)
at bsh.Interpreter.eval(Unknown Source)
at org.zkoss.zk.scripting.bsh.BSHInterpreter.exec(BSHInterpreter.java:100)
at org.zkoss.zk.scripting.util.GenericInterpreter.interpret(GenericInterpreter.java:292)
at org.zkoss.zk.ui.impl.PageImpl.interpret(PageImpl.java:766)
at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:178)
at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:143)
at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:488)
at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:422)

By attaching the netbeans debugger I've been able to obtain the full stack trace:

"25678960@qtp0-8"
org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1006)
org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:480)
org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:370)
org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:379)
javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1124)
org.nanocontainer.nanowar.ServletRequestContainerFilter.doFilter(ServletRequestContainerFilter.java:44)
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1115)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
org.springframework.security.ui.SessionFixationProtectionFilter.doFilterHttp(SessionFixationProtectionFilter.java:67)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:116)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:277)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175)
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236)
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1115)
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:361)
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
org.mortbay.jetty.Server.handle(Server.java:324)
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:864)
org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:533)
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:207)
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:522)

The event triggering the error is usually the 'onFocus' event on the button itself, but it can be an onFocus on an rather unrelated inputbox to be found in the same window as the button as well.

I'm using zk3.5.2 and starting the zk application by the maven jetty plugin 6.1.14; my application is secured by Spring security.

Any suggestion would be much appreciated

With kind regards

César Varona

delete flag offensive retag edit

3 Replies

Sort by » oldest newest

answered 2009-02-11 02:33:14 +0800

robbiecheng gravatar image robbiecheng
1144 2
http://robbiecheng.sys-co...

Hi Varona,

Would you please post your example code, so we can replicate this issue.

Thanks,
Robbie

link publish delete flag offensive edit

answered 2009-02-11 14:45:39 +0800

cvarona gravatar image cvarona
554 1 6

Hi Robbie,

I'm afraid it's not possible to post everything needed to reproduce this. There is a complex mechanism involving both zscript and tons of java code which creates tabs within a main page and then loads forms via Executions.createComponentsDirectly into their associated tabpanels. The forms themselves display a very complex focus management. As for the error, it does not appear in a consistent manner but rather randomly. I just posted this expecting the dismaying "bsh.ReflectError: No such field: system : at Line: -1" could perhaps have some meaning for somebody.

If by any chance I happen to be able to construct some simple example which allows me to reproduce it take for sure I won't hesitate in posting it.

With kind regards

César Varona

link publish delete flag offensive edit

answered 2009-02-12 07:40:07 +0800

robbiecheng gravatar image robbiecheng
1144 2
http://robbiecheng.sys-co...

Hi Cesar,

I see, it's not easy to simplify a complex case.

By the way, do you use ZK Spring Security?
Please refer to http://zkoss.org/smalltalks/zkspringsec2/

/robbie

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: 2009-02-04 16:33:23 +0800

Seen: 360 times

Last updated: Feb 12 '09

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