By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,117 Members | 1,093 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,117 IT Pros & Developers. It's quick & easy.

cloudscape

P: n/a
Rob
I'm a newbie in cloudscape (Java too) and I'm having a problem. I've
followed the tutorial that comes with cloudscape to the letter. Everything
worked as advertised up untill this program:

/*
* Licensed Materials - Property of IBM
*
* (C) Copyright IBM Corp. 2000, 2001
* All Rights Reserved.
*/
import java.sql.*;

public class CreateWorldDB {

public static void main (String[] args) {

try {

Class.forName("com.ibm.db2j.jdbc.DB2jDriver").newI nstance();
System.out.println("Loaded the Cloudscape JDBC
driver. Hello, World!");
Connection conn =

DriverManager.getConnection("jdbc:db2j:HelloWorldD B;create=true")

;
System.out.println("Created and connected to

database HelloWorldDB");

} catch (Throwable e) {
System.out.println("exception thrown");
e.printStackTrace();
}

}
}

I run it with "java -Dbd2j.system.home=C:\tutorial_system CreateWorldDB"

And results in:
Loaded the Cloudscape JDBC driver. Hello, World!
exception thrown
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at CreateWorldDB.main(CreateWorldDB.java:18)

What's going on? It can connect with that driver but it can't create/access?
I'm highly confused...

I'm running J2SE/HotSpot VM 1.4.2_03 and cloudscape5.1

Thanks,
Rob
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Rob" <ta******@yahoo.com> wrote in message news:<LI********************@comcast.com>...
I'm a newbie in cloudscape (Java too) and I'm having a problem. I've
followed the tutorial that comes with cloudscape to the letter. Everything
worked as advertised up untill this program:

/*
* Licensed Materials - Property of IBM
*
* (C) Copyright IBM Corp. 2000, 2001
* All Rights Reserved.
*/
import java.sql.*;

public class CreateWorldDB {

public static void main (String[] args) {

try {

Class.forName("com.ibm.db2j.jdbc.DB2jDriver").newI nstance();
System.out.println("Loaded the Cloudscape JDBC
driver. Hello, World!");
Connection conn =

DriverManager.getConnection("jdbc:db2j:HelloWorldD B;create=true")

;
System.out.println("Created and connected to

database HelloWorldDB");

} catch (Throwable e) {
System.out.println("exception thrown");
e.printStackTrace();
}

}
}

I run it with "java -Dbd2j.system.home=C:\tutorial_system CreateWorldDB"

And results in:
Loaded the Cloudscape JDBC driver. Hello, World!
exception thrown
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at CreateWorldDB.main(CreateWorldDB.java:18)

What's going on? It can connect with that driver but it can't create/access?
I'm highly confused...

I'm running J2SE/HotSpot VM 1.4.2_03 and cloudscape5.1

Thanks,
Rob

You define "bd2j.system.home" when running the code, but the package
name is "db2j.system.home" If what you're defining is important, the
program is not going to be able to find it. Use:

java -Ddb2j.system.home=C:\tutorial_system CreateWorldDB

You might have other problems, but start with that.

---
Jared Dykstra
http://www.bork.org/~jared
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.