where is org.apache.derby.jdbc.ClientDriver?

耗尽温柔 提交于 2019-12-05 03:55:06
paulsm4

OK: have you looked on the Apache Derby page:

Download db-derby-10.9.1.0-bin.zip

It contains many files, including derby.jar and derbyclient.jar (along with much documentation).

derbyclient.jar contains our friend org.apache.derby.jdbc.ClientDriver.class

@Paulsm4 is correct.
But please keep in mind also that:

org.apache.derby.jdbc.ClientDriver

which can be found inside derbyclient.jar is enough to just obtain connection to the running Derby DB server.

But if you would like to create embedded (in memory) database when obtaining connection, then you have to use different jdbc driver:

org.apache.derby.jdbc.EmbeddedDriver

which can be found inside derby.jar. Moreover, additional parameter create=true has to be passed. For example:

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

Hope it helps somebody.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!