Subject Configuring Tomcat JNDI and Firebird
Author grndeveloper
We are on Tomcat version 5.5.9 and we are using Jaybird 2.1.0 with IBATIS.
We have IBATIS working in a simple DATASOURCE configuration, and now
we are trying to configure our application to use JNDI and connection
pooling.


We have made this modifications in the following files:

>>>>server.xml >>>>>>>>
...
<GlobalNamingResources>
...
<Resource name="sg2_bbdd" auth="Container"
type="javax.sql.DataSource"/>
<ResourceParams name="sg2_bbdd">
<parameter>
<name>validationQuery</name>
<value>select x_idio.idio_codi from x_idio</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>5000</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>10</value>
</parameter>
<parameter>
<name>username</name>
<value>sysdba</value>
</parameter>
<parameter>
<name>password</name>
<value>masterkey</value>
</parameter>
<parameter>
<parameter>
<name>url</name>

<value>jdbc:firebirdsql:192.168.2.2/3050:home/sg2/sg2JAVA.fdb</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>org.firebirdsql.jdbc.FBDriver</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>5</value>
</parameter>
</ResourceParams>
</GlobalNamingResources>
...
<Host
appBase="webapps"
name="localhost">
<DefaultContext>
<ResourceLink
global="sg2_bbdd"
name="jdbc/link_to_sg2_bbdd"
type="javax.sql.DataSource"/>
</DefaultContext>
</Host>


>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

>>>web.xml >>>>>>>>
.....
<resource-ref>
<res-ref-name>jdbc/link_to_sg2_bbdd</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
.....
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

>>>>sql-map-config.xml (Ibatis configuration
file)>>>>>>>>>>>>>>>>>>>>>>>>

....
<transactionManager type="JDBC">
<dataSource type="JNDI">
<property value="java:comp/env/jdbc/link_to_sg2_bbdd"
name="DataSource"/>
</dataSource>
</transactionManager>
....
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

We also have put the jaybird-full-2.1.0.jar into the
[CATALINA_HOME]/common/lib directory. In our application there is no
reference to jaybird-full-2.1.0.jar

With all this changes all we get from Tomcat logs is the following
error message:
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC
driver of class '' for connect URL 'null'
...
Caused by: java.sql.SQLException: No suitable driver"
...

I think the problem we have has nothing to do with IBATIS, it is just
we are doing something wrong with the driver or the tomcat configuration.
Does anyone could give us some help?

Thanks in advance.