This page contains information specific to Oracles (generally broken) JDBC driver(s). This is information is a supplement to the general RDBMS data connector documentation. Start there before moving on to here.
Switching to a Container Managed connection seems to solve the problem.
Configure an Oracle DB Data Connector
To configure a Container Managed connection with Tomcat 6, operate as follow:
- copy the Oracle JDBC Thin driver
- if you use a Context Deployment Fragment such as
$TOMCAT_HOME/conf/Catalina/localhost/idp.xml, add a Resource section to it: Oracle JNDI Datasource configuration is covered by the Tomcat documentation
- in the connector use (note that the resource named
jdbc/ORAIDPin the Deployment Fragment becomes
java:comp/env/jdbc/ORAIDPin the connector definition):
- restart Tomcat
Oracle converts all column names to uppercase names, independent of how the SQL statement looks like. Therefore, it is necessary to use column mappings in any case and even if you think the SQL looks ok. Also see ResolverRDBMSDataConnector
More information on the Apache Commons DBCP wiki.