org.zkoss.zk.ui.UiException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • mvvm.jsp <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <%@ taglib uri="http://www.zkoss.org/jsp/zul" prefix="zk" %> <HTML> <BODY> Hello, world The time is now <%= new java.util.Date() %> <zk:page zscriptLanguage="java"> <zk:window apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('org.zkoss.mvvm.examples.hello.HelloViewModel')"> <zk:label value="@load(vm.message)"> </zk:label> <zk:button label="Show" onClick="@command('showHello')"></zk:button> </zk:window> </zk:page> </BODY> </HTML> HelloViewModel.java public class HelloViewModel { private String message; public String getMessage() { return message; } @Command() @NotifyChange("message") public void showHello() { message = "Hello World!"; } } Expected: After clicking Show button label should be populated with "Hello World" Actual: After loading this page and clicking on Show button I get SEVERE: >>org.zkoss.zk.ui.UiException: Sourced file: inline evaluation of: ``@command('showHello');'' Token Parsing Error: Lexical error at line 1, column 2. Encountered: "c" (99), after : "@": <at unknown location> >> at bsh.Interpreter.eval(Unknown Source) >> at bsh.Interpreter.eval(Unknown Source) >> at org.zkoss.zk.scripting.bsh.BSHInterpreter.exec(BSHInterpreter.java:131) >> at org.zkoss.zk.scripting.util.GenericInterpreter.interpret(GenericInterpreter.java:328) >> at org.zkoss.zk.ui.impl.PageImpl.interpret(PageImpl.java:853) >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2700) >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2653) >> at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136) >> at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1696) >> at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1481) >> at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1198) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:558) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:456) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:464) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) >> at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) >> at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401) >> at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) >> at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) >> at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) >> at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450) >> at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) >> at org.mortbay.jetty.Server.handle(Server.java:326) >> at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) >> at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945) >> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756) >> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) >> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) >> at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410) >> at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) Possible cause: Improper or not handling command annotation
    via by ashishd,
  • mvvm.jsp <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <%@ taglib uri="http://www.zkoss.org/jsp/zul" prefix="zk" %> <HTML> <BODY> Hello, world The time is now <%= new java.util.Date() %> <zk:page zscriptLanguage="java"> <zk:window apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('org.zkoss.mvvm.examples.hello.HelloViewModel')"> <zk:label value="@load(vm.message)"> </zk:label> <zk:button label="Show" onClick="@command('showHello')"></zk:button> </zk:window> </zk:page> </BODY> </HTML> HelloViewModel.java public class HelloViewModel { private String message; public String getMessage() { return message; } @Command() @NotifyChange("message") public void showHello() { message = "Hello World!"; } } Expected: After clicking Show button label should be populated with "Hello World" Actual: After loading this page and clicking on Show button I get SEVERE: >>org.zkoss.zk.ui.UiException: Sourced file: inline evaluation of: ``@command('showHello');'' Token Parsing Error: Lexical error at line 1, column 2. Encountered: "c" (99), after : "@": <at unknown location> >> at bsh.Interpreter.eval(Unknown Source) >> at bsh.Interpreter.eval(Unknown Source) >> at org.zkoss.zk.scripting.bsh.BSHInterpreter.exec(BSHInterpreter.java:131) >> at org.zkoss.zk.scripting.util.GenericInterpreter.interpret(GenericInterpreter.java:328) >> at org.zkoss.zk.ui.impl.PageImpl.interpret(PageImpl.java:853) >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2700) >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2653) >> at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136) >> at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1696) >> at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1481) >> at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1198) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:558) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:456) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:464) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) >> at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) >> at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401) >> at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) >> at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) >> at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) >> at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450) >> at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) >> at org.mortbay.jetty.Server.handle(Server.java:326) >> at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) >> at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945) >> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756) >> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) >> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) >> at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410) >> at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) Possible cause: Improper or not handling command annotation
    via by ashishd,
  • According to http://www.zkoss.org/javadoc/latest/zk/org/zkoss/zul/Window.html it is possible to manage onClose event in custom way and prevent the default behaviour (detach the window) from being executed. The test provided in the attached files demonstrate that behaviour can't be achieved when using a composer. The idea of the test is that the two windows winOk and winWrong will respond to onClose by hiding the window only, so it can be shown later (multiple times) by the "Open Wrong Window" and "Open Good Window" buttons. In the case of winOk everything is coded in zscript in test.zul and works as expected, however when trying to implement the same for winWrong in its controller method org.zkoss.test.WinViewCtroller.onClose$winWrong(Event) the window will detach. A subsequent click to "Open Wrong Window" will produce this error: 08/09/2011 11:53:20 AM org.zkoss.zk.ui.impl.UiEngineImpl handleError:1280 SEVERE: >>org.zkoss.zk.ui.UiException: Sourced file: inline evaluation of: `` winWrong.doModal();'' : Attempt to resolve method: doModal() on undefined variable or class name: winWrong : at Line: 2 : in file: inline evaluation of: `` winWrong.doModal();'' : winWrong .doModal ( ) >>Sourced file: inline evaluation of: `` winWrong.doModal();'' : Attempt to resolve method: doModal() on undefined variable or class name: winWrong : at Line: 2 : in file: inline evaluation of: `` winWrong.doModal();'' : winWrong .doModal ( ) >> >> at bsh.UtilEvalError.toEvalError(Unknown Source) >> at bsh.UtilEvalError.toEvalError(Unknown Source) >> at bsh.BSHMethodInvocation.eval(Unknown Source) >> at bsh.BSHPrimaryExpression.eval(Unknown Source) >> at bsh.BSHPrimaryExpression.eval(Unknown Source) >> at bsh.Interpreter.eval(Unknown Source) >> at bsh.Interpreter.eval(Unknown Source) >> at org.zkoss.zk.scripting.bsh.BSHInterpreter.exec(BSHInterpreter.java:134) >> at org.zkoss.zk.scripting.util.GenericInterpreter.interpret(GenericInterpreter.java:341) >> at org.zkoss.zk.ui.impl.PageImpl.interpret(PageImpl.java:876) >> at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:180) >> at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:138) >> at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:517) >> at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:444) The problem happens either when clicking the cross button (available by setting closable="true") or forwarding the onClose event from buttonWrong button. In both cases the controller method org.zkoss.test.WinViewCtroller.onClose$winWrong(Event) gets called, I can see the log message as follows: 11:53:16,269 INFO [Thread-12] zkoss.test.WinViewCtroller.onClose$winWrong(18): Called Further testing while debugging my real code (when I first faced the problem), showed that at some point the internal ZK event processing code, there are two instances of the onClose event, one of them gets to the composer where it is sopped from being propagated but later on the second instance gets through to Window.onClose() causing the windows to be detached.
    via by javich,
  • According to http://www.zkoss.org/javadoc/latest/zk/org/zkoss/zul/Window.html it is possible to manage onClose event in custom way and prevent the default behaviour (detach the window) from being executed. The test provided in the attached files demonstrate that behaviour can't be achieved when using a composer. The idea of the test is that the two windows winOk and winWrong will respond to onClose by hiding the window only, so it can be shown later (multiple times) by the "Open Wrong Window" and "Open Good Window" buttons. In the case of winOk everything is coded in zscript in test.zul and works as expected, however when trying to implement the same for winWrong in its controller method org.zkoss.test.WinViewCtroller.onClose$winWrong(Event) the window will detach. A subsequent click to "Open Wrong Window" will produce this error: 08/09/2011 11:53:20 AM org.zkoss.zk.ui.impl.UiEngineImpl handleError:1280 SEVERE: >>org.zkoss.zk.ui.UiException: Sourced file: inline evaluation of: `` winWrong.doModal();'' : Attempt to resolve method: doModal() on undefined variable or class name: winWrong : at Line: 2 : in file: inline evaluation of: `` winWrong.doModal();'' : winWrong .doModal ( ) >>Sourced file: inline evaluation of: `` winWrong.doModal();'' : Attempt to resolve method: doModal() on undefined variable or class name: winWrong : at Line: 2 : in file: inline evaluation of: `` winWrong.doModal();'' : winWrong .doModal ( ) >> >> at bsh.UtilEvalError.toEvalError(Unknown Source) >> at bsh.UtilEvalError.toEvalError(Unknown Source) >> at bsh.BSHMethodInvocation.eval(Unknown Source) >> at bsh.BSHPrimaryExpression.eval(Unknown Source) >> at bsh.BSHPrimaryExpression.eval(Unknown Source) >> at bsh.Interpreter.eval(Unknown Source) >> at bsh.Interpreter.eval(Unknown Source) >> at org.zkoss.zk.scripting.bsh.BSHInterpreter.exec(BSHInterpreter.java:134) >> at org.zkoss.zk.scripting.util.GenericInterpreter.interpret(GenericInterpreter.java:341) >> at org.zkoss.zk.ui.impl.PageImpl.interpret(PageImpl.java:876) >> at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:180) >> at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:138) >> at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:517) >> at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:444) The problem happens either when clicking the cross button (available by setting closable="true") or forwarding the onClose event from buttonWrong button. In both cases the controller method org.zkoss.test.WinViewCtroller.onClose$winWrong(Event) gets called, I can see the log message as follows: 11:53:16,269 INFO [Thread-12] zkoss.test.WinViewCtroller.onClose$winWrong(18): Called Further testing while debugging my real code (when I first faced the problem), showed that at some point the internal ZK event processing code, there are two instances of the onClose event, one of them gets to the composer where it is sopped from being propagated but later on the second instance gets through to Window.onClose() causing the windows to be detached.
    via by javich,
    • org.zkoss.zk.ui.UiException: Sourced file: inline evaluation of: ``@command('showHello');'' Token Parsing Error: Lexical error at line 1, column 2. Encountered: "c" (99), after : "@": <at unknown location> at bsh.Interpreter.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at org.zkoss.zk.scripting.bsh.BSHInterpreter.exec(BSHInterpreter.java:131) at org.zkoss.zk.scripting.util.GenericInterpreter.interpret(GenericInterpreter.java:328) at org.zkoss.zk.ui.impl.PageImpl.interpret(PageImpl.java:853) at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2700) at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2653) at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136) at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1696) at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1481) at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1198) at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:558) at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:456) at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:464) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
    No Bugmate found.