In a 2.0 Playframework project, I would like to analyze issued SQL queries by Slick. I am using log4jdbc for that but I can't get it to work.
I have added the log4jdbc.jar
file in lib/
folder and changed my application.conf file to following :
db.default.driver=net.sf.log4jdbc.DriverSpy
db.default.url="jdbc:log4jdbc:mysql://127.0.0.1:3306/mydatabase"
db.default.user="username"
db.default.pass="password"
It is resulting in a Cannot connect to database [default]
error. Without the log4jdbc, everything works fine. Am I missing something?
Ps : an important notice, I am also using the play-slick extension which seems to be the origin of the problem.
EDIT : By searching a little deeper, the exact error is "No suitable driver found".
Apparently Play DB Plugin doesn't prevent from using this kind of url. If you look in DB.scala in module play-jdbc Line 345, it just passes the url to JDBC.
So the pb might be in the datasource itself (BoneCP)