Apache Derby 数据库错误 ClassNotFoundException
我正在将 Eclipse 与 WindowsBuilder 一起使用。我创建了一个小型简单项目来打开现有的 Derby 数据库,但出现以下错误:- java.lang.ClassNotFoundException; org.apache.derby.jdbc.EmbeddedDriver 调用 ClassForName(driver),其中 driver 是“org.apache.derby.jdbc.EmbeddedDriver”。
经过谷歌搜索后,我确保我的 Windows 7 CLASSPATH 包含以下内容:- c:\program files\eclipse\plugins\db-derby-10.8.2.2-bin\lib\derby.jar;c:\program files\eclipse\plugins\db-derby-10.8.2.2-bin\lib\derbytools。罐;。
我仍然有同样的问题,我想知道如何检查上面的类路径条目是否实际指向驱动程序资源。
任何帮助表示赞赏。
I am using Eclipse with WindowsBuilder. I have created a small simple project to open an existing Derby db and I am getting the following error:-
java.lang.ClassNotFoundException; org.apache.derby.jdbc.EmbeddedDriver
with a call to ClassForName(driver) where driver is "org.apache.derby.jdbc.EmbeddedDriver".
After googling I made sure that my Windows 7 CLASSPATH includes the following:-
c:\program files\eclipse\plugins\db-derby-10.8.2.2-bin\lib\derby.jar;c:\program files\eclipse\plugins\db-derby-10.8.2.2-bin\lib\derbytools.jar;.
I still have the same problem and I am wondering how to check that the classpath entries above actually point to the driver resource.
Any help appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否已将 derby db .jar 文件添加到项目 Java 构建路径中?
Have You added the derby db .jar file to the projects Java Build Path?
我遇到了同样的问题,只是将
C:\Program Files\Java\jdk1.7.0_25\db\lib
添加到项目属性 ->运行/调试设置->类路径->用户条目->添加外部 JAR,它就可以工作了。无需:
I had same problem and just added
C:\Program Files\Java\jdk1.7.0_25\db\lib
to the Project properties -> Run/Debug settings -> Classpath -> User entries -> Add External JARs and it works.No need to: