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

db2 jdbc driver -- no suitable driver for db2profc

0 views
Skip to first unread message

Kumar

unread,
Apr 29, 2003, 6:51:28 PM4/29/03
to
Hi All

I am trying to use sqlj.
I wrote my sqlj program. Compiled my program to get .java and .ser files.
Now when i try to use db2profc i get this error


>h:\sqllib\bin\db2profc -user=kumar -password=password -url=
jdbc:db2://ws3311:6789/cwsdb Test_SJProfile0.ser
Exception in thread "main" java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:532)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at COM.ibm.db2.sqlj.DB2SQLJInstaller.main(DB2SQLJInstaller.java:941)

I have db2java.zip in classpath.
I am able to run my jdbc programs without any problem.

code from my sqlj program
Class.forName("COM.ibm.db2.jdbc.net.DB2Driver").newInstance();

try {
ctx = DefaultContext.getDefaultContext();
if (ctx == null){
String url = "jdbc:db2://ws3311:6789/cwsdb";
con = DriverManager.getConnection(url,"mkumar","unique12");
ctx = new DefaultContext(con);
DefaultContext.setDefaultContext(ctx);
}
}
catch(Exception e){
e.printStackTrace();
}

Kumar

unread,
May 4, 2003, 2:15:30 AM5/4/03
to
I got a reply from Steve, with a link
but the link is not working.

Steve can you please give the link again.

If it is not a problem, can u please paste the content.

Thanks
kumar

0 new messages