0

IllegalArgumentException: setAttribute

asked 2006-05-05 07:28:47 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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

delete flag offensive retag edit

9 Replies

Sort by ยป oldest newest

answered 2006-05-05 07:52:26 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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


link publish delete flag offensive edit

answered 2006-05-05 07:55:39 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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


link publish delete flag offensive edit

answered 2006-05-05 08:01:41 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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

link publish delete flag offensive edit

answered 2006-05-05 08:16:28 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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

link publish delete flag offensive edit

answered 2006-05-06 01:57:13 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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

link publish delete flag offensive edit

answered 2006-05-06 02:13:22 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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

link publish delete flag offensive edit

answered 2006-05-06 07:40:56 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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

By: henrichen

Hi Michael,

Thanks.

/henri


link publish delete flag offensive edit

answered 2006-05-07 12:46:39 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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

By: henrichen

Sebastian,

Did your problem solved?

/henri

link publish delete flag offensive edit

answered 2010-12-10 21:49:52 +0800

ksbhagwat gravatar image ksbhagwat
3

Thnx a lot..

My problem was solved in sec.

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

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: 2006-05-05 07:28:47 +0800

Seen: 1,897 times

Last updated: Dec 10 '10

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