-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi all.
I'm newbie, and I developing portlet on liferay with ZK.
When I add new ZK portlet to liferay I encounter the error message
"org.zkoss.zk.ui.http.SimpleSession is not serializable and will prevent this session from being replicated."
Anyone can help me, please!
Everything seem ok when I use only component for demo purpose (no event processing). But when add attribute "use" for window component, then error ocured, the portlet screen is not accessible, only snipping "loading" above. The portlet inherited from GenericPortlet, but when I replace it with DHtmlLayoutPortlet, the error remain. As for me the class SimpleSession is not serializable, while as liferay implement, when something store in session it must be serializable. Please give me some advices, thanks!
I've removed the error "org.zkoss.zk.ui.http.SimpleSession is not serializable and will prevent this session from being replicated.", but the snipping is still remain, then I can access my portlet. Is this the conflict between jQuery of Liferay and Prototype of ZK. Please help me, thanks!
Hi,
It seems a bug of portlet, but it's not easy to solve the problem without code, how about sharing some sample code so that we can help. Of course please make code short and let error remain. Besides, complete error message is proper.
Thanks.
Thank hideokidd. My portlet is just a very simple "helloworld". It's java class is:
public class TaskManagerPortlet extends GenericPortlet { protected String editJSP; protected String helpJSP; protected String index; private static Log _log = LogFactory.getLog(TaskManagerPortlet.class); public void init() throws PortletException { editJSP = getInitParameter("edit-jsp"); helpJSP = getInitParameter("help-jsp"); index = getInitParameter("index"); } public void doView(RenderRequest req, RenderResponse res) throws IOException, PortletException { include(index, req, res); //super.doView(req,res); } protected void include(String path, RenderRequest req, RenderResponse res) throws IOException, PortletException { PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher(path); if (prd == null) { _log.error(path + " is not a valid include"); } else { prd.include(req, res); } } }
<portlet> <portlet-name>taskmanager</portlet-name> <display-name>Task manager</display-name> <portlet-class>ipc.ipcms.portlet.taskmanager.TaskManagerPortlet</portlet-class> <init-param> <name>index</name> <value>/html/portlet/ext/task-manager/index.zul</value> </init-param> <expiration-cache>0</expiration-cache> <supports> <mime-type>text/html</mime-type> </supports> <resource-bundle>com.liferay.portlet.StrutsResourceBundle</resource-bundle> <portlet-preferences> <preference> <name>test</name> <value>123</value> </preference> </portlet-preferences> <security-role-ref> <role-name>power-user</role-name> </security-role-ref> <security-role-ref> <role-name>user</role-name> </security-role-ref> </portlet>
<?page id="testZul" title=" New ZUL Title" cacheable="false" language="xul/html" zscriptLanguage="Java" contentType="text/html;charset=UTF-8"?> <?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit"?> <zk xmlns="http://www.zkoss.org/2005/zul" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.zkoss.org/2005/zul http://www.zkoss.org/2005/zul/zul.xsd"> <window title="My First Window" border="normal" width="200px">Hello, World!</window> </zk>
In web.config i've add zk support part
<!--zk framework --> <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> <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>
I've found the solution at liferay forum http://www.liferay.com/web/guest/community/forums/-/message_boards/message/2109508
I met the same problem with Liferay ("...the portlet screen is not accessible, only snipping "loading" above").
And:
1) the adding the property "speed-filters-enabled=false" in the liferay-plugin-package.properties file in the WEB-INF directory of the portlet does not help me.
2) the adding the properties:
com.liferay.portal.servlet.filters.cache.CacheFilter=false
com.liferay.portal.servlet.filters.gzip.GZipFilter=false
in the portal-ext.properties file in the ROOT/WEB-INF/classes directory of the portal does not help also.
Are there any suggestions?
Hello All,
i facing problem in adding zk potlet in liferay,
I have created zk application which i run independently on tomcat it works fine. Same application i have created as portlet and deployed on liferay, it shows portlet name in application list, when i try to add on page its not showing in portlet panel..
any suggestion ???
thanks in advance
Rohit
Asked: 2009-02-20 10:33:03 +0800
Seen: 4,467 times
Last updated: May 29 '12