Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:: serialization: Add missing calls to defaultReadObject() and defaultWriteObject() #8254

Closed
scabug opened this issue Feb 8, 2014 · 3 comments

Comments

@scabug
Copy link

scabug commented Feb 8, 2014

List serialization fails: If a List is put into an Infinispan persistent cache, the following exception happens:

java.io.NotActiveException: Fields were never written

A detailed bug report is available here: https://community.jboss.org/message/845306?_sscc=t

A similar bug is reported here: https://issues.jboss.org/browse/JBMAR-133#issues/

As far as I can tell this is not a bug in Infinispan, but in writeObject() of "::":

As for the spec:

http://docs.oracle.com/javase/6/docs/platform/serialization/spec/output.html#861

"even if no optional data is written, defaultWriteObject or writeFields must still be invoked once."

and

  http://docs.oracle.com/javase/6/docs/platform/serialization/spec/input.html#2971 

"even if no optional data is read, defaultReadObject or readFields must still be invoked once. "

I have added the calls (see the attached patch), and now my application works.

ant test fails with:

 [mima]    scala$xml$dtd$ElementValidator$$find$2(java.lang.String,scala.Option)Boolean
 [mima]    in class scala.xml.dtd.ElementValidator's type has changed; was
 [mima]    (java.lang.String,scala.Option)Boolean, is now:
 [mima]    (java.lang.String,scala.collection.Seq)Boolean

Another minor issue: Compilation fails with ant 1.8.1, it works with ant 1.9.3 (the README says 1.7 is OK).

@scabug
Copy link
Author

scabug commented Feb 8, 2014

Imported From: https://issues.scala-lang.org/browse/SI-8254?orig=1
Reporter: Roland Haag (rhaag)
Affected Versions: 2.10.4-RC1
Attachments:

  • scala.patch (created on Feb 8, 2014 2:58:20 PM UTC, 1343 bytes)

@scabug
Copy link
Author

scabug commented Mar 31, 2015

@Ichoran said:
Thanks for the extensive analysis. Seems a pretty obvious change, even if basically nobody but Infinispan cares about that particular part of the spec.

https://github.com/Ichoran/scala/tree/issue/8254

@scabug
Copy link
Author

scabug commented Jun 17, 2015

@adriaanm said:
scala/scala#4420

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants