[ 
https://issues.apache.org/jira/browse/WICKET-1445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12583149#action_12583149
 ] 

Daniel Wu commented on WICKET-1445:
-----------------------------------

After making all changes above and applying the patch (I'm using wicket 1.3.2), 
I'm still getting this NPE:

ERROR Objects () - Error serializing object class MyPage [object=[Page class = 
MyPage id = 0, version = 0]]
java.lang.NullPointerException
        at java.io.ObjectOutputStream.flush(Unknown Source)
        at java.io.ObjectOutputStream.close(Unknown Source)
        at 
org.apache.wicket.util.lang.Objects.objectToByteArray(Objects.java:1093)
        at 
org.apache.wicket.protocol.http.pagestore.AbstractPageStore.serializePage(AbstractPageStore.java:197)
        at 
org.apache.wicket.protocol.http.pagestore.DiskPageStore.storePage(DiskPageStore.java:810)
        at 
org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.put(SecondLevelCacheSessionStore.java:332)

Does anyone have any idea what is causing this problem? It wasn't happening on 
wicket 1.2.

> StreamCorruptedException/PageStore/Serialization broken because 
> ObjectOutputStream was not flushed
> --------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-1445
>                 URL: https://issues.apache.org/jira/browse/WICKET-1445
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.1, 1.3.2
>            Reporter: Niclas Hedhman
>            Assignee: Igor Vaynberg
>             Fix For: 1.3.3
>
>         Attachments: wicket-close-stream.patch
>
>
> The Objects.objectToByteArray() method incorrectly forgets to flush/close the 
> ObjectOutputStream it uses. This can create corrupt object streams.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to