Fixed code error when jndi-jdbc is used; thanks to Solomon Bessire for the fix