Remember that XKCD strip about the most boring guy in the world and his blog
where he only apologizes for not writing more? :D Here it is ;)
Well, it's been a while. To be honest, civilian military service is not actually best environment for us developers, but what can you do, from June next year, I'm back on track.
Meanwhile, a blast from the past. I received a notification about a bug on Eclipselink you can find here. Of course, I encountered it last summer. Suddenly a weird error Null primary key encountered in unit of work clone, as the title of this post (I hope it helps with google).
So, this is one of those things that just frustrates you. You develop application, write queries by the book, OK, push the limits probably on few fronts, but it's all according to specification, should work, wright? Yeah, should. But bug like this just kills you. It occurs seemingly randomly, fires up nad causes some null pointer exceptions in upper layers of your application, so you dig in and find thing like this. I can tell you, I've been lucky here. In most cases I just run (actually Google does) into two or three guys who had the same problem (usually our Corean brotheren, hats off ! ), and no solution...
So, it had something to do with assigning sequence numbers. I went so far to dig into the source code of Eclipselink, but honestly, I couldn't get my way around it, even debugging (I'm not proud) didn't help. Guys who discussed the problem on the thread about the bug suggested that the problems are negative ID's which could not occur in our application. At the end, we've given up. And now the blessed news:
Chris Delahunt 2009-11-12 16:13:34 EST
Peter checked in a fix 02 November 2009
I'll check it with the guys at work to see if they still have the same problem
as before and if new patch will help.
This reminds me of a very interesting problem tha led to very
interesting solution,regarding sequencing, concurency and
multiplatform implementation of JPA.
Interested? Well, OK, you will have it in the next blog post which,
I hope will not be seven months from now . :)