I'm having trouble setting up a data source in Tomcat 5.5.7.  I'm not
certain if I'm having a configuration problem, or if the drivers I'm
trying to use are not compatible with Tomcat.  Starting with the latter
question, I'm attempting to use the jdbc oracle drivers that ship with
Sun's Java Studio Creator.  By name, they are:

smbase.jar
smutil.jar
smoracle.jar

I know this is rather vague, but I'm hoping someone may know if Tomcat
supports these.

Secondly, I followed the JNDI Data source HOW-TO for Tomcat 5.5 on the
website.  I recreated the following entry in my server.xml

<Resource name="jdbc/MMDash" auth="Container"
        type="javax.sql.DataSource"
driverClassName="com.sun.sql.jdbc.oracle.OracleDriver"
        url="jdbc:sun:oracle://ordev01:1521;SID=tdev02"
        username="mmdash" password="password" maxActive="20"
maxIdle="10"
        maxWait="-1"/>

I'm a little confused about where the tutorial was directing me to place
this entry and I stuck it between the <GlobalNamingResources> tags.
I've read in other places that it's better to create a separate xml
context file to set up data sources (since only one app will be using
it).  If this is the case, how is such a file constructed?

Finally, I set up the web.xml in my app exactly as described and copied
the previously mentioned driver jar files to common/lib/ as required.

When I run the app, my data tables are empty and the server log records
the awful error:

Cannot create JDBC driver of class '' for connect URL 'null'
java.sql.SQLException: No suitable driver
        at java.sql.DriverManager.getDriver(Unknown Source)
        at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSo
urce.java:773)
        at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSourc
e.java:540)
        at
com.sun.sql.rowset.internal.CachedRowSetXReader.connect(CachedRowSetXRea
der.java:300)
...

I can provide further stack trace entries if they are of any value.

Can you help point me in the right direction?

Thanks!

James


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to