Hi,
Each eclipse plugin is loaded by a separate classloader, isolating plugins
from each other, and since the DriverManager will load the class using the
context class loader, using the DriverManager will probably not work.
Class driverClass =
Platform.getBundle("org.apache.derby.core").findClass("org.apache.derby.jd
bc.EmbeddedDriver")
Driver driver = (Driver) driverClass.newInstance();
java.util.Properties info = new java.util.Properties();
info.put("user", "USER");
info.put("password", "PASSWORD");
return driver.connect("URI", info);
You can also try (not sure if it will work)
ClassLoader clr =
Platform.getBundle("org.apache.derby.core").findClass("org.apache.derby.jd
bc.EmbeddedDriver").getClassLoader();
Try
{
Thread.currentThread().setContextLoader(clr);
Class.forName("org.apache.derby.jdbc.EmbeddedDriver",true,clr);
return conn = DriverManager.getConnection(dbURL);
}
finally
{
//put previous classloader back
}
Erik Bengtson
+32 2 639-7260
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 15, 2006 2:44 AM
To: [email protected]
Subject: Re: Error Running Embedded
Hi Andrus,
The path is shown as c:\eclipse\plugins\org.apache.derby.core_10.1.2
I am only a couple of weeks (2) working with Eclipse. How can I fix this
to set the path correctly?
I used the Eclipse plugin to add the reference.
Thanks
Andrus Adamchik wrote:
> It is not Derby-related. It is a classpath issue. Double-check that
> "derby.jar" is indeed in the same directory you are running from
> (i.e. C:\Workspace).
>
> Andrus
>
>
>
>
R