JDBC Derby driver not found

前端 未结 8 729
甜味超标
甜味超标 2020-12-06 17:02

I\'ve followed the JDBC tutorial at: http://docs.oracle.com/javase/tutorial/jdbc/basics/gettingstarted.html, and managed to build and create my own JDBC database without too

相关标签:
8条回答
  • 2020-12-06 17:59

    java.sql.SQLException: No suitable driver found for jdbc:derby:db directory

    So your error can be caused by:

    Driver is not loaded correctly or your URL is malformed. So at first you need to ensure that your *.jar is in classpath. Check it out.

    Also try to change your URL to:

    jdbc:derby://<path>/<databasename>;create=true
    

    create=true will ensure that db will be created if does not exist.

    Update:

    Look at this thead also: SQLException: No suitable driver found for jdbc:derby://localhost:1527

    0 讨论(0)
  • 2020-12-06 18:01

    If you have this type of error

    java.lang.ClassNotFoundException: org.apache.derby.jdbc.ClientDriver
    

    and you are using netbeans then you have to follow these steps:

    1. right click on library
    2. choose add library option and from the list of libraries choose "Java DB Driver"

    enter image description here

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