ZK - Open Source Ajax Java FrameworkZK - Open Source Ajax Java Framework

IllegalArgumentException: setAttribute

admin
5 May 2006 07:28:47 GMT
5 May 2006 07:28:47 GMT


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3715070

By: henrichen

Copy to here from Help forum

https://sourceforge.net/forum/message.php?msg_id=3714393

/henri
-------------------------

Hi everyone,

i have a maybe simple problem concerning the base installation of zk-framework.

Environment: linux debian sarge with sun-jdk-1.5.x
Tomcat: 5.5.16
ZK-Framework: 1.2.0-RC2

I did the installation just like the QuickRef Guide tolds. When starting the application everything seems fine.

But accessing the hello.zul page causes the following exception:

java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute
org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1244)
org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFa
cade.java:129)
com.potix.zk.ui.http.DHtmlLayoutServlet.getSession(DHtmlLayoutServlet.java:234)
com.potix.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:279)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

Can anyone give be a hint ?

greets Sebastian

admin
5 May 2006 07:52:26 GMT
5 May 2006 07:52:26 GMT


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3715099

By: henrichen

It seemed that Tomcat was complaining that some object which is not serialiable was put into this method StandardSession.setAttribute() as argument.

Check the Tomcat API doc,

http://tomcat.apache.org/tomcat-5.0-doc/catalina/docs/api/org/apache/catalina/se
ssion/StandardSession.html#setAttribute(java.lang.String,%20java.lang.Object)

It says "java.lang.IllegalArgumentException - if an attempt is made to add a non-serializable object in an environment marked distributable."

So I think the keyword is "in an environment marked distributable."

/henri


admin
5 May 2006 07:55:39 GMT
5 May 2006 07:55:39 GMT


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3715107

By: henrichen

I google "Tomcat+distributable", it seems that has something to do with clustering.
Did you set your Tomcat as a clustering environment?

/henri


admin
5 May 2006 08:01:41 GMT
5 May 2006 08:01:41 GMT


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3715116

By: henrichen

It seems has something to do with an element, <distributable/> in Tomcat's conf/web.xml. Can you check that in your Tomcat?

/henri

admin
5 May 2006 08:16:28 GMT
5 May 2006 08:16:28 GMT


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3715136

By: henrichen

Well, I misunderstood the meaning. The <distributable/> must be set at web application's web.xml, not Tomcat's conf/web.xml. Then that is strange, the zkdemo's web.xml got no such element at all.

Sebastian, can you ask this issue in Tomcat's forum?

/henri

admin
6 May 2006 01:57:13 GMT
6 May 2006 01:57:13 GMT


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3716432

By: michaelkmb

Henri,

I think you are correct initially. If i add following in server.xml for Tomcat, <Context docBase="zkdemo" path="/zkdemo">
<Manager
className="org.apache.catalina.session.StandardManager"
distributable="true" />
</Context>
IllegalArgumentException throw on access zkdemo.
Set the "distributable" attribute to false, no error occurs.

However, you may check whether the SessionImpl class should implement serializable or not.

Michael

admin
6 May 2006 02:13:22 GMT
6 May 2006 02:13:22 GMT


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3716441

By: michaelkmb

If you cannot modify server.xml, you can include the <Context> specification on context.xml and put it in directory zkdemo\META-INF. (check Tomcat documentaion for more details).

Michael

admin
6 May 2006 07:40:56 GMT
6 May 2006 07:40:56 GMT


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3716577

By: henrichen

Hi Michael,

Thanks.

/henri


admin
7 May 2006 12:46:39 GMT
7 May 2006 12:46:39 GMT


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3717586

By: henrichen

Sebastian,

Did your problem solved?

/henri

ksbhagwat
10 Dec 2010 21:49:52 GMT
10 Dec 2010 21:49:52 GMT

Thnx a lot..

My problem was solved in sec.

I removed tag <distributable/> from my web apps web.xml