Stack Overflow when serializing LinkedList (Doc ID 1145429.1)

Last updated on NOVEMBER 05, 2016

Applies to:

Oracle JRockit - Version: 7.0 to R28 - Release: JRockit to JRockit
Information in this document applies to any platform.

Symptoms

A Stack Overflow error occurs with the following stack trace:


java.lang.StackOverflowError: null
at java.io.FileOutputStream.writeBytes(FileOutputStream.java) ~[na:1.6.0_14]
at java.io.FileOutputStream.write(FileOutputStream.java:260) ~[na:1.6.0_14]
at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1838) ~[na:1.6.0_14]
at java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1747) ~[na:1.6.0_14]
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1460) ~[na:1.6.0_14]
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) ~[na:1.6.0_14]
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) ~[na:1.6.0_14]
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) ~[na:1.6.0_14]
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) ~[na:1.6.0_14]
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) ~[na:1.6.0_14]
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) ~[na:1.6.0_14]
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326) ~[na:1.6.0_14]
at java.util.LinkedList.writeObject(LinkedList.java:943) ~[na:1.6.0_14]
at sun.reflect.GeneratedMethodAccessor680.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_14]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_14]
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945) ~[na:1.6.0_14]
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461) ~[na:1.6.0_14]
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) ~[na:1.6.0_14]
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) ~[na:1.6.0_14]
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) ~[na:1.6.0_14]
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) ~[na:1.6.0_14]
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) ~[na:1.6.0_14]
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) ~[na:1.6.0_14]
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326) ~[na:1.6.0_14]


... THIS STACK TRACE REPEATS SEVERAL TIMES UNTIL IT THROWS THE ERROR


Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms