May 16 2007

CTRL + SHIFT + F, *uck Me.

We’ve been planning to use some type of data connection pooling for quite a while and decided to use the commons-dbcp from Apache.

In our applicationContext-jbdc.xml, we specify the url. I’m using Eclipse, so I formed a habit of doing a CTRL+SHIFFT+F to automatically format the XML for easy read before I deployed the project. BAD idea.

Rejected!

<property name=”url”>
<value>
jdbc:as400://[dbUrl]/[library]

</value>

</property>

Accepted

<property name=”url”>
<value>jdbc:as400://[dbUrl]/[library]</value>

</property>

Ok, fine it was rejected. What was the error thrown?

org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class ‘com.ibm.as400.access.AS400JDBCDriver’

It took us FOREVER++ to find out where the hell this problem came up. BAH!