Hi Jess,
In my case the client and the server are one and the same. Using API, I am attempting to read one EPMDocument number at a time from a .txt file and deleting that EPMDocument (and all objects in its ReferencedBy and UsedByReference list). For most EPMDocuments, the deletion is working fine. For about 1 in 500 EPMDocuments, we are facing IllegalStateException
Exception in thread "main" java.lang.IllegalStateException: unread block data
at java.io.ObjectInputStream$BlockDataInputStream.setBlockDataMode(ObjectInputStream.java:2421)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1382)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at wt.method.MethodResult.readExternal(MethodResult.java:153)
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1837)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1796)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:325)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:174)
at wt.method.MethodServerImpl_Stub.invoke(Unknown Source)
at wt.method.RemoteMethodServer.invoke(RemoteMethodServer.java:646)
at wt.services.ServiceFactory$ClientInvocationHandler.invoke(ServiceFactory.java:349)
at com.sun.proxy.$Proxy11.navigateReferencedBy(Unknown Source)
at ext.audco.utility.EPMDocumentMassDeleteUtil.getEPMDocReferences(EPMDocumentMassDeleteUtil.java:197)
at ext.audco.utility.EPMDocumentMassDeleteUtil.processInputFile(EPMDocumentMassDeleteUtil.java:119)
at ext.audco.utility.EPMDocumentMassDeleteUtil.main(EPMDocumentMassDeleteUtil.java:348)
and that is interrupting the execution. I was wondering if we could catch this exception so that the program continues to run. We have attempted using try..catch, throws, https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS72059, using UTF-8 explicitly instead of ANSI and using FileReader instead of InputStreamReader
Thanks so much,
Sampurna