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.
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.
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:
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.
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.
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.