Solved

JDBC Connection ERROR

Posted on 2001-07-10
3
362 Views
Last Modified: 2008-03-06
Hi friends...

  My Database is SQLBase.

  I have downloaded the JDBC Type 4 driver from centura site.
I run it and installed in c:\com\centurasoft\java\sqlbase
directory.

My class path is
Set classpath = .;c:\jdk1.2.2\lib\dt.rar;c:\com\centurasoft\java\sqlbase

In my program as follows..

Class.forName("centura.java.sqlbase.SqlbaseDriver");

but its showing an exception saying that..No suitable driver found.
when i change the class path, it shows another exception  that "wrong name(com\centurasoft\java\sqlbase\SqlbaseDriver)"

I'm not able to load the Sqlbase driver..
I'm using JDK1.2.2 nd win98,..database in NT
please help me

thanks
Jim
0
Comment
Question by:jimaricat072100
3 Comments
 

Expert Comment

by:anhphuongnn
ID: 6271983
Hi Jim,

You find driver file *.zip or *.jar
And then you add filename.zip in end of path.

Set classpath = .;c:\jdk1.2.2\lib\dt.rar;c:\com\centurasoft\java\sqlbase\filename.zip


Best Regards
Phuongnguyen
0
 
LVL 1

Expert Comment

by:ruifilipevale
ID: 6273276
Hello!
You can make a jar from the driver classes, only and only if you have them extracted to the dir c:\com\centura\........

In a dos shell:

cd c:\com
c:\jdk1.2.2\bin\jar cvf YourDriver.jar centura

Then copy the resulting YourDriver.jar to c:\jdk1.2.2\jre\lib\ext\

This sould solve your problems.

Run your program using the full path to java. (probably c:\jdk1.2.2\bin\java)

Hope it helps!


          RFV
0
 
LVL 1

Accepted Solution

by:
jimsims earned 100 total points
ID: 6273771
your classpath and the driver path given don't match:

Class.forName("centura.java.sqlbase.SqlbaseDriver");

Set classpath = .;c:\jdk1.2.2\lib\dt.jar;c:\com\centurasoft\java\sqlbase

likely you just need to change your classpath to:

Set classpath = .;c:\jdk1.2.2\lib\dt.jar;c:\

and set the driver to:

Class.forName("com.centurasoft.java.sqlbase.SqlbaseDriver")

e.g. - either both should say centurasoft or centura
and almost certainly both should start with com.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
groupSumClump challenge 9 102
JUnit 4 @Before and @BeforeClass differences 3 48
Arrays.asList  VS  ArrayList 4 45
table example 4 23
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now