I was running into some classpath issues with my application which led me to look into the code of the DefaultTraversableResolver class in Hibenate Validator 4.3.2. Specifically, I was looking into the "detectJPA()" method, which doesn't seem to be able to differentiate between JPA 2 and 1 due to a missing "return" statement.
Here's the code from lines 98 to 110:
Now, shouldn't this log.debug statement be followed by a return to abort the JPA detection process while concluding that a full-featured implementation of JPA2 is not available? But this is not the case, the detection proceeds assuming a 2.0 version. Here are the directly following lines:
Naturally, when the conclusion is reached that JPA 2.0 is available the JPATraversableResolver is used.
WebSphere 7 (without JPA 2 feature pack)
Solaris 10 10/09 s10s_u8wos_08a SPARC