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>

ZK-Tracker | ashishd | 5 years ago
  1. 0

    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

    ZK-Tracker | 5 years ago | ashishd
    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>
  2. 0

    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

    ZK-Tracker | 5 years ago | ashishd
    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>
  3. 0

    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.

    ZK-Tracker | 5 years ago | javich
    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 ( )
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    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.

    ZK-Tracker | 5 years ago | javich
    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 ( )
  6. 0

    New Install Centos 7.2.1 with OSS v1.5.13 build 2b6dfa4d90

    opensearchserve | 9 months ago | madmaxdallas
    org.zkoss.zk.ui.UiException: cannot find any method that is annotated for the command onListRefresh with @Command in com.jaeksoft.searchlib.web.controller.PrivilegesController@4c9422a at [file:/root/opensearch/opensearchserver/server/web apps/ROOT/WEB-INF/zul/privileges/index.zul, line:148]

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. 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()
    2. BeanShell
      Interpreter.eval
      1. bsh.Interpreter.eval(Unknown Source)
      2. bsh.Interpreter.eval(Unknown Source)
      2 frames
    3. ZK Kernel
      DHtmlUpdateServlet.doPost
      1. org.zkoss.zk.scripting.bsh.BSHInterpreter.exec(BSHInterpreter.java:131)
      2. org.zkoss.zk.scripting.util.GenericInterpreter.interpret(GenericInterpreter.java:328)
      3. org.zkoss.zk.ui.impl.PageImpl.interpret(PageImpl.java:853)
      4. org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2700)
      5. org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2653)
      6. org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136)
      7. org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1696)
      8. org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1481)
      9. org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1198)
      10. org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:558)
      11. org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:456)
      12. org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:464)
      12 frames
    4. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      2 frames
    5. Jetty Server
      SelectChannelEndPoint.run
      1. org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
      2. org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
      3. org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      4. org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
      5. org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
      6. org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
      7. org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      8. org.mortbay.jetty.Server.handle(Server.java:326)
      9. org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
      10. org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945)
      11. org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
      12. org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
      13. org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
      14. org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
      14 frames
    6. Jetty Util
      QueuedThreadPool$PoolThread.run
      1. org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
      1 frame