we added the OracleValidConnectionChecker to our datasource configuration, and are now seeing exceptions like the following in our logs:
java.lang.IllegalArgumentException: object is not an instance of declaring class
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
obviously, this is a classloader issue that manifestst itself in the fact that the oracle driver class which is loaded through the loadClass invocation in the constructor of OracleValidConnectionChecker (and from which the Method object is created) is not the same as the one from which the actual connection is instantiated at runtime. We modified the source to add logging statements, and saw that the class names are in fact identical.
We modified the source again, so that the loadClass statement reads:
Now the problem is fixed for us, but we would like to verify if there is a better solution, as this problem should be affecting more people than just us..
This problem is affecting me as well.