cloudscape  
Author Message
Rob





PostPosted: 2004-2-4 13:53:00 Top

java-programmer, cloudscape 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").newInstance();
System.out.println("Loaded the Cloudscape JDBC
driver. Hello, World!");
Connection conn =

DriverManager.getConnection("jdbc:db2j:HelloWorldDB;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


 
dyksjare





PostPosted: 2004-2-5 2:28:00 Top

java-programmer >> cloudscape "Rob" <email***@***.com> wrote in message news:<email***@***.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").newInstance();
> System.out.println("Loaded the Cloudscape JDBC
> driver. Hello, World!");
> Connection conn =
>
> DriverManager.getConnection("jdbc:db2j:HelloWorldDB;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
 
Mac





PostPosted: 2004-7-20 19:18:00 Top

java-programmer >> cloudscape Hello

I am reading a book "SAMS: J2EE in 21 days" which is based on J2EE 1.3
and uses Cloudscape for its examples.

Now that J2EE 1.4 does not contain that DBMS I have problem running
examples and I need a lot of time to convert those examples into MySQL.
(There are also some different field types etc, Binary type field for
example).

I wanted to know if it is possible to extract the Cloudscape comming
with J2EE 1.3 and use it with 1.4? (As J2EE 1.3 is available for
download).

Anyone have done such thing?

Regards,
Mac
Programmernet.org

 
 
Lori M Olson [TeamB]





PostPosted: 2004-7-20 23:08:00 Top

java-programmer >> cloudscape Mac wrote:

> Hello
>
> I am reading a book "SAMS: J2EE in 21 days" which is based on J2EE 1.3
> and uses Cloudscape for its examples.
>
> Now that J2EE 1.4 does not contain that DBMS I have problem running
> examples and I need a lot of time to convert those examples into MySQL.
> (There are also some different field types etc, Binary type field for
> example).
>
> I wanted to know if it is possible to extract the Cloudscape comming
> with J2EE 1.3 and use it with 1.4? (As J2EE 1.3 is available for
> download).
>
> Anyone have done such thing?
>
> Regards,
> Mac
> Programmernet.org
>

I see no reason why not. I extracted a version of Cloudscape that I use
for testing purposes a long time ago. I still have it installed, and I
go back and use it occasionally.

--

Regards,

Lori Olson [TeamB]

------------

Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.

Google Advanced Newsgroup Search
http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
http://www.visi.com/~gyles19/fom-serve/cache/1.html