teamderby <[EMAIL PROTECTED]> writes:
> CLASSPATH=\
> Applications/apache-tomcat-6.0.18/lib/derbyclient.jar:\
:
> String driver = "org.apache.derby.jdbc.EmbeddedDriver";
> String dbName="/db";
> String connectionURL = "jdbc:derby://localhost:8080/" + dbName;
You are attempting to use the the client driver, cf. the above URL
syntax, whereas your driver string contains the embedded driver's
name: "org.apache.derby.jdbc.EmbeddedDriver". Since this is not
present in your classpath (you need derby.jar for embedded Derby), you
see the error. The correct value for the client driver is
String driver = "org.apache.derby.jdbc.ClientDriver";
Hope this help.
Thanks,
Dag
> Connection conn = null;
> try{
> Class.forName(driver);
> } catch(java.lang.ClassNotFoundException e) {
> e.printStackTrace();
> out.println(e);
> }
> try {
> conn = DriverManager.getConnection(connectionURL);
> out.println("CONNETED<br>");
>
> //body of code to go here
>
> } catch (Throwable e) {
> out.println(e);
> e.printStackTrace();
> } finally {
>
> }
>
> %>
>
>
>
> This returns the error
>
> "java.sql.SQLException: No suitable driver"
>
>
> --
> View this message in context:
> http://www.nabble.com/Tomcat-Derby-JSP-Help-needed%21-please-tp20737019p20737019.html
> Sent from the Apache Derby Developers mailing list archive at Nabble.com.
>
>
--
Dag H. Wanvik, staff engineer
Sun Microsystems, Databases (JavaDB/Derby)
Haakon VII gt. 7b, N-7485 Trondheim, Norway
Tel: x43496/+47 73842196, Fax: +47 73842101