Bryan Pendleton wrote:
A. Rick Anderson wrote:
I'm getting a "driver not found" exception when running a relatively trivial derby program from within eclipse. It's frustrating because I can crack the derby.jar file and the targeted driver class is in the derby.jar file that is in the build path for the project.
...
private static final String derbyClientDriver =
    "org.apache.derby.jdbc.ClientDriver";
...
The client driver is usually in derbyclient.jar, not in derby.jar.
It's the *embedded* driver that is in derby.jar.
Could that be the problem?

I hit the send button a little too quickly. You are correct. The client driver is in the derbyclient.jar file, not the derby.jar file. Unfortunately, at least from a debugging perspective, they are both in the build path of my project.

I've gone back and literally stripped the entire lab to the absolute minimum below, but I am getting the exact same behavior. It throws an exception when I attempt to get the ClientDriver connection.

This seems to be related to the Eclipse plug-in, because I was able to do all of the "Getting Started" labs from the command line without any issues.

Has anyone else been able to complete the lab associated with the Eclipse Plug-in for 10.2.2?

package org.apache.derby.plugin.lab;
import java.sql.Connection;
import java.sql.DriverManager;

public class Jays2 {
   private static final String derbyClientDriver =
      "org.apache.derby.jdbc.ClientDriver";
   private static final String derbyClientURL =
      "jdbc:derby://localhost:1527/jayDB:user=APP;password=APP;";

   public static void main(String[] args) throws Exception {
         Class.forName(derbyClientDriver);
/*dies*/ Connection conn = DriverManager.getConnection(derbyClientURL);
         conn.close();
   } // method main

} // class Jays2


--
A. Rick Anderson

Reply via email to