BTW, I also copying the Oracle JDBC library file in the Groovy lib folder. 
The console test works fine without specifying the -cp option so I know 
that works. Unfortunately, I still get the same failure  in Jenkins.

On Monday, November 16, 2015 at 3:11:54 PM UTC-5, t3knoid wrote:
>
> 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/89708478-7977-415f-8ced-35e97cbf572a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to