OCatton

Java IO OptionalDataException

Discussion created by OCatton on Mar 2, 2014
Hi All,

I have run into an issue with a Java Add-in in ArcMap 10.2, I have been working on.

The issue arises when I enable a extension Add-in which just fires off the New Document and Open Document events and causes ArcMap to crash when you open the Customize->ArcMap Options... dialog.

The same thing happens if I compile and run the demo Simple Add-In example.

The error which is outputted to the Java Console is;
java.io.OptionalDataException
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
        at com.esri.arcgis.addinframework.InternalExtension.readExternal(Unknown Source)
        at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1795)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1754)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1326)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
        at com.esri.arcgis.interop.extn.PersistHelper.load(Unknown Source)


I have tried MXD Doctor thinking something has gone awry with the MXD but as soon as I re-save the MXD with the extension enabled the error returns.

Any help most appreciated,

Owain.

Outcomes