We are having issues with getting the Adaptavist Resources setup for one of our database connections and are unsure of how to resolve. Any help would be greatly appreciated. We are leveraging the server edition of JIRA.
We tried this connection string and included the jtds-1.3.1.jar driver and it is not working.
url jdbc:jtds:sqlserver://df2v-catsql-p01.ebsi.corp:1433/cornerstone_catalog;domain=EBSI;useNTLMv2=true
driver net.sourceforge.jtds.jdbc.Driver
driver file jtds-1.3.1.jar
Error:
2020-05-28 08:01:58,727-0500 https-jsse-nio-8443-exec-3 WARN dcorrigan 481x41945x1 bkgxw6 192.168.46.27,127.0.0.1 /rest/scriptrunner/latest/resources/com.onresolve.scriptrunner.canned.db.ExternalDatabaseConnection [c.z.hikari.util.DriverDataSource] Registered driver with driverClassName=net.sourceforge.jtds.jdbc.Driver was not found, trying direct instantiation.
2020-05-28 08:01:58,739-0500 https-jsse-nio-8443-exec-3 ERROR dcorrigan 481x41945x1 bkgxw6 192.168.46.27,127.0.0.1 /rest/scriptrunner/latest/resources/com.onresolve.scriptrunner.canned.db.ExternalDatabaseConnection [c.z.hikari.pool.PoolBase] 32b58ee3-46c6-41a1-9108-36e0f4d52482 - Failed to execute isValid() for connection, configure connection test query (null).
2020-05-28 08:01:58,745-0500 https-jsse-nio-8443-exec-3 ERROR dcorrigan 481x41945x1 bkgxw6 192.168.46.27,127.0.0.1 /rest/scriptrunner/latest/resources/com.onresolve.scriptrunner.canned.db.ExternalDatabaseConnection [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: null
java.lang.AbstractMethodError
at net.sourceforge.jtds.jdbc.JtdsConnection.isValid(JtdsConnection.java:2833)
------------------------------------------
We also tried this connection string which we believed should use an included driver and it is failing.
Included driver is mssql-jdbc-7.2.1.jre8.jar
We tried including sqljdbc42.jar as well, no dice.
jdbc:sqlserver://df2v-catsql-p01.ebsi.corp;databaseName=cornerstone_catalog;domain=EBSI;useNTLMv2=true
We also tried calling the drivers two different ways.
com.microsoft.sqlserver.jdbc.SQLServerDriver
com.microsoft.jdbc.sqlserver.SQLServerDriver
2020-05-28 08:06:05,367-0500 https-jsse-nio-8443-exec-1 WARN dcorrigan 486x43711x1 bkgxw6 192.168.46.27,127.0.0.1 /rest/scriptrunner/latest/resources/com.onresolve.scriptrunner.canned.db.ExternalDatabaseConnection [c.z.hikari.util.DriverDataSource] Registered driver with driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver was not found, trying direct instantiation.
2020-05-28 08:06:06,391-0500 https-jsse-nio-8443-exec-1 ERROR dcorrigan 486x43711x1 bkgxw6 192.168.46.27,127.0.0.1 /rest/scriptrunner/latest/resources/com.onresolve.scriptrunner.canned.db.ExternalDatabaseConnection [c.z.hikari.pool.HikariPool] d3d6c4da-aec8-4a15-b633-48351caddd3e - Exception during pool initialization.
com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'OUR USER IDl'. ClientConnectionId:df005aab-b901-4b7d-b0a7-bdd0a0210d77
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:256)
This may not be 100% the best implementation for your use case given how few details you shared, but it is possible to add options to a SingleSelect field using a script.
You would use this API: OptionsManager.createOption
You could add an event listener that watches for "Sprint Created" and will add the newly created sprint to the correct field config. The challenge may be in detecting the correct project and field config to add the sprint to.
The other danger with this approach is that the list of options for your Select List will continually grow and eventually will cause performance problems.
The option suggestion by Fabio may be a better solution.
Hi @MG ,
you have a Select List custom field with some values and you want to add a value retrieved by a script dinamically.
You can't add a value dinamically to a Select List field. You should be able, through a script, to hide some values specified for the field but not add a new value dinamically.
In order to do that, in my experience, you need to create a text field custom field and, through a behaviour, transform it in a select list that aggregate values from your original select list and your script for active sprint.
Take a look to the following doc https://scriptrunner.adaptavist.com/latest/jira/behaviours-conversions.html
Hope this helps,
Fabio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.