[jboss-jira] [JBoss JIRA] (JASSIST-247) SerializedProxy won't work on JDK8

Jumper Chen (JIRA) issues at jboss.org
Fri May 29 06:11:02 EDT 2015


    [ https://issues.jboss.org/browse/JASSIST-247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072183#comment-13072183 ] 

Jumper Chen commented on JASSIST-247:
-------------------------------------

a workaround is to handle the serilization by ourself that we can override the writeObject() and readObject() into the class of FormStatusImpl, but it needs a public method of ProxyFactory#createClass(byte[] signature).

> SerializedProxy won't work on JDK8
> ----------------------------------
>
>                 Key: JASSIST-247
>                 URL: https://issues.jboss.org/browse/JASSIST-247
>             Project: Javassist
>          Issue Type: Bug
>    Affects Versions: 3.18.2-GA, 3.19.0-GA
>         Environment: JDK 8
>            Reporter: Jumper Chen
>            Assignee: Shigeru Chiba
>              Labels: javassist, serializable, serialization
>
> If we serialize the proxy object, it will cause java.lang.ClassCastException on JDK8, but it works on JDK7.
> The following is its error log.
> {code}
> Exception in thread "main" java.lang.ClassCastException: cannot assign instance of javassist.util.proxy.SerializedProxy to field issue.SerializationIssue$FormProxyHandler$FormStatusImpl.self of type issue.SerializationIssue$FormProxyObject in instance of issue.SerializationIssue$FormProxyHandler$FormStatusImpl
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the jboss-jira mailing list