-
1. Re: Got setAttribute: Non-serializable attribute error when
ssilvert Oct 7, 2009 8:49 PM (in response to sonya_ling1947)JSFUnit stores some non-serializable objects in the HttpSession. Right now there is no way around this. So, you will just need to disable HttpSession replication for your tests.
Regards,
Stan -
2. Re: Got setAttribute: Non-serializable attribute error when
sonya_ling1947 Oct 7, 2009 9:45 PM (in response to sonya_ling1947)Thanks. Yes. I do have distributable tag in my web.xml for clustering. That means I need to have two separate web.xmls and I need to write my own ant script instead of using jsfunitwar. Is there any plan to get around this problem in the future?
There is another minor issue in jsfunitwar. It loaded those jar files from classpath other than classpathref I specified in jsfunitwar taskdef. It ends up load and add ant jar from my ANT_HOME (ant 1.7.1) and Xercesimpl from somewhereelse in the classpath.
Sonya -
3. Re: Got setAttribute: Non-serializable attribute error when
ssilvert Oct 8, 2009 9:06 AM (in response to sonya_ling1947)We could make the JSFUnitWar task remove the distributable tag for you. However, this is not going to work long term because Servlet 3.0 allows you to have multiple web.xml files. For that, we will get away from editing web.xml altogether and just put a web-fragment.xml in jsfunit jar.
For your situation, you can disable the serialization check by including a META-INF/context.xml with the following:<context> <manager distributable="false"/> </context>
For the problem with loading the wrong jar, I think it's a bug, so I've opened a jira task:
https://jira.jboss.org/jira/browse/JSFUNIT-228
Stan -
4. Re: Got setAttribute: Non-serializable attribute error when
ssilvert Oct 8, 2009 9:08 AM (in response to sonya_ling1947)BTW, please let me know how that works out for you. I'd like to create a wiki page talking about using (or not using!) JSFUnit in a clustered environment.
Thanks,
Stan -
5. Re: Got setAttribute: Non-serializable attribute error when
sonya_ling1947 Oct 8, 2009 7:30 PM (in response to sonya_ling1947)Hi Stan:
It works. I can keep my web.xml and use context.xml to override it. However, I need to add script to unjar war so that I can add context.xml as well as cactus.report.xsl and rejar since jsfunitwar is not doing. Not a big deal. jsfunitwar execute much fast using exploded form anyway.
Thanks. -
6. Re: Got setAttribute: Non-serializable attribute error when
sonya_ling1947 Oct 8, 2009 8:26 PM (in response to sonya_ling1947)Sorry. I cleaned private data in my browser and retest it. It's NOT working even if there is META-INF/context.xml. I might have distributable uncommented in the first place. Don't count on my words only. Ask somebody else to verify it.