-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I have a very simple ZK application with a single window, a single button with an onClick event listener that performs a MessageBox.
The application works fine in my local google app engine environment, but not when deployed to app engine servers.
The issue is that, when the button is clicked, instead of getting the MessageBox pop-up, the session always times out with the message: "The page or component you request is no longer available. This is normally caused by timeout, opening too many Web pages, or rebooting the server."
There is absolutely nothing fancy about this application.
I've followed the Installation Guide for ZK on Google App Engine.
Does anyone have any ideas on how to resolve this?
Thanks.
Same in ZK 5.0.8. Both buttons doesn't work neither with composer listener nor ZUL inline.
index.zul
<window border="none" id="main" width="100%" height="100%" apply="zktest.hellomvc.HelloZKComposer"> <vlayout ><button id="sayHelloBtn" label="Say Hello"/> <button id="sayXZ" label="Say XZ"> <attribute name="onClick"> Messagebox.show("XZ"); </attribute> </button> </vlayout> </window>
<zk> <!-- clustering environment --> <system-config> <disable-event-thread/> <ui-factory-class>org.zkoss.zk.ui.http.SerializableUiFactory</ui-factory-class> </system-config> <!-- clustering environment, since ZK 5.0.8--> <listener> <listener-class>org.zkoss.zkplus.cluster.ClusterSessionPatch</listener-class> </listener> <!-- GAE doesn't allow user's thread --> <client-config> <resend-delay>-1</resend-delay> </client-config> </zk>
web.xml
<web-app xmlns="http://java.sun.com/xml/ns/javaee" version="2.5"> <listener> <description>ZK listener for session cleanup</description> <listener-class>org.zkoss.zk.ui.http.HttpSessionListener</listener-class> </listener> <servlet> <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> <servlet-name>auEngine</servlet-name> <servlet-class>org.zkoss.zk.au.http.DHtmlUpdateServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>zkLoader</servlet-name> <url-pattern>*.zul</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>auEngine</servlet-name> <url-pattern>/zkau/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>auEngine</servlet-name> <url-pattern>/zkau</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.zul</welcome-file> <welcome-file>index.zhtml</welcome-file> <welcome-file>index.html</welcome-file> </welcome-file-list> </web-app>
appengine-web.xml
<?xml version="1.0" encoding="utf-8"?> <appengine-web-app xmlns="http://appengine.google.com/ns/1.0"> <application>tags42</application> <version>5</version> <sessions-enabled>true</sessions-enabled> <static-files> <exclude path="/**.zul" /> <exclude path="/**.zhtml" /> </static-files> <resource-files> <include path="/**.zul" /> <include path="/**.zhtml" /> </resource-files> </appengine-web-app>
Hi Vladimir, thanks for the information. I posted it to the bug tracker. Please follow Bug ZK-450.
Hi Vladimir, did you try the following setting mentioned in GAE developer's guide?
# In your .gwt.xml file
<inherits name="com.google.gwt.logging.Logging"/>
Hi Tom, I haven't try this since there is no any .gwt.xml while using ZK. Despite this, I don't think it will help. It's just for unification of logging mechanism with GWT and user code. The LogManager is restricted API anyway.
Hi Antiso,
You can download the latest ZK 5.0.9-FL version later, and specify the setting into the zk.xml to solve this issue.
Hello, Jumper,
I've checked ZK 5.0.9 with recommended settings and there are some other problem. For example alert window doesn't hide on "Ok" click, borderlayout sample don't work ...
So, seems like 5.0.6 is a best choice.
There is some exception. I don't know real cause:
Nested in javax.servlet.ServletException: java.lang.NullPointerException: java.lang.NullPointerException at org.zkoss.zk.ui.impl.PageImpl.getInterpreter(PageImpl.java:895) at org.zkoss.zk.ui.impl.PageImpl.readObject(PageImpl.java:1203) at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source) ....
Asked: 2011-08-28 02:38:11 +0800
Seen: 701 times
Last updated: Dec 05 '11