[JIRA] (JENKINS-38303) pipeline script fails

2 views
Skip to first unread message

gaizeror@gmail.com (JIRA)

unread,
Sep 17, 2016, 5:17:02 PM9/17/16
to jenkinsc...@googlegroups.com
or gaizer created an issue
 
Jenkins / Bug JENKINS-38303
pipeline script fails
Issue Type: Bug Bug
Assignee: vjuranek
Components: groovy-plugin, pipeline
Created: 2016/Sep/17 9:16 PM
Environment: jenkins 2.7.4, just installed with all suggested plugins plus all pipeline plugins and groovy plugins (to check if it is the cause)
Labels: pipeline jenkins groovy
Priority: Blocker Blocker
Reporter: or gaizer

Hey,

when i run a pipeline script (doesnt matter what script do I write), it fails.
OS: ubuntu16.04
Jenkins version: 2.7.4

error:

groovy.lang.GroovyRuntimeException: Failed to create Script instance for class: class WorkflowScript. Reason: java.lang.RuntimeException: java.lang.ClassNotFoundException: java.io.Serializable
	at org.codehaus.groovy.runtime.InvokerHelper.createScript(InvokerHelper.java:464)
	at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
	at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:67)
	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:410)
	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:373)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:213)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:410)
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: java.io.Serializable
	at org.jenkinsci.bytecode.helper.ClassLoadingReferenceTypeHierachyReader.reader(ClassLoadingReferenceTypeHierachyReader.java:61)
	at org.jenkinsci.bytecode.helper.TypeHierarchyReader.hierarchyOf(TypeHierarchyReader.java:176)
	at org.jenkinsci.bytecode.helper.ClassLoadingReferenceTypeHierachyReader.hierarchyOf(ClassLoadingReferenceTypeHierachyReader.java:39)
	at org.jenkinsci.bytecode.helper.TypeHierarchyReader$TypeHierarchy.isAssignableFrom(TypeHierarchyReader.java:321)
	at org.jenkinsci.bytecode.helper.TypeHierarchyReader$TypeHierarchy.isAssignableFromAnyInterfaceImplementedBy(TypeHierarchyReader.java:329)
	at org.jenkinsci.bytecode.helper.TypeHierarchyReader$TypeHierarchy.isAssignableFrom(TypeHierarchyReader.java:310)
	at org.jenkinsci.bytecode.helper.TypeHierarchyReader.isAssignableFrom(TypeHierarchyReader.java:124)
	at org.jenkinsci.bytecode.helper.ClassLoadingReferenceTypeHierachyReader.isAssignableFrom(ClassLoadingReferenceTypeHierachyReader.java:39)
	at org.jenkinsci.bytecode.helper.TypeHierarchyReader.getCommonSuperClass(TypeHierarchyReader.java:131)
	at org.jenkinsci.bytecode.helper.ClassLoadingReferenceTypeHierachyReader.getCommonSuperClass(ClassLoadingReferenceTypeHierachyReader.java:39)
	at org.jenkinsci.bytecode.NonClassLoadingClassWriter.getCommonSuperClass(NonClassLoadingClassWriter.java:72)
	at org.kohsuke.asm5.ClassWriter.getMergedType(ClassWriter.java:1654)
	at org.kohsuke.asm5.Frame.merge(Frame.java:1426)
	at org.kohsuke.asm5.Frame.merge(Frame.java:1374)
	at org.kohsuke.asm5.MethodWriter.visitMaxs(MethodWriter.java:1475)
	at org.kohsuke.asm5.tree.MethodNode.accept(MethodNode.java:833)
	at org.kohsuke.asm5.commons.JSRInlinerAdapter.visitEnd(JSRInlinerAdapter.java:187)
	at org.jenkinsci.bytecode.Transformer$1$1.visitEnd(Transformer.java:109)
	at org.kohsuke.asm5.MethodVisitor.visitEnd(MethodVisitor.java:877)
	at org.kohsuke.asm5.ClassReader.readMethod(ClassReader.java:1021)
	at org.kohsuke.asm5.ClassReader.accept(ClassReader.java:693)
	at org.kohsuke.asm5.ClassReader.accept(ClassReader.java:506)
	at org.jenkinsci.bytecode.Transformer.transform(Transformer.java:115)
	at hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:883)
	at jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1310)
	at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1366)
	at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326)
	at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079)
	at java.lang.ClassLoader.loadClass(java.base@9-internal/ClassLoader.java:419)
	at org.jenkinsci.plugins.workflow.cps.CpsScript.<init>(CpsScript.java:71)
	at WorkflowScript.<init>(WorkflowScript)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(java.base@9-internal/Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(java.base@9-internal/NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(java.base@9-internal/DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(java.base@9-internal/Constructor.java:453)
	at java.lang.Class.newInstance(java.base@9-internal/Class.java:550)
	at org.codehaus.groovy.runtime.InvokerHelper.createScript(InvokerHelper.java:432)
	... 7 more
Finished: FAILURE
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

jenkins@dosowisko.net (JIRA)

unread,
Oct 4, 2016, 7:16:06 AM10/4/16
to jenkinsc...@googlegroups.com
Sebastian Krzyszkowiak commented on Bug JENKINS-38303
 
Re: pipeline script fails

I've got the same issue on clean Ubuntu 16.04 and both Jenkins 2.7.4 installed from http://pkg.jenkins.io/debian-stable repository and Jenkins 2.24 from http://pkg.jenkins.io/debian one.

jenkins@dosowisko.net (JIRA)

unread,
Oct 4, 2016, 7:25:01 AM10/4/16
to jenkinsc...@googlegroups.com
I've got the same issue on clean Ubuntu 16.04 and both Jenkins 2.7.4 installed from http://pkg.jenkins.io/debian-stable repository and Jenkins 2.24 from  http://pkg.jenkins.io/debian one.


Turns out it used openjdk-9 - after switching to openjdk-8 it started to work.

gaizeror@gmail.com (JIRA)

unread,
Oct 4, 2016, 8:00:09 AM10/4/16
to jenkinsc...@googlegroups.com
or gaizer commented on Bug JENKINS-38303
 
Re: pipeline script fails

Correct, it was java issue.
Thanks.

gaizeror@gmail.com (JIRA)

unread,
Oct 4, 2016, 8:01:03 AM10/4/16
to jenkinsc...@googlegroups.com
or gaizer closed an issue as Fixed
 

Had to install openjdk-8

Change By: or gaizer
Status: Open Closed
Resolution: Fixed

sam@truepad.com (JIRA)

unread,
Feb 8, 2017, 1:13:01 PM2/8/17
to jenkinsc...@googlegroups.com
Sam Miles commented on Bug JENKINS-38303
 
Re: pipeline script fails

[~gaizer] Hey I am seeing a similar issue but I'm having an issue following the fix.

I installed openjdk-8 and set it up in the global tool configuration. However I still see that the error persists. I've tried a number of things but none have worked.

I currently have one JDK installed and it is openjdk-8. When you refer to switching JDKs was this all you had to do?

sam@truepad.com (JIRA)

unread,
Feb 8, 2017, 1:14:01 PM2/8/17
to jenkinsc...@googlegroups.com
[~gaizer] Hey I am seeing a similar issue but I'm having an issue following the fix.

I installed openjdk-8 and set it up in the global tool configuration. However I still see that the error persists. I've tried a number of things but none have worked.

I currently have one JDK installed and it is openjdk-8. When you refer to switching JDKs was this all you had to do? Before and after switching, the error log is the same.

sam@truepad.com (JIRA)

unread,
Feb 9, 2017, 10:40:01 AM2/9/17
to jenkinsc...@googlegroups.com
Sam Miles edited a comment on Bug JENKINS-38303
[~gaizer] Hey I am seeing a similar issue but I'm having an issue following the fix.

I installed openjdk-8 and set it up in the global tool configuration. However I still see that the error persists. I've tried a number of things but none have worked.

I currently have one JDK installed and it is openjdk-8. When you refer to switching JDKs was this all you had to do? Before and after switching, the error log is the same.
Reply all
Reply to author
Forward
0 new messages