I'm working with web services, JDeveloper, and JRLoader from Jasper Reports. JRLoader uses ObjectInputStream.readObject() to read the report object. It will read in the same object once or twice, but subsequent reads will throw a ClassNotFound exception. Why could this happen?
It is the nature of ObjectInputStream that objects are only read once. If you can "rewind" the underlying InputStream, you would still need to create a new ObjectInputStram to get another copy of the object.
I have a compiled jasper report: dodimrcat1.jasper. I'm using the code below to load the object. The loadObject() method in JRLoader throws a ClassNotFoundException when I run through this code a second time to service a second request. It appears to be in the deserializing of one of the classes contained in the report such as JRBaseLine or JRBaseRectangle.
Author and all-around good cowpoke
Joined: Mar 22, 2000
That is a tough one! Perhaps JRLoader is not handling the file correctly at some point - have you tried to contact the author? Is there some reason you have to use JRLoader instead of creating a regular ObjectInputStream directly? Where have you placed the Jasper specific library files? Bill
Joined: Oct 16, 2001
Found the problem when I updated my version of JDeveloper from 9.0.4 to 184.108.40.206. From that point on, everything worked as expected.