0

Event Processing Thread is disabled??

asked 2009-06-14 15:18:36 +0800

dermaik81 gravatar image dermaik81
60 1

Hi guys
I have another little Problem,
I want to add a modal login dialog. For a first test I have copied the code of the modal dialog from the ZK Component Explorer.
When I want to open the Dialog by clicking a test button the following error message appears:

"Event Processing Thread is disabled"

Where can I switch on this feature?

For further information have a lokk at the tomcat logs:
14.06.2009 17:14:41 org.zkoss.zk.ui.impl.UiEngineImpl handleError:1108
SCHWERWIEGEND: >>org.zkoss.zk.ui.SuspendNotAllowedException: Event processing thread is disabled
>> at org.zkoss.zul.Window.doModal(Window.java:539)
>> 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 bsh.Reflect.invokeMethod(Unknown Source)
>> at bsh.Reflect.invokeObjectMethod(Unknown Source)
>> at bsh.Name.invokeMethod(Unknown Source)
>> at bsh.BSHMethodInvocation.eval(Unknown Source)
>>...

Do you have any hints for me. Thanks an lot and best wishes,
maik

delete flag offensive retag edit

10 Replies

Sort by ยป oldest newest

answered 2009-06-14 23:19:38 +0800

YamilBracho gravatar image YamilBracho
1722 2

Check the zk.xml and comment the line:
<system-config>
<disable-event-thread />
</system-config>

link publish delete flag offensive edit

answered 2009-06-15 17:08:47 +0800

dermaik81 gravatar image dermaik81
60 1

hi,
my zk.xml is purely empty...
which event listener class do i have to register??
I want to execute the following code.

<?page title="new page title" contentType="text/html;charset=UTF-8"?>
<zk>
<style src="style.css"/>

<zscript>
		<![CDATA[//@IMPORT
		
		         
		]]><![CDATA[//@DECLARATION
		public void doLogin(){
			final Window win = (Window) Executions.createComponents(
					"login.zul", null, null);
			win.setMaximizable(true);
			win.doModal();	
		}
		]]></zscript>


<window title="Venta Administration Services" border="normal" height="100%" width="100%">
<button label="login" onClick="doLogin()">
	
</button>

</window>
</zk>


I don't know how to fill in my zk.zul

Do you have any hints for me?

Best wishes, Maik

link publish delete flag offensive edit

answered 2009-06-16 18:59:30 +0800

edudant gravatar image edudant
219 1 1 1
zk.datalite.cz

Are you sure, you have WEB-INF/zk.xml file and it is empty? Because this really looks like you have event threads disabled with this config.

Btw. you can use modal-like dialogs even when event threads are disabled, just use win.doHighlighted(); method instead.

link publish delete flag offensive edit

answered 2009-06-16 19:12:50 +0800

YamilBracho gravatar image YamilBracho
1722 2

Maik, I ran your code with ZK 3.6 and no usage of zk.xml and works OK (Showing an error because I do not have a login.zul file).
As a suggestion check your web.xml or your ZK jar files...

link publish delete flag offensive edit

answered 2009-06-16 20:43:13 +0800

dermaik81 gravatar image dermaik81
60 1

Hi edudant and YamilBracho,
thanks for your posts.
So here is my zk.xml

<?xml version="1.0" encoding="UTF-8"?>

<!--
	Created by ZK Studio
-->

<zk>

    
		 
</zk>

So you see its empty. Here we go on with the web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
	<display-name>
	vas</display-name>
	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>classpath:/config/application-context.xml,classpath:/config/datasource-context.xml</param-value>
	</context-param>
	<listener>
		<description>
		Used to cleanup when a session is destroyed</description>
		<display-name>
		ZK Session Cleaner</display-name>
		<listener-class>org.zkoss.zk.ui.http.HttpSessionListener</listener-class>
	</listener>
	<listener>
		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
	</listener>
	<listener>
		<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
	</listener>
	<servlet>
		<description>
		The servlet loads the DSP pages.</description>
		<servlet-name>dspLoader</servlet-name>
		<servlet-class>
		org.zkoss.web.servlet.dsp.InterpreterServlet</servlet-class>
	</servlet>
	<servlet>
		<description>
		ZK loader for ZUML pages</description>
		<servlet-name>zkLoader</servlet-name>
		<servlet-class>
		org.zkoss.zk.ui.http.DHtmlLayoutServlet</servlet-class>
		<init-param>
			<param-name>update-uri</param-name>
			<param-value>/zkau</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>
	<servlet>
		<description>
		The asynchronous update engine for ZK</description>
		<servlet-name>auEngine</servlet-name>
		<servlet-class>
		org.zkoss.zk.au.http.DHtmlUpdateServlet</servlet-class>
	</servlet>
	<servlet-mapping>
		<servlet-name>dspLoader</servlet-name>
		<url-pattern>*.dsp</url-pattern>
	</servlet-mapping>
	<servlet-mapping>
		<servlet-name>zkLoader</servlet-name>
		<url-pattern>*.zul</url-pattern>
	</servlet-mapping>
	<servlet-mapping>
		<servlet-name>zkLoader</servlet-name>
		<url-pattern>*.zhtml</url-pattern>
	</servlet-mapping>
	<servlet-mapping>
		<servlet-name>auEngine</servlet-name>
		<url-pattern>/zkau/*</url-pattern>
	</servlet-mapping>
	<welcome-file-list>
		<welcome-file>index.html</welcome-file>
		<welcome-file>index.htm</welcome-file>
		<welcome-file>index.jsp</welcome-file>
		<welcome-file>default.html</welcome-file>
		<welcome-file>default.htm</welcome-file>
		<welcome-file>default.jsp</welcome-file>
		<welcome-file>index.zul</welcome-file>
	</welcome-file-list>
</web-app>


You should notice, that I have built some CRUD Pages with the Zeta Form Wizard. So the spring-framework is used. Every CRUD Page works very fine.

Every Idea is very welcome. I don't have much ZK-experience yet. So I will need a little bit support. Thanks a lot and a nice evening,
Maik

link publish delete flag offensive edit

answered 2009-06-17 06:10:53 +0800

mjablonski gravatar image mjablonski
1284 3 5
http://www.jease.org/

Hi,

if you're using Spring, please try to add the following to your zk.xml:

<system-config>
     <ui-factory-class>org.zkoss.spring.bean.ZkSpringUiFactory</ui-factory-class>
</system-config>

Does this help?

Cheers,
Another Maik...;-)

link publish delete flag offensive edit

answered 2009-06-17 07:53:43 +0800

dermaik81 gravatar image dermaik81
60 1

Hi Maik,
thanks a lot for your post. I will try that, when I am back home. Do I have to call the

win = (Window) Executions.createComponents("login.zul", null, null) - function or another one during I am using spring?
Thanks,
the other other Maik

link publish delete flag offensive edit

answered 2009-06-17 10:00:12 +0800

dermaik81 gravatar image dermaik81
60 1

Wow, that works fine now. Thanks very much @all for the help.
Greetz, Maik

link publish delete flag offensive edit

answered 2009-06-18 11:54:40 +0800

Spanier gravatar image Spanier
3

Hi all. I had the same problem, but after adding mentioned code to the zk.xml i wasn't able to start any other xxx.zul file than the one designed for modal login.
The resulting error looks like this, but I'm not able to understand it:
18.06.2009 12:47:23 org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
18.06.2009 12:47:23 org.apache.catalina.startup.Catalina start
INFO: Server startup in 9156 ms
18.06.2009 12:47:43 org.apache.catalina.core.StandardWrapperValve invoke
SCHWERWIEGEND: Servlet.service() for servlet zkLoader threw exception
org.zkoss.zk.ui.UiException: Callable only in the event listener
at org.zkoss.zk.ui.event.Events.sendEvent(Events.java:289)
at org.zkoss.zk.ui.event.Events.sendEvent(Events.java:303)
at org.zkoss.spring.config.ZkSpringBeanBindingComposer.bindController(ZkSpringBeanBindingComposer.java:123)
at org.zkoss.spring.config.ZkSpringBeanBindingComposer.bindControllers(ZkSpringBeanBindingComposer.java:109)
at org.zkoss.spring.config.ZkSpringBeanBindingComposer.bindComponent(ZkSpringBeanBindingComposer.java:92)
at org.zkoss.spring.config.ZkSpringBeanBindingComposer.doAfterCompose(ZkSpringBeanBindingComposer.java:68)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:622)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:583)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:527)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:559)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:527)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:494)
at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:375)
at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:296)
at org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:229)
at org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:166)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)

Do you have any ideas?

Thanks in advance for your hints,
Miguel

link publish delete flag offensive edit

answered 2009-08-10 15:57:06 +0800

totocutugno gravatar image totocutugno
6

Hi all,

I have the same problem than dermaik81 (after having used ZK+Spring+Hibernate from Zeta).
I also use only these lines in my zk.xml :

<system-config>
     <ui-factory-class>org.zkoss.spring.bean.ZkSpringUiFactory</ui-factory-class>
</system-config>

But, I get the same errors than Spanier...

Still no ideas?

Best regards.

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-06-14 15:18:36 +0800

Seen: 1,304 times

Last updated: Aug 10 '09

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