Problems with org.apache.derby.jdbc.EmbeddedDriver [message #721023] |
Wed, 31 August 2011 13:54  |
Eclipse User |
|
|
|
I am trying to use the embeddeddriver for apache.derby. when I exec the code:
String DRIVER = "org.apache.derby.jdbc.EmbeddedDriver";
String URL = "jbdc:derby:C:\\Documents and Settings\\Bion Hall\\MyDB";
String QUERY = "SELECT FULLNAME FROM WEB1.LOGON WHERE USERID = ?";
try{
Class.forName(DRIVER).newInstance();
I get the following errors:
java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
I have changed the CLASSPATH values, I have moved derby.jar to the WEB-INF/LIB folder and everything else I can find on the web. But nothing works. Any help would be greatly appreaciated.
Bion Hall
|
|
|
Re: Problems with org.apache.derby.jdbc.EmbeddedDriver [message #721049 is a reply to message #721023] |
Wed, 31 August 2011 15:21  |
Eclipse User |
|
|
|
On 31-Aug-11 11:54, Bion Hall wrote:
> I am trying to use the embeddeddriver for apache.derby. when I exec the
> code: String DRIVER = "org.apache.derby.jdbc.EmbeddedDriver";
> String URL = "jbdc:derby:C:\\Documents and Settings\\Bion Hall\\MyDB";
> String QUERY = "SELECT FULLNAME FROM WEB1.LOGON WHERE USERID = ?";
>
> try{
> Class.forName(DRIVER).newInstance();
>
> I get the following errors: java.lang.ClassNotFoundException:
> org.apache.derby.jdbc.EmbeddedDriver
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
>
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
>
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:169)
>
> I have changed the CLASSPATH values, I have moved derby.jar to the
> WEB-INF/LIB folder and everything else I can find on the web. But
> nothing works. Any help would be greatly appreaciated.
>
> Bion Hall
Dropping the JAR into your project is only the first of three steps. You
allude to the second one, that of adding it to the CLASSPATH via the
Build Path dialog. The third step is, I'm guessing this is a Dynamic Web
Project, adding this to the Deployment Assembly (right-click the
project, choose Properties, then Deployment Assembly.
|
|
|
Powered by
FUDForum. Page generated in 0.03989 seconds