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

前端 未结 2 1408
谎友^
谎友^ 2020-12-19 02:32

I downloaded the jar of Core Apache Derby database engine, which also includes the embedded JDBC driver (10.9.1.0). But that jar doesn\'t include the .class fil

相关标签:
2条回答
  • 2020-12-19 03:25

    OK: have you looked on the Apache Derby page:

    • http://db.apache.org/derby/releases/release-10.9.1.0.cgi

    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

    0 讨论(0)
  • 2020-12-19 03:31

    @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.

    0 讨论(0)
提交回复
热议问题