I am trying to use the Dynamic Choice Parameter and I am getting the 
following error in the Jenkins.err.log file:

Nov 16, 2015 2:49:16 PM com.seitenbau.jenkins.plugins.dynamicparameter.
BaseParameterDefinition getScriptResultAsList
INFO: Script parameter with name 'BUILD' is not a instance of java.util.List 
the parameter value is : null
Nov 16, 2015 2:49:16 PM com.seitenbau.jenkins.plugins.dynamicparameter.util.
JenkinsUtils execute
SEVERE: Cannot access class path
java.lang.ClassNotFoundException: oracle.jdbc.pool.OracleDataSource

I've specfied the proper class path on the "Class Paths" Dynamic Choice 
Parameter option. I tried using a forward slash and double-backslash for 
the path separator character without success.

The script works fine in a DOS console using the following command to run 
the script:

groovy -cp C:\oracle\product\10.2.0\client_1\jdbc\lib\ojdbc14.jar foo.groovy

Here's the code in foo.groovy (with sensitive data obfuscated):

import groovy.sql.Sql

def sql = Sql.newInstance(
"jdbc:oracle:thin:@(description=(address_list=(address=(host=xxx)(protocol=tcp)(port=1521)))(connect_data=(service_name=xxx)))"
, "xxx", "xxx","oracle.jdbc.pool.OracleDataSource")
def list = []

sql.eachRow('select COL from TABLE') { row ->
     list << "${row.FIELD}"
}

list

Jenkins doesn't even get to the point of executing the script because of 
the class path error. Any ideas on what I can do?

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/d1baf2c0-a7d6-430b-86d2-fc0b46e32ecf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to