Solved

JDBC Connection ERROR

Posted on 2001-07-10
3
369 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

695 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