This article explains that an OBECT REFERENCE defined in working storage that is used by more than one thread, or passed between threads may cause this error.
Problem:
We are running an application with COBOL and JAVA and after a period of time the following runtime exception occurs:
[java] Exception 24 not trapped
[java] the class nilobject (object reference: 00000003)
Does not understand: close
Hit T to terminate program.
Hit any other key to continue.
This error happens as a threaded application. If it is run as a single thread, the error does not happen.
Resolution:
The most likely cause of the problem is an OBECT REFERENCE defined in working storage that is used by more than one thread, or passed between threads. If one thread finalizes the object and another thread then attempts to invoke a method on it, such as 'close' you will see the error that was encountered. In this case, there existed some buggy code that issued method calls on an object that had already been "finalized".