Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Error using SQLServerDataSource and JNDI

0 views
Skip to first unread message

mb

unread,
Nov 14, 2001, 3:14:56 PM11/14/01
to
I get the following error message

java.lang.NoClassDefFoundError: com/merant/jdbcspy/SpyLogger
at com.microsoft.jdbcx.base.BaseDataSource.getConnection(Unknown
Source)
at Test.main(Test.java:64)
Exception in thread "main"


when I do a ds.getConnection

...
javax.naming.Context ctx = new javax.naming.InitialContext(env);

com.microsoft.jdbcx.sqlserver.SQLServerDataSource ds1 = new
com.microsoft.jdbcx.sqlserver.SQLServerDataSource();
ds1.setDescription("SQLServerDataSource1");
ds1.setServerName("server");
ds1.setPortNumber(1433);
ds1.setDatabaseName("dbname");
ds1.setSelectMethod("cursor");
ctx.bind("jdbc/db", ds1);

javax.sql.DataSource ds = (javax.sql.DataSource)ctx.lookup("jdbc/db");
java.sql.Connection con = ds.getConnection("user","pwd");

Any clue?

Thanks


0 new messages