ObjectDB ObjectDB

Issue #570: Server NPE

Type: Bug ReoprtVersion: 2.3.3Priority: NormalStatus: ClosedReplies: 3
#1

I'm getting the following NPE when attempting to persist an object to a server based database:

[2011-11-13 09:11:47 #11 server]
java.lang.NullPointerException
at com.objectdb.o.UTT.z(UTT.java:311)
at com.objectdb.o.UTT.l(UTT.java:218)
at com.objectdb.o.TSK.i(TSK.java:146)
at com.objectdb.o.TSK.f(TSK.java:95)
at com.objectdb.o.TSM.e(TSM.java:87)
at com.objectdb.o.MST.Va(MST.java:1264)
at com.objectdb.o.WRA.Va(WRA.java:369)
at com.objectdb.o.WSM.Va(WSM.java:174)
at com.objectdb.o.WRA.Va(WRA.java:369)
at com.objectdb.o.WSN.Va(WSN.java:653)
at com.objectdb.o.STC.v(STC.java:490)
at com.objectdb.o.SHN.an(SHN.java:563)
at com.objectdb.o.SHN.K(SHN.java:170)
at com.objectdb.o.HND.run(HND.java:133)
at java.lang.Thread.run(Thread.java:595)

Please let me know if you need any further info

edit
delete
#2

The stack trace indicates a problem in updating an index, maybe in a new type (or a new index).

If possible, a test case that reproducea this exception will be very helpful.

ObjectDB Support
edit
delete
#3

Spot on - further investigation shows this is actually an application problem rather than objectdb problem, although perhaps the exception could be improved.

There are 3 processes working with a server-based database - 2 writing to the db, one reading. I had added an index to a property of the Entity object saved in the database but had mis-deployed this change to one of the services. When the first service starts it registers types with object db - this would either be the object with index or the object without depending on startup order.

I think in this case the object with index was registered first. Then when the other service tried to persist an object without the index the exception occurs. I assume the reverse scenario would cause a similar problem.

Fixing the deployment issue solves the problem. Thanks for your pointer which helped find it.

edit
delete
#4

Thank you for the update. The exception will be improved.

ObjectDB Support
edit
delete

Reply

To post on this website please sign in.