java.lang.IllegalStateException: Before calling Executions.schedule(), the server push must be enabled for [Desktop z_tcr:/index.zul]

ZK-Tracker | JerryChen | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    after a pair of executions' activate and deactive were called, using mechanism of server push event queue will cause illegalStateException. {code} java.lang.IllegalStateException: Before calling Executions.schedule(), the server push must be enabled for [Desktop z_tcr:/index.zul] at org.zkoss.zk.ui.impl.DesktopImpl.checkSeverPush(DesktopImpl.java:1496) at org.zkoss.zk.ui.impl.DesktopImpl.scheduleServerPush(DesktopImpl.java:1472) at org.zkoss.zk.ui.Executions.schedule(Executions.java:870) at org.zkoss.zk.ui.event.impl.ServerPushEventQueue$DesktopInfo.publish(ServerPushEventQueue.java:158) at org.zkoss.zk.ui.event.impl.ServerPushEventQueue$DesktopInfo.access$000(ServerPushEventQueue.java:138) at org.zkoss.zk.ui.event.impl.ServerPushEventQueue.publish(ServerPushEventQueue.java:54) at org.zkoss.zss.model.impl.EventQueueListenerAdaptor.sendModelEvent(EventQueueListenerAdaptor.java:76) at org.zkoss.zss.model.impl.BookImpl.sendModelEvent(BookImpl.java:203) at org.zkoss.zss.range.impl.NotifyChangeHelper.notifyCustomEvent(NotifyChangeHelper.java:209) at org.zkoss.zss.range.impl.RangeImpl$48.invoke(RangeImpl.java:1591) at org.zkoss.zss.model.util.ReadWriteTask.doInWriteLock(ReadWriteTask.java:43) at org.zkoss.zss.range.impl.RangeImpl.notifyCustomEvent(RangeImpl.java:1597) at org.zkoss.zss.ui.Spreadsheet.moveSelfEditorFocus(Spreadsheet.java:697) at org.zkoss.zss.ui.Spreadsheet.doMoveSelfFocus(Spreadsheet.java:707) at org.zkoss.zss.ui.Spreadsheet.access$52(Spreadsheet.java:706) at org.zkoss.zss.ui.Spreadsheet$5.onEvent(Spreadsheet.java:788) at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:2752) at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2723) at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2664) at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136) at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1765) at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1550) at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1260) at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:611) at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:485) at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:494) 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) {code} extra information: it's because desktop itself wasn't added into existing subscription enabler list, so that calling deactivate will also turn off server push. we should fix statement at ServerPushEventQueue$DesktopInfo {code} desktop.enableServerPush(true); {code} with {code} ((DesktopImpl)desktop).enableServerPush(true, this); {code}

    ZK-Tracker | 2 years ago | JerryChen
    java.lang.IllegalStateException: Before calling Executions.schedule(), the server push must be enabled for [Desktop z_tcr:/index.zul]
  2. 0

    after a pair of executions' activate and deactive were called, using mechanism of server push event queue will cause illegalStateException. {code} java.lang.IllegalStateException: Before calling Executions.schedule(), the server push must be enabled for [Desktop z_tcr:/index.zul] at org.zkoss.zk.ui.impl.DesktopImpl.checkSeverPush(DesktopImpl.java:1496) at org.zkoss.zk.ui.impl.DesktopImpl.scheduleServerPush(DesktopImpl.java:1472) at org.zkoss.zk.ui.Executions.schedule(Executions.java:870) at org.zkoss.zk.ui.event.impl.ServerPushEventQueue$DesktopInfo.publish(ServerPushEventQueue.java:158) at org.zkoss.zk.ui.event.impl.ServerPushEventQueue$DesktopInfo.access$000(ServerPushEventQueue.java:138) at org.zkoss.zk.ui.event.impl.ServerPushEventQueue.publish(ServerPushEventQueue.java:54) at org.zkoss.zss.model.impl.EventQueueListenerAdaptor.sendModelEvent(EventQueueListenerAdaptor.java:76) at org.zkoss.zss.model.impl.BookImpl.sendModelEvent(BookImpl.java:203) at org.zkoss.zss.range.impl.NotifyChangeHelper.notifyCustomEvent(NotifyChangeHelper.java:209) at org.zkoss.zss.range.impl.RangeImpl$48.invoke(RangeImpl.java:1591) at org.zkoss.zss.model.util.ReadWriteTask.doInWriteLock(ReadWriteTask.java:43) at org.zkoss.zss.range.impl.RangeImpl.notifyCustomEvent(RangeImpl.java:1597) at org.zkoss.zss.ui.Spreadsheet.moveSelfEditorFocus(Spreadsheet.java:697) at org.zkoss.zss.ui.Spreadsheet.doMoveSelfFocus(Spreadsheet.java:707) at org.zkoss.zss.ui.Spreadsheet.access$52(Spreadsheet.java:706) at org.zkoss.zss.ui.Spreadsheet$5.onEvent(Spreadsheet.java:788) at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:2752) at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2723) at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2664) at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136) at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1765) at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1550) at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1260) at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:611) at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:485) at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:494) 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) {code} extra information: it's because desktop itself wasn't added into existing subscription enabler list, so that calling deactivate will also turn off server push. we should fix statement at ServerPushEventQueue$DesktopInfo {code} desktop.enableServerPush(true); {code} with {code} ((DesktopImpl)desktop).enableServerPush(true, this); {code}

    ZK-Tracker | 2 years ago | JerryChen
    java.lang.IllegalStateException: Before calling Executions.schedule(), the server push must be enabled for [Desktop z_tcr:/index.zul]

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Before calling Executions.schedule(), the server push must be enabled for [Desktop z_tcr:/index.zul]

      at org.zkoss.zk.ui.impl.DesktopImpl.checkSeverPush()
    2. ZK Kernel
      ServerPushEventQueue.publish
      1. org.zkoss.zk.ui.impl.DesktopImpl.checkSeverPush(DesktopImpl.java:1496)
      2. org.zkoss.zk.ui.impl.DesktopImpl.scheduleServerPush(DesktopImpl.java:1472)
      3. org.zkoss.zk.ui.Executions.schedule(Executions.java:870)
      4. org.zkoss.zk.ui.event.impl.ServerPushEventQueue$DesktopInfo.publish(ServerPushEventQueue.java:158)
      5. org.zkoss.zk.ui.event.impl.ServerPushEventQueue$DesktopInfo.access$000(ServerPushEventQueue.java:138)
      6. org.zkoss.zk.ui.event.impl.ServerPushEventQueue.publish(ServerPushEventQueue.java:54)
      6 frames
    3. org.zkoss.zss
      Spreadsheet$5.onEvent
      1. org.zkoss.zss.model.impl.EventQueueListenerAdaptor.sendModelEvent(EventQueueListenerAdaptor.java:76)
      2. org.zkoss.zss.model.impl.BookImpl.sendModelEvent(BookImpl.java:203)
      3. org.zkoss.zss.range.impl.NotifyChangeHelper.notifyCustomEvent(NotifyChangeHelper.java:209)
      4. org.zkoss.zss.range.impl.RangeImpl$48.invoke(RangeImpl.java:1591)
      5. org.zkoss.zss.model.util.ReadWriteTask.doInWriteLock(ReadWriteTask.java:43)
      6. org.zkoss.zss.range.impl.RangeImpl.notifyCustomEvent(RangeImpl.java:1597)
      7. org.zkoss.zss.ui.Spreadsheet.moveSelfEditorFocus(Spreadsheet.java:697)
      8. org.zkoss.zss.ui.Spreadsheet.doMoveSelfFocus(Spreadsheet.java:707)
      9. org.zkoss.zss.ui.Spreadsheet.access$52(Spreadsheet.java:706)
      10. org.zkoss.zss.ui.Spreadsheet$5.onEvent(Spreadsheet.java:788)
      10 frames
    4. ZK Kernel
      DHtmlUpdateServlet.doPost
      1. org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:2752)
      2. org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2723)
      3. org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2664)
      4. org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136)
      5. org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1765)
      6. org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1550)
      7. org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1260)
      8. org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:611)
      9. org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:485)
      10. org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:494)
      10 frames
    5. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      2 frames
    6. 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
    7. Jetty Util
      QueuedThreadPool$PoolThread.run
      1. org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
      1 frame