Hi All,
I need to export all WTparts from Windchill DB, so i used below code, it previously works but it suddenly gives an such errors,, i also observerd that it related to only WTPart.. any query on WTPart is not Working.. each query gives same error: java.lang.IllegalStateException: unread block data
my Query is here..
QuerySpec qs = new QuerySpec(WTPart.class);
QueryResult qr = PersistenceHelper.manager.find(qs);
while (qr.hasMoreElements()) {
prt = (WTPart)qr.nextElement();
cName = prt.getContainerName();
partNum = prt.getNumber();
system.out.println("*******" +partNum);
}
Exception in thread "main" java.lang.IllegalStateException: unread block data
at java.io.ObjectInputStream$BlockDataInputStream.setBlockDataMode(ObjectInputStream.java:2419)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1380)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at wt.method.MethodResult.readExternal(MethodResult.java:152)
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1835)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1794)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:324)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:173)
at wt.method.MethodServerImpl_Stub.invoke(Unknown Source)
at wt.method.RemoteMethodServer.invoke(RemoteMethodServer.java:647)
at wt.services.ServiceFactory$ClientInvocationHandler.invoke(ServiceFactory.java:349)
at com.sun.proxy.$Proxy0.find(Unknown Source)
at ext.util.WindVUtil.getLatestParts(WindVUtil.java:690)
at ext.util.ExportParts.exportParts(ExportParts.java:125)
at ext.util.ExportParts.main(ExportParts.java:101)