
December 5th, 2003, 03:49 AM
|
|
Junior Member
|
|
Join Date: Dec 2003
Posts: 2
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
Jaybird Jndi context problem
Sorry for my english...
I'm using jndi for connecting to a firebird db (under tomcat):
1) defining a application context (with tomcat manager) -->i'm thinking server.xml is OK
2) firebirdsql driver (last release 1.01) on catalina_home/common/lib
3) with "standard" class
....
Context cntx = new InitialContext();
...
DataSource = (DataSource)cntx.lookup("java:comp/env/jdbc/user");
....
Connection = ds.getConnection("sysdba", "masterkey");
Boom
Error occurred java.sql.SQLException: Cannot create JDBC driver of class 'org.fi
rebirdsql.jdbc.FBDriver' for connect URL 'C:\progetti\db\USERS.FDB'
4) with FBWrappingDataSource it's ok.... only if setting db name onto code (ds.setDB("path+ db name")
if i try
FBWrappingDataSource = (FBWrappingDataSource)cntx.lookup("java:comp/env/jdbc/user");
Kabooom Class cast exception
How can catch a db name(+ path) from context ?
Tank's
|