-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Jenkins ver. 1.596.2, All browsers
We currently run Jenkins ver. 1.596.2 with build-pipeline-plugin 1.4.3. We started seeing the weird indentation error, and decided to upgrade to plugin to 1.4.7.
We have an unrelated job that makes Json calls. The job has the following snitbit of code:
import org.json.*;
//Create JSON File from the XML
org.json.JSONObject json = org.json.XML.toJSONObject(writer.toString());
With build-pipeline-plugin 1.4.3 our code works fineā¦ no issues. After upgrading to 1.4.7, our code fails with the following error.
FATAL: startup failed:
Script1.groovy: 180: unable to resolve class org.json.JSONObject
@ line 180, column 21.
org.json.JSONObject json = org.json.XML.toJSONObject(writer.toString());
^
1 error
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script1.groovy: 180: unable to resolve class org.json.JSONObject
@ line 180, column 21.
org.json.JSONObject json = org.json.XML.toJSONObject(writer.toString());
^
1 error
at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:302)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:861)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:550)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:499)
at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:302)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:281)
at groovy.lang.GroovyShell.parseClass(GroovyShell.java:731)
at groovy.lang.GroovyShell.parse(GroovyShell.java:743)
at groovy.lang.GroovyShell.parse(GroovyShell.java:698)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:648)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:636)
at hudson.plugins.groovy.SystemGroovy.perform(SystemGroovy.java:93)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
at hudson.model.Build$BuildExecution.build(Build.java:199)
at hudson.model.Build$BuildExecution.doRun(Build.java:160)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:533)
at hudson.model.Run.execute(Run.java:1759)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)
Any idea why build-pipeline-plugin 1.4.7 interferes with the Json objects of another job?
Downgrading to 1.4.3 fixes the issue again.