On Thu, May 22, 2008 at 2:09 AM, Niall Pemberton
<[EMAIL PROTECTED]> wrote:
> On Thu, May 22, 2008 at 1:52 AM, sebb <[EMAIL PROTECTED]> wrote:
>> Not sure if this should be regarded as a problem or not, but I get a
>> test failure when using IBM Java:
>>
>> java version "1.6.0"
>> Java(TM) SE Runtime Environment (build pwi3260-20071123_01)
>> IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 Windows XP x86-32
>> jvmwi3260-20071121_15015 (JIT enabled)
>> J9VM - 20071121_015015_lHdSMR
>> JIT  - r9_20071121_1330
>> GC   - 20071031_AA)
>> JCL  - 20071118_01
>>
>>
>>    [junit]     Caused an ERROR
>>    [junit] org.apache.commons.chain.impl.ContextBase$MapEntryImpl
>> incompatible with java.util.HashMap$Entry
>>    [junit] java.lang.ClassCastException:
>> org.apache.commons.chain.impl.ContextBase$MapEntryImpl incompatible
>> with java.util.HashMap
>> $Entry
>>    [junit]     at java.util.HashMap.writeObject(Unknown Source)
>>    [junit]     at
>> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:957)
>>    [junit]     at
>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1473)
>>    [junit]     at
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1404)
>>    [junit]     at
>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1162)
>>    [junit]     at
>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:338)
>>    [junit]     at
>> org.apache.commons.chain.impl.ContextBaseTestCase.testSeriaization(ContextBaseTestCase.java:368)
>>    [junit]
>> Target 'internal-test' failed with message 'Test
>> org.apache.commons.chain.impl.ContextBaseTestCase failed'.
>>
>> I've no idea why this error occurs, as the code in question says:
>>     "private class MapEntryImpl implements Map.Entry"
>
> :(
>
>> There are some errors that Findbugs finds:
>>
>> org.apache.commons.chain.impl.ContextBase is Serializable; consider
>> declaring a serialVersionUID
>>
>> Quite a few of these too:
>> Non-serializable value stored into instance field of a serializable class:
>> e.g.
>> org.apache.commons.chain.web.portlet.PortletApplicationScopeMap stored
>> into non-transient field PortletWebContext.applicationScope
>> org.apache.commons.chain.web.portlet.PortletParamMap stored into
>> non-transient field PortletWebContext.param
>>
>> Looks like the serialization tests are not picking these up.
>>
>> If no-one has reported any related problems then perhaps these
>> particular classes are never serialized.
>
> It has been raised:
> http://issues.apache.org/jira/browse/CHAIN-12
>
> "they subclass ContextBase and inherit the "implements Serializable"
> contract, but they cannot in fact be serialized because they wrap
> container objects (request, response,context) that are not
> serializable"
>
> ...and we don't have a solution for it - so no fix.

btw Struts 1.3.x uses these, but they only exist for the lifespan of a
request - which I assume is why we don't see loads of complaints about
this.

Niall

> Niall
>
>> These will probably be tricky to fix, so I guess they could be left
>> for another release.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to