Wednesday, March 02, 2005

The wonder of the obscure bug

I've just spent a highly entertaining(?) couple of hours trying to debug some Hibernate access code. The basic problem is that I have a primary key on a database with two elements, one called ATTRIBUTE_ID the other called ATTRIBUTE_VALUE, and I was getting exceptions about not being able to set the values or perform the mapping. I change the latter to ATTR_VALUE and everything works.... I've done a quick grep over the source to see if I can see what is doing this... but I can't find it.

But this has brought to mind finding other obscure bugs over the years, mainly I have to say with Java, elements like running JMS, MQSeries and AIX and finding out that it just doesn't work, and the reason was that AIX had a strange shared memory model and IBM had decided to use the same number for the JVM and MQSeries... muppets. And as for experiences using wonderful elements like early releases of various app servers, MQSI in a heterogenous environment (with MQ Pub/Sub).

I'll let the folks at Hibernate off though as its an all around cracking product and it was a minor fix. But it just goes to show...

Some times it isn't actually your fault when the code goes wrong... oh and that most vendors don't appear to have a unit test framework.

No comments: