title: Oracle query from pipeline script
body: <p>I have a pipeline job, where I'm loading a groovy class and calling a method which has a Oracle database query. In my IDE the class runs fine as I have ojdbc.jar in the classpath. I want to call the method from pipeline script thru groovy, I'm facing the belwo exception. How can I ensure the jar file is referred from the pipeline script.</p>
  
  <pre><code>java.net.URLClassLoader.findClass(Unknown Source), 
  java.lang.ClassLoader.loadClass(Unknown Source), 
  java.lang.ClassLoader.loadClass(Unknown Source), 
  org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:450), 
  org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:403), 
  java.lang.Class.forName0(Native Method), java.lang.Class.forName(Unknown Source), 
  groovy.sql.Sql.loadDriver(Sql.java:705), groovy.sql.Sql.newInstance(Sql.java:445), 
  groovy.sql.Sql$newInstance.call(Unknown Source), 
  org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48), 
  org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113), 
  com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:15), 
  com.merck.comet.TibcoServiceXML.callSQL(D:\Pedda\Tibco_Automation\src\com\merck\comet\TibcoServiceXML.groovy:58), 
  WorkflowScript.run(WorkflowScript:18), 
  ___cps.transform___(Native Method), 
  com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:55), 
  com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:106), 
  com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:79), 
  sun.reflect.GeneratedMethodAccessor690.invoke(Unknown Source), 
  sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source), 
  java.lang.reflect.Method.invoke(Unknown Source), 
  com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72), 
  com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21), 
  com.cloudbees.groovy.cps.Next.step(Next.java:58), 
  com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:154), 
  org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:164), 
  org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:297), 
  org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$000(CpsThreadGroup.java:78), 
  org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:206), 
  org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:204), 
  org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:47), 
  java.util.concurrent.FutureTask.run(Unknown Source), 
  hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112), 
  jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28), 
  java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source), 
  java.util.concurrent.FutureTask.run(Unknown Source), 
  java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source), 
  java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source), 
  java.lang.Thread.run(Unknown Source)]
  </code></pre>