nikos
nikos

Reputation: 3003

'No suitable driver found' error for using a database in a Web Service on Glassfish server

I have a Java Web Application and using an operation of it from a consumer Java App i want to handle a MySQL database. When i am trying to get a connection to the database i get a:

No suitable driver found for jdbc:mysql://localhost:3306/mysql

I have put the JDBC connector jar to the classpath of both my Web App and the Java App that tries to consume the Web Service. I am using NetBeans IDE.

Upvotes: 2

Views: 2044

Answers (1)

perissf
perissf

Reputation: 16273

Put the connector in the glassfish/lib folder and restart the server.

Upvotes: 3

Related Questions