After trying to upgrade from Tomcat 5.5.28 to 5.5.29 or above I ran into a strange problem. We use a linux based gis system using an Oracle EE DB (without spatial license).


After the upgrade we get for some actions the following java-error:

java.io.IOException: org.hibernatespatial.helper.FinderException: Couldn't get at the OracleSpatial Connection object from the PreparedStatement.

I was able to pin the cause down to the DBCP library. Up until Tomcat 5.5.28 this was 1.2.2 after that it was upgraded to 1.3 (which is technically the same as 1.4).

The DBCP library is the database abstraction layer between Tomcat and the ojdbc6.jar (as far as I understood).

If I do a downgrade to dbcp 1.2.2 after the Tomcat-Upgrade everything works again without problems.

Has anyone encountered this out there, too? The DBCP-developers can't help, since the java exception is not directly related to dbcp (which is strange, too).

1 Answer 1


Looking at the changelog for dbcp it seems that the issue you are experiencing might be related to the changes introduced by DBCP-11 in dbcp 1.3/1.4 (changelog is the same for both versions).

Since the PreparedStatement is now wrapped by a DBCP object (a DelegatingStatement to be exact) the ConnectionFinder code is unable to invoke its constructor.

At this point you have two options:

  1. try to upgrade hibernatespatial to the latest version (changelog from 1.1 says this issue should have been fixed in HIBSPA-68)

  2. report this analysis to the hibernatespatial mantainers and have them fix the issue

  • Great. I'll post that to the DBCP and Tomcat developers. You propably hit the mark.
    – Nils
    Aug 11, 2011 at 7:45
  • Thanks, but I think the issue should be reported to the hibernatespatial developers IF upgrading to the latest version of hibernatespatial does not work.
    – unicoletti
    Aug 11, 2011 at 8:31
  • I have to get this down to developement. Hybernate uses DBCP which is part of Tomcat, but itselv is not part of Tomcat. So this is neither a a DBCP nor a Tomcat problem. I`ll post the results here.
    – Nils
    Aug 11, 2011 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.