I think you should think of the user executing the scripts from user "jenkins" 
perpective.
also good idea to run "env" or "set" and echo $PATH as shell script, to see 
what environment you have.
Hope that helps
-K





>________________________________
> From: Lloyd Meinholz <[email protected]>
>To: [email protected] 
>Sent: Thursday, April 4, 2013 2:21 PM
>Subject: system Groovy script claspath question
> 
>
>I'm banging my head trying to solve this issue. I would like one of my "system 
>Groovy script"s to insert a row into a database. I need my jdbc driver to do 
>this.
>
>I'm on Solaris 10, jdk 1.6.0_35-b10, tomcat 7.0.39, jenkins 1.509, Hudson 
>groovy builder 1.13.
>
>
>The mysql jdbc driver I am using lives in 
>/ci/lib/mysql-connector-java-5.1.22-bin.jar. I verified the jar was good by 
>unjarring it. I use this jar in another web application to access the same 
>mysql server.
>
>
>
>I have been unable to have access to the jdbc driver from my script:
>
>
>FATAL: com.mysql.jdbc.Driver java.lang.ClassNotFoundException: 
>com.mysql.jdbc.Driver
>
>I tried:
>
>
>* adding "/ci/lib" to the Classpath field of the "Execute system Groovy 
>Script" build step.
>* adding "-cp /ci/lib" to the Classpath field of the "Execute system Groovy 
>Script" build step.
>* adding "/ci/lib/mysql-connector-java-5.1.22-bin.jar" to the Classpath field 
>of the "Execute system Groovy Script" build step.
>* adding "-cp /ci/lib/mysql-connector-java-5.1.22-bin.jar" to the Classpath 
>field of the "Execute system Groovy Script" build step.
>
>* putting the driver in the tomcat users ~/.groovy/lib
>
>* putting the driver in $TOMCAT_HOME/lib
>
>
>None of these seemed to work. What am I missing?
>
>
>Thanks,
>
>Lloyd
>
>
-- 
>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 [email protected].
>For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
>
>
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to