BlobDomain.equals() null pointer exception

From: Keith Crews <kcrews_02460_at_yahoo.com>
Date: 9 Aug 2002 07:59:32 -0700
Message-ID: <6c2e85a7.0208090659.651b1174_at_posting.google.com>



We have developed a java application that uses JBO classes. We are using Oracle 8i and jdeveloper 3.1.1.2. (Yes, I know there are newer versions, but we cannot upgrade at this time.)

The program occasionally gets into a state where every other time a user tries to save an object we get an exception with this stack trace:

java.lang.NullPointerException

	at oracle/jbo/domain/BlobDomain.equals
	at oracle/jbo/server/ViewObjectImpl.sourceChanged
	at oracle/jbo/server/EntityCache.deliverEntityEvent
	at oracle/jbo/server/EntityCache.notifyColumnChange
	at oracle/jbo/server/EntityImpl.notifyColumnChange
	at oracle/jbo/server/EntityImpl.setAttributeValue
	at oracle/jbo/server/AttributeDefImpl.set
	at oracle/jbo/server/EntityImpl.setAttributeInternal
	<our code from here...>

The next time you try to save, it works fine. But the next time it fails again. Etc. This never seems to happen with any datatype except blob. (We aren't using clobs, so who knows whether they have the same problem.)

If you exit the application and restart it and perform the same series of steps, it is 99% certain to succeed. However, once you get into this state, you never seem to get out of it until you exit the application.

I only was able to get into this state once when running under the debugger, and in that case, the arguments to setAttributeInternal looked correct (no nulls being passed in), the size of the blob was small (only a few hundred bytes), etc.

I think that this error is specific to the particular object being saved, rather than to all setting of blobs, but I'm not 100% sure of that.

It seems to me that BlobDomain.equals() should never be getting a null pointer exception and should probably be coded more defensively. On the other hand, since this usually works, it also seems that there is probably a bug somewhere else in the system that is causing the problem.

I haven't been able to find anything about this on the net. Has anyone seen this?

TIA Received on Fri Aug 09 2002 - 16:59:32 CEST

Original text of this message