Hi Mike, these problems can be easily reproduced in the Eclipse debugger without adding any diagnostics to the OpenJPA code, which is how I initially uncovered the problem. When you set a breakpoint and interrogate an instance of one of these classes, Eclipse will invoke the toString() method for that class on your behalf, which will in turn invoke the hashcode() method which may cause a NPE based on the state of the object when it is interrogated. At least for me I find this behavior to be extremely distracting especially when I'm trying to find and fix other problems.
I'm only adding diagnostic info code for the sake of efficiency to quickly uncover all these problems since it emulates what will happen in Eclipse (i.e., toString() invoking hashcode()), and is much faster for me. If you'd prefer actual testcases I can provide them as well, but it will take me much longer to reproduce and fix them. Thanks