No suitable driver found
See original GitHub issueHello, I’m trying to setup a database connection using
* def DbUtils = Java.type('util.DbUtils')
* def config = { username: QC_DATABASE_Username, password: QC_DATABASE_Password, url: QC_DatabaseHostName_SID, driverClassName: 'oracle.jdbc.driver.OracleDriver'}
* def db = new DbUtils(config);
* def user = db.readRow("Select * from ssc_user where ds_email_1='email@example.com'");
I’ve already added the oracle driver to project dependencies. The DbUtils
class is the same as the dogs.feature
example.
ERROR:
at ✽.* def user = db.readRow("Select * from ssc_user where ds_email_1='email@example.com'");(/src/test/java/features/users/users.feature:67)
Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: No suitable driver found for QC_DatabaseHostName_SID
Karate:0.7.0
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
No suitable driver found for 'jdbc:mysql://localhost:3306/mysql
Create a new folder in your project workspace and add the downloaded .jar file(eg:- mysql-connector-java-5.1.35-bin.jar ) · Right click your project > properties ......
Read more >How to Fix java.sql.SQLException: No suitable driver found for ...
In order to solve this error, you need the MySQL JDBC driver like mysql-connector-java-5.1.36.jar in your classpath. If you use a driver which...
Read more >No Suitable Driver Found For JDBC - Javatpoint
No suitable driver found for JDBC is an exception in Java that generally occurs when any driver is not found for making the...
Read more >java.sql.SQLException: No suitable driver found for 'jdbc ...
This error comes when you are trying to connect to MySQL database from Java program using JDBC but either the JDBC driver for...
Read more >Resolve java.sql.SQLException: No suitable driver found for ...
You will get this type of exception whenever your JDBC URL is not accepted by any of the loaded JDBC drivers by the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ampc maybe you are missing single quotes ?
suggestion, for non-karate questions like this, please use StackOveflow, thanks: https://stackoverflow.com/questions/tagged/karate
you have a mistake in your JSON I think:
refer to the doc: https://github.com/intuit/karate#embedded-expressions