SQLException:没有适合jdbc的驱动程序:derby://localhost:1527。
I get this error in Netbeans:
我在Netbeans中得到这个错误:
java.sql.SQLException: No suitable driver found for jdbc:derby://localhost:1527/
How is this caused and how can I solve it?
这是如何造成的,我该如何解决?
16 个解决方案
#1
22
java.sql.SQLException: No suitable driver found for jdbc:derby://localhost:1527/
java.sql。SQLException:没有找到适合jdbc的驱动程序:derby://localhost:1527/。
This exception has two causes:
这个例外有两个原因:
- The driver is not loaded.
- 驱动程序没有加载。
- The JDBC URL is malformed.
- 这个JDBC URL是错误的。
In your case, I'd expect to see a database name at the end of the connection string. For example (use create=true
if you want the database to be created if it doesn't exist):
在您的示例中,我希望在连接字符串的末尾看到一个数据库名称。例如(如果希望数据库不存在,则使用create=true):
jdbc:derby://localhost:1527/dbname;create=true
Databases are created by default in the directory where the Network Server was started up. But you can also specify an absolute path to the database location:
数据库是在启动网络服务器的目录中默认创建的。但您也可以指定数据库位置的绝对路径:
jdbc:derby://localhost:1527//home/pascal/derbyDBs/dbname;create=true
And just in case, check that derbyclient.jar is on the class path and that you are loading the appropriate driver org.apache.derby.jdbc.ClientDriver
when working in server mode.
为了以防万一,检查一下derbyclient。jar在类路径上,并且在服务器模式下加载适当的驱动程序org.apache.derby.jdbc.ClientDriver。
更多相关文章
- PHP基础教程十四之使用MySqli操作数据库
- Java向MySQL数据库插入时间类型Date数据时需要注意的问题
- 第15天(就业班) 课程回顾、mysql安装、管理数据库、管理表、增删
- Mysql数据库学习笔记(一)
- vs2010下vc调用sqlite3数据库以及配置
- 一个mysql数据库的问题啊,我都摸索两天了,还没解决,今天再不搞定
- 在Linux环境下,将Solr部署到tomcat7中,导入Mysql数据库数据, 定时更
- Jmeter—8 连接microsoft sql server数据库取数据
- 基于Sqlcipher和GreenDao的数据库加密