I’ve been trying to set up my own REST API for a school project. I decided to use Apache Derby as a database and I want to connect it with my web service, but apparently, I always get this error message: java.sql.SQLException: No suitable driver found for jdbc:derby://localhost:1527/supermarketdb
.
When I look at the error message, it also tells me that this code can’t be executed:
public UserService() {
try {
con = DriverManager.getConnection("jdbc:derby://localhost:1527/supermarketdb", "root", "adminadmin123");
} catch (SQLException e) {
e.printStackTrace();
}
}
I don’t know why this keeps happening… The Derby JDBC driver JAR file is located in “Referenced Libraries”. By the way, I use NetBeans 22, Apache Derby, JDK 13, and Maven .
MubarikMT is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
3