Google Answers Logo
View Question
 
Q: Java Server Pages (JSP) ( No Answer,   3 Comments )
Question  
Subject: Java Server Pages (JSP)
Category: Computers > Programming
Asked by: dan7788-ga
List Price: $12.00
Posted: 22 Aug 2005 18:14 PDT
Expires: 11 Sep 2005 07:01 PDT
Question ID: 558998
Hi,
I am trying to connect to a Cloudscape 10.1 database, right now I
can't connect to the Cloudscape database in the Tomcat JSP. Every time
I get this error message:

An Exception was caught while connecting to the database.

 java.sql.SQLException: No suitable driver
	at java.sql.DriverManager.getConnection(DriverManager.java:532)
	at java.sql.DriverManager.getConnection(DriverManager.java:193)...

Can you please help me solve this problem? Can you make the solution
as detailed as possible?
Thanks,
Dan
Answer  
There is no answer at this time.

Comments  
Subject: Re: Java Server Pages (JSP)
From: harinath-ga on 23 Aug 2005 07:10 PDT
 
Yes, Its a problem with the Driver.

for any database, to be accessed through JDBC we need to have
corresponding driver.
read the following documentation. it may help you.

http://www-128.ibm.com/developerworks/db2/library/techarticle/dm-0408anderson/#cs_rdbms
Subject: Re: Java Server Pages (JSP)
From: apadmana-ga on 24 Aug 2005 18:48 PDT
 
Hi Dan,

You need the appropriate JDBC driver for Cloudscape. Typically, it is
a jar file that usually ships with the database or is available for
download from the database. *Please read the licensing instructions
carefully*.

Once you download the jar file, copy it to the WEB-INF/lib folder
available at the root of the context. Copying this jar will help make
it available in Tomcat application's classpath and helps to resolve
the driver problem you are having.

Hope this helps
Subject: Re: Java Server Pages (JSP)
From: altarasyuk-ga on 26 Aug 2005 07:53 PDT
 
And of cource you must "load" class of driver (once, on server startup):
Class.forName("<driver class name>");

For example to load MySQL driver you must write this:
Class.forName("com.mysql.jdbc.Driver");

And after that you can get connection using
DriverManager.getConnection(connString, user, password);

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy