-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
I'm publishing an event queue this way:
EventQueues.lookup("notifica", EventQueues.APPLICATION, true).publish(new Event("onNotifica",null, notificacion));
It works correctly mostly all time but sometimes this exception is thrown:
GRAVE: >>org.zkoss.zk.ui.DesktopUnavailableException: Stopped >> at org.zkoss.zk.ui.impl.DesktopImpl.checkSeverPush(DesktopImpl.java:1420) >> at org.zkoss.zk.ui.impl.DesktopImpl.scheduleServerPush(DesktopImpl.java:1398) >> at org.zkoss.zk.ui.Executions.schedule(Executions.java:873) >> at org.zkoss.zk.ui.event.impl.ServerPushEventQueue$DesktopInfo.publish(ServerPushEventQueue.java:157) >> at org.zkoss.zk.ui.event.impl.ServerPushEventQueue$DesktopInfo.access$000(ServerPushEventQueue.java:137) >> at org.zkoss.zk.ui.event.impl.ServerPushEventQueue.publish(ServerPushEventQueue.java:53) >> at org.sts.generales.Herramientas.FuncionesComponentes.enviarNotificacion(FuncionesComponentes.java:535) >> at org.sts.Pyme.PantallasZul.IncidenciasyTareas.SeguimientoIncidencias.MaestroTareas.EnviarNotificacion(MaestroTareas.java:7809) >> at org.sts.Pyme.PantallasZul.IncidenciasyTareas.SeguimientoIncidencias.MaestroTareas.onClick$BTPublicarNotificar(MaestroTareas.java:7750) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:597) >> at org.zkoss.zk.ui.event.GenericEventListener.onEvent(GenericEventListener.java:88) >> at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:2736) >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2707) >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2648) >> at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136) >> at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:534) >> at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.sendEvent(EventProcessingThreadImpl.java:126) >> at org.zkoss.zk.ui.event.Events.sendEvent(Events.java:321) >> at org.zkoss.zk.ui.event.Events.sendEvent(Events.java:331) >> at org.zkoss.zk.ui.AbstractComponent$ForwardListener.onEvent(AbstractComponent.java:3174) >> at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:2736) >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2707) >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2648) >> at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136) >> at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:534) >> at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:461)
What does it mean??
Thank you!
look like you forgot enable serverpush
Try in doAfterCompose()
desktop.enableServerPush(true);
I will try to reproduce it but it's difficult because I don't know why it happens.
BTW, I never enable serverpush. I followed the ZK chat example to see how to send application events using EventQueue and I didn't see this line: desktop.enableServerPush(true); . Also, if this line is so important, it would fail always, right?
Thank you
hi, yes, when you use "application scope", zk will use server push automatically.
From the exception, it seems zk cannot get desktop (zk need desktop to update UI), it looks like connection is closed ? that's my wild guess.
What connection maybe is closed?
It's something strange because the actions in the event are executed but the exception is thrown and application flow breaks.
ahhh i had the same error, a thread update the UI with timer. I do not know the reason because it happens,
I suspect the thread that performs the update (in my case)
I apply a patch solution:
if(desktop.isAlive) doSomething;
Asked: 2012-07-05 16:38:13 +0800
Seen: 225 times
Last updated: Jul 09 '12