[JIRA] (JENKINS-38868) Pipeline Global Library example fails

12 views
Skip to first unread message

LeeFowler.CU@outlook.com (JIRA)

unread,
Oct 10, 2016, 11:13:01 AM10/10/16
to jenkinsc...@googlegroups.com
Lee Fowler created an issue
 
Jenkins / Bug JENKINS-38868
Pipeline Global Library example fails
Issue Type: Bug Bug
Assignee: Jesse Glick
Attachments: Screen Shot 2016-10-10 at 11.02.30 AM.png, Screen Shot 2016-10-10 at 11.08.14 AM.png, Screen Shot 2016-10-10 at 11.09.23 AM.png
Components: workflow-cps-global-lib-plugin, workflow-cps-plugin
Created: 2016/Oct/10 3:12 PM
Environment: Jenkins 2.20
Pipeline 2.4
Pipeline Global Library 2.4
Priority: Minor Minor
Reporter: Lee Fowler

An implementation of one of the simple Global Libraries outlined in the Workflow Global Libraries Plugin README fails to run `steps.sh "echo ..."` and also ends the with a NotSerializableException, failing the build.

Pictures are attached of the source code for the library, the configuration of the global library within Jenkins, and the pipeline script being executed.

The console output of the build is:

Unable to find source-code formatter for language: shell. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
Started by user Lee Fowler
Loading library pipelineLibrary@feature/jenkins-pipeline-library
 > /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > /usr/bin/git config remote.origin.url https://github.datapipe.net/lfowler/jenkins-pipeline-library.git # timeout=10
Fetching upstream changes from https://github.datapipe.net/lfowler/jenkins-pipeline-library.git
 > /usr/bin/git --version # timeout=10
using GIT_ASKPASS to set credentials 
 > /usr/bin/git fetch --tags --progress https://github.datapipe.net/lfowler/jenkins-pipeline-library.git +refs/heads/*:refs/remotes/origin/*
 > /usr/bin/git rev-parse refs/remotes/origin/feature/jenkins-pipeline-library^{commit} # timeout=10
 > /usr/bin/git rev-parse refs/remotes/origin/refs/heads/feature/jenkins-pipeline-library^{commit} # timeout=10
Checking out Revision ca6de682d24fda3c505b37fac4b2420396ca84b3 (refs/remotes/origin/feature/jenkins-pipeline-library)
 > /usr/bin/git config core.sparsecheckout # timeout=10
 > /usr/bin/git checkout -f ca6de682d24fda3c505b37fac4b2420396ca84b3
 > /usr/bin/git rev-list b96474109250438a1291b2ac3c37f2785ab24688 # timeout=10
[Pipeline] node
Running on master in /var/jenkins_home/workspace/pipeline-library-test@5
[Pipeline] End of Pipeline
java.io.NotSerializableException: com.datapipe.Templater
	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:860)
	at org.jboss.marshalling.river.BlockMarshaller.doWriteObject(BlockMarshaller.java:65)
	at org.jboss.marshalling.river.BlockMarshaller.writeObject(BlockMarshaller.java:56)
	at org.jboss.marshalling.MarshallerObjectOutputStream.writeObjectOverride(MarshallerObjectOutputStream.java:50)
	at org.jboss.marshalling.river.RiverObjectOutputStream.writeObjectOverride(RiverObjectOutputStream.java:179)
	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344)
	at java.util.HashMap.internalWriteEntries(HashMap.java:1785)
	at java.util.HashMap.writeObject(HashMap.java:1362)
	at sun.reflect.GeneratedMethodAccessor197.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.jboss.marshalling.reflect.SerializableClass.callWriteObject(SerializableClass.java:271)
	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:976)
	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:967)
	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
	at org.jboss.marshalling.river.BlockMarshaller.doWriteObject(BlockMarshaller.java:65)
	at org.jboss.marshalling.river.BlockMarshaller.writeObject(BlockMarshaller.java:56)
	at org.jboss.marshalling.MarshallerObjectOutputStream.writeObjectOverride(MarshallerObjectOutputStream.java:50)
	at org.jboss.marshalling.river.RiverObjectOutputStream.writeObjectOverride(RiverObjectOutputStream.java:179)
	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344)
	at java.util.HashMap.internalWriteEntries(HashMap.java:1785)
	at java.util.HashMap.writeObject(HashMap.java:1362)
	at sun.reflect.GeneratedMethodAccessor197.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.jboss.marshalling.reflect.SerializableClass.callWriteObject(SerializableClass.java:271)
	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:976)
	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
	at org.jboss.marshalling.AbstractObjectOutput.writeObject(AbstractObjectOutput.java:58)
	at org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:111)
	at org.jenkinsci.plugins.workflow.support.pickles.serialization.RiverWriter.writeObject(RiverWriter.java:132)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram(CpsThreadGroup.java:429)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram(CpsThreadGroup.java:408)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:356)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:78)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:236)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:224)
	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:63)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: an exception which occurred:
	in field locals
	in field capture
	in field def
	in field closures
	in object org.jenkinsci.plugins.workflow.cps.CpsThreadGroup@709c8b49
Finished: FAILURE

The Templater.test() call does not execute the shell command, and the build finishes with a NotSerializableException

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

LeeFowler.CU@outlook.com (JIRA)

unread,
Oct 10, 2016, 11:14:01 AM10/10/16
to jenkinsc...@googlegroups.com
Lee Fowler updated an issue
Change By: Lee Fowler
An implementation of one of the simple Global Libraries outlined in the Workflow Global Libraries Plugin README fails to run `steps.sh "echo ..."` and also ends the with a NotSerializableException, failing the build.

Pictures are attached of the source code for the library, the configuration of the global library within Jenkins, and the pipeline script being executed.

The console output of the build is:

{code: shell none }
{code}


The Templater.test() call does not execute the shell command, and the build finishes with a NotSerializableException

jglick@cloudbees.com (JIRA)

unread,
Oct 10, 2016, 12:03:02 PM10/10/16
to jenkinsc...@googlegroups.com
Jesse Glick updated an issue
Change By: Jesse Glick
Labels: documentation

jglick@cloudbees.com (JIRA)

unread,
Oct 10, 2016, 12:03:02 PM10/10/16
to jenkinsc...@googlegroups.com
Jesse Glick updated an issue
Change By: Jesse Glick
Component/s: workflow-cps-plugin

jglick@cloudbees.com (JIRA)

unread,
Oct 10, 2016, 12:03:02 PM10/10/16
to jenkinsc...@googlegroups.com
Jesse Glick commented on Bug JENKINS-38868
 
Re: Pipeline Global Library example fails

The class must be declared implements Serializable. I will check if the doc needs to be updated.

LeeFowler.CU@outlook.com (JIRA)

unread,
Oct 10, 2016, 12:26:02 PM10/10/16
to jenkinsc...@googlegroups.com

Thanks Jesse Glick. That resolved the issue.

LeeFowler.CU@outlook.com (JIRA)

unread,
Oct 10, 2016, 12:26:04 PM10/10/16
to jenkinsc...@googlegroups.com
Lee Fowler updated an issue
 
Change By: Lee Fowler
An implementation of one of the simple Global Libraries outlined in the Workflow Global Libraries Plugin README fails to run `steps.sh "echo ..."` and also ends the pipeline with a NotSerializableException, failing the build.


Pictures are attached of the source code for the library, the configuration of the global library within Jenkins, and the pipeline script being executed.

The console output of the build is:

{code:none}

scm_issue_link@java.net (JIRA)

unread,
Dec 9, 2016, 11:16:01 AM12/9/16
to jenkinsc...@googlegroups.com
SCM/JIRA link daemon commented on Bug JENKINS-38868
 
Re: Pipeline Global Library example fails

Code changed in jenkins
User: R. Tyler Croy
Path:
content/doc/book/pipeline/shared-libraries.adoc
http://jenkins-ci.org/commit/jenkins.io/7d675196927a6ee000e4143ee7ec5228a6ecad31
Log:
When describing classes in a Pipeline Shared Library that have "data" they must be Serializable

Fixes JENKINS-38868

bitwiseman@gmail.com (JIRA)

unread,
Dec 9, 2016, 2:53:03 PM12/9/16
to jenkinsc...@googlegroups.com

bitwiseman@gmail.com (JIRA)

unread,
Dec 9, 2016, 2:53:03 PM12/9/16
to jenkinsc...@googlegroups.com

bitwiseman@gmail.com (JIRA)

unread,
Dec 9, 2016, 2:53:04 PM12/9/16
to jenkinsc...@googlegroups.com

jglick@cloudbees.com (JIRA)

unread,
Jan 25, 2017, 4:05:04 PM1/25/17
to jenkinsc...@googlegroups.com
Jesse Glick assigned an issue to Liam Newman
 
Change By: Jesse Glick
Assignee: Jesse Glick Liam Newman

jglick@cloudbees.com (JIRA)

unread,
Jan 25, 2017, 4:07:02 PM1/25/17
to jenkinsc...@googlegroups.com
Jesse Glick resolved as Fixed
 

Please do not duplicate documentation! If you want to move documentation to a more official place, fine—delete the original content and add a redirect.

Change By: Jesse Glick
Status: Open Resolved
Resolution: Fixed
Reply all
Reply to author
Forward
0 new messages