简体   繁体   English

org.apache.derby.jdbc.ClientDriver 在哪里?

[英]where is org.apache.derby.jdbc.ClientDriver?

I downloaded the jar of Core Apache Derby database engine, which also includes the embedded JDBC driver (10.9.1.0) .我下载了Core Apache Derby 数据库引擎的 jar,其中还包括嵌入式 JDBC 驱动程序 (10.9.1.0) But that jar doesn't include the .class file of ClientDriver in the jdbc package.但是那个 jar 不包含ClientDriver.class文件在 jdbc 包中。 Why is that?这是为什么? Where can i find this class file?我在哪里可以找到这个类文件? I need this file to connect to derby database from tomcat as the server.我需要这个文件作为服务器从 tomcat 连接到 derby 数据库。

Please provide the download link of the complete jar so that i get the required .class file.请提供完整 jar 的下载链接,以便我获得所需的.class文件。

OK: have you looked on the Apache Derby page:好的:你看过 Apache Derby 页面了吗:

Download db-derby-10.9.1.0-bin.zip下载 db-derby-10.9.1.0-bin.zip

It contains many files, including derby.jar and derbyclient.jar (along with much documentation).它包含许多文件,包括derby.jarderbyclient.jar (以及许多文档)。

derbyclient.jar contains our friend org.apache.derby.jdbc.ClientDriver.class derbyclient.jar包含我们的朋友org.apache.derby.jdbc.ClientDriver.class

@Paulsm4 is correct. @Paulsm4 是正确的。
But please keep in mind also that:但也请记住:

org.apache.derby.jdbc.ClientDriver org.apache.derby.jdbc.ClientDriver

which can be found inside derbyclient.jar is enough to just obtain connection to the running Derby DB server.可以在derbyclient.jar中找到它足以获取与正在运行的 Derby DB 服务器的连接。

But if you would like to create embedded (in memory) database when obtaining connection, then you have to use different jdbc driver:但是如果你想在获取连接时创建嵌入式(内存中)数据库,那么你必须使用不同的 jdbc 驱动程序:

org.apache.derby.jdbc.EmbeddedDriver org.apache.derby.jdbc.EmbeddedDriver

which can be found inside derby.jar .可以在derby.jar中找到。 Moreover, additional parameter create=true has to be passed.此外,必须传递附加参数create=true For example:例如:

<property name="javax.persistence.jdbc.url" value="jdbc:derby:myApp;databaseName=myApp;create=true" /> 

Hope it helps somebody.希望它能帮助别人。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 java-找不到类[org.apache.derby.jdbc.ClientDriver] - java - Class [org.apache.derby.jdbc.ClientDriver] not found org.apache.derby.jdbc.ClientDriver ; 无法连接 - org.apache.derby.jdbc.ClientDriver ; unable to connect 无法使用org.apache.derby.jdbc.ClientDriver建立与MySQL的连接 - Cannot establish connection to MySQL using org.apache.derby.jdbc.ClientDriver 未找到类[org.apache.derby.jdbc.ClientDriver]。 尝试连接到db时 - Class [org.apache.derby.jdbc.ClientDriver] not found. When trying to connect to db 日志中的Heroku错误:java.lang.ClassNotFoundException:org.apache.derby.jdbc.ClientDriver - Heroku error in logs: java.lang.ClassNotFoundException: org.apache.derby.jdbc.ClientDriver 创建数据库时出错:java.lang.ClassNotFoundException: org.apache.derby.jdbc.ClientDriver - An error occurred while creating the database: java.lang.ClassNotFoundException: org.apache.derby.jdbc.ClientDriver 线程“主”java.lang.ClassNotFoundException 中的异常:org.apache.derby.jdbc.ClientDriver - Exception in thread “main” java.lang.ClassNotFoundException: org.apache.derby.jdbc.ClientDriver java.lang.ClassNotFoundException:org.apach.derby.jdbc.ClientDriver - java.lang.ClassNotFoundException: org.apach.derby.jdbc.ClientDriver java.lang.ClassNotFoundException:org.apache.derby.jdbc.EmbeddedDriver - java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver Apache Derby 10.15.* - java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver - Apache Derby 10.15.* - java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM