0

Template cause stack overflow

asked 2014-01-29 13:27:39 +0800

IanFerreira gravatar image IanFerreira
1

Hi guys

I need help running ZK on cloudbees.net (tomcat6) in a cloud. Got the following error: exception java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute javax.zkoss.zk.ui.Session org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1351) org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1312) org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:130) org.zkoss.zk.ui.http.SessionAgent.put(SessionAgent.java:30) org.zkoss.zk.ui.http.SimpleSessionCache.put(SimpleSessionCache.java:36) org.zkoss.zk.ui.sys.SessionsCtrl.newSession(SessionsCtrl.java:158) org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:435) org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:416) org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:126) javax.servlet.http.HttpServlet.service(HttpServlet.java:617) javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

Is ZK cloud compliant ? Regards IanF

delete flag offensive retag edit

2 Answers

Sort by » oldest newest most voted
0

answered 2014-01-29 14:26:43 +0800

chillworld gravatar image chillworld flag of Belgium
5322 4 9
https://github.com/chillw...

Very simpel, I'll explain with code.

public class SendObject implements Serializable {
   private SubObject object;
   // getters and setters for this object
}
public class SubObject {
   private String text;
   // also getters and setters
}

Now with this you have the same error as you. You have to implements Serializable also on the SubObject. Then it should normally works.

Greetz chill.

link publish delete flag offensive edit
0

answered 2014-01-29 20:33:11 +0800

IanFerreira gravatar image IanFerreira
1

Thanks for the reply, but unfortunately it did not solve anything. Ive only have mvc controlers and then pojo's and made every class now Serializable and gave them a serialVersionID.
However the error states the zk session is not serializable. Non-serializable attribute javax.zkoss.zk.ui.Session Frankly I am new to ZK (love it to bits) and just did not had time to drill into the src. I suspect it need to be serializable to move on the cloud's nodes, or something. Alt. do I have to implement my own sessions, I am not really using session at all, beside sticking some pojo's into the server session attributes between redirects. And the pojos are now serializable.

link publish delete flag offensive edit

Comments

Can you post the zul/controller where the fault lies?

chillworld ( 2014-01-29 20:38:03 +0800 )edit
Your answer
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
1 follower

RSS

Stats

Asked: 2014-01-29 13:27:39 +0800

Seen: 10 times

Last updated: Jan 29 '14

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