Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4946681
By: sistoviejo
If you carefully read the old stack trace again (like I've done just now), you
will notice there aren't any MARF Classes in it.
Despite that I did what you asked and here's the output:
Exception in thread "main" java.lang.StackOverflowError
at java.io.ObjectStreamClass$FieldReflector.getPrimFieldValues(Unknown
Source)
at java.io.ObjectStreamClass.getPrimFieldValues(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source)
<BEGIN>
at java.util.ArrayList.writeObject(Unknown Source)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
</END>
Again the part surrounded by <BEGIN> and </END> tags repeats several times.
After that I decided to do some more debugging so I did the following things.
I modified the StorageManager class' restoreGzipBinary() method like this:
...
public synchronized void restoreGzipBinary()
throws StorageException
{
try
{
System.out.println("ANTES oFIS");
FileInputStream oFIS = new
FileInputStream(this.strFilename);
System.out.println("oFIS");
GZIPInputStream oGZIS = new GZIPInputStream(oFIS);
System.out.println("oGZIS");
ObjectInputStream oOIS = new ObjectInputStream(oGZIS);
System.out.println("oOIS");
this.oObjectToSerialize =
(Serializable)oOIS.readObject();
System.out.println("oObjectToSerialize");
...
I also modified the NeuralNetwork class' restore() method like this:
...
public void restore()
throws StorageException
{
switch(this.iCurrentDumpMode)
{
case DUMP_GZIP_BINARY:
System.out.println("restore DUMP_GZIP_BINARY");
restoreGzipBinary();
break;
case DUMP_BINARY:
System.out.println("restore DUMP_BINARY");
restoreBinary();
break;
default:
System.out.println("super.restore");
super.restore();
}
//restoreXML();
}
...
This is the output:
ANTES oFIS
restore DUMP_GZIP_BINARY
ANTES oFIS
Exception in thread "main" java.lang.StackOverflowError
at java.io.ObjectStreamClass$FieldReflector.getPrimFieldValues(Unknown
Source)
at java.io.ObjectStreamClass.getPrimFieldValues(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source)
at java.util.ArrayList.writeObject(Unknown Source)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
...
What puzzles me is that: System.out.println("ANTES oFIS"); is reached but
System.out.println("oFIS"); isn't. Also the instruction
System.out.println("ANTES
oFIS"); is reached twice.
Maybe because an exception was triggered in restoreGzipBinary() or because the
application runs multiple threads.
______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=213051
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
marf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/marf-devel