Subject | jaybird jndi connection problem |
---|---|
Author | Simone |
Post date | 2003-12-12T12:25:17Z |
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
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