-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Minor
-
Resolution: Fixed
-
Component/s: job-dsl-plugin
-
Labels:None
-
Environment:Jenkins 2.116
Job DSL Plugin 1.68
-
Similar Issues:
After upgrade Jenkins to 2.116 I see in the logs the following error:
Apr 11, 2018 9:06:15 PM WARNING org.jenkinsci.remoting.util.AnonymousClassWarnings warn Attempt to (de-)serialize anonymous class javaposse.jobdsl.plugin.LookupStrategy$2 in file:/var/lib/jenkins/plugins/job-dsl/WEB-INF/lib/classes.jar; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
It is not related to the plugin version - I tried to downgrade to 1.67 - problem still exists in this version. Before Jenkins upgrade (it was a direct upgrade from 2.114 to 2.116) I hadn't had such errors.
I can reproduce this issue. Even when running the job-dsl build step on master. This should only be caused by XStream (de-)serialization of ExecuteDslScripts.lookupStrategy.
Oleg Nenashev: LookupStrategy$2 is an enum. It gets serialized as <lookupStrategy>SEED_JOB</lookupStrategy>, so it should be save to (de-)serialize. Can't we make an exception for enums?
https://github.com/jenkinsci/job-dsl-plugin/blob/job-dsl-1.68/job-dsl-plugin/src/main/groovy/javaposse/jobdsl/plugin/LookupStrategy.java