Hi!
I tried to connect to MySQL DB from groovy script in Assets Automation and I always get the error
GroovyInsightException: com.mysql.cj.jdbc.Driver not found by com.riadalabs.jira.plugins.insight [221]'
I tried to add @grab
@grab(group='mysql', module='mysql-connector-java', version='8.0.33'), but it didn`t help.
@grab(group='mysql', module='mysql-connector-java', version='8.0.33')
import groovy.sql.Sql
final def sql = Sql.newInstance("jdbc:mysql://host:port/dbName", "dbUser", dbPassword, 'com.mysql.cj.jdbc.Driver')
Any ideas?
Thanks
I couldn't import the driver, but I found a workaround. I created a database connection in SciptRunner - Resources and used it in the groovy script.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.