Library-Management-System-JAVA icon indicating copy to clipboard operation
Library-Management-System-JAVA copied to clipboard

Unable to find a suitable driver

Open calarasmihail opened this issue 6 years ago • 5 comments

New Connection Wizard

When I click next, appears this:

Cannot establish a connection to jdbc:derby://localhost:1527/LMS using org.apache.derby.jdbc.ClientDriver (Unable to find a suitable driver)

calarasmihail avatar May 08 '19 10:05 calarasmihail

@calarasmihail Have you manged to fix the problem

darthxyz avatar Jan 24 '20 11:01 darthxyz

New Connection Wizard

When I click next, appears this:

Cannot establish a connection to jdbc:derby://localhost:1527/LMS using org.apache.derby.jdbc.ClientDriver (Unable to find a suitable driver)

Try using Apache Netbeans 11, and install glassfish. Follow these instructions.

https://stackoverflow.com/questions/10371325/the-java-db-location-is-not-set-correctly-netbeans/55762462

1589109606(1)

darthxyz avatar May 10 '20 11:05 darthxyz

So I encountered this error and it was quite an irritating and hectic task to resolve this. But in the end, I managed to find a perfect video that made me install derby from the start and guided me perfectly on how to install it. However, there is one more step after the video.

Watch this video if you have set up JavaFX packages and are able to run the program normally, but facing "java.sql.SQLException: No suitable driver found for jdbc:derby://localhost:1527/DBNAME;create=true" issue when trying to run with the database.

Link to the tutorial -> https://www.youtube.com/watch?v=OKiBsWbgrMw

Now After this is set up you will now be able to start/stop the database (via the services tab) and will be able to connect with the DB. But the issue will still persist in trying to edit the DB.

TO rectify this, follow the steps ->

Right click on project ---> Properties ---> Libraries ---> Click on '+' in Classpath ---> Add jar/folder ---> Go to the lib folder inside the derby and select derbyclient.jar

VERSIONS

JAVA - 17.0.1, Netbeans - 12.6

HOPE IT HELPED, THANKS :)

Srezzx avatar Dec 05 '21 21:12 Srezzx

la verdad es que esta no es la solucion

hcastro2 avatar Mar 28 '22 20:03 hcastro2

org.apache.derby.jdbc.EmbeddedDriver el driver en el caso de ser embebida es ese y en otros casos la solucion es cargar todas las librerias y buscar la DriverClass correspondiente y adecuada para el tipo de coneccion que buscamos; no me resultaba hasta elegir el driver Embedded y sin ningun problema conecto; por defecto el sistema elige otros drivers que no son adecuados, en mi caso ese fue el problema, al elegir el driver adecuado, funciono.

img

hcastro2 avatar Mar 28 '22 21:03 hcastro2