Claim plugin has fallen silent

52 views
Skip to first unread message

dougl...@gmail.com

unread,
Feb 4, 2016, 11:45:04 PM2/4/16
to Jenkins Users
Our Jenkins server suffered a power outage, and since restart, the Claim plugin has refused to work: Clicking on the "Claim it" link for a failed job has no visible effect.

We have uninstalled the plugin and restarted, reinstalled and restarted, all to no avail. Nothing appears in the Jenkins log when clicking on the Claim It link. Presumably, some sort of invalid state has been left on the HDD of the server. The only clue I can find is the exception below.

Any suggestions?


com.thoughtworks.xstream.mapper.CannotResolveClassException: hudson.plugins.claim.ClaimBuildAction
        at com.thoughtworks.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:79)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass(DynamicProxyMapper.java:55)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.PackageAliasingMapper.realClass(PackageAliasingMapper.java:88)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.ClassAliasingMapper.realClass(ClassAliasingMapper.java:79)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.ArrayMapper.realClass(ArrayMapper.java:74)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.SecurityMapper.realClass(SecurityMapper.java:71)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at hudson.util.XStream2$CompatibilityMapper.realClass(XStream2.java:280)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at org.jenkinsci.jruby.JRubyMapper.realClass(JRubyMapper.java:34)
        at hudson.util.xstream.MapperDelegate.realClass(MapperDelegate.java:43)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
        at com.thoughtworks.xstream.mapper.CachingMapper.realClass(CachingMapper.java:48)
        at com.thoughtworks.xstream.core.util.HierarchicalStreams.readClassType(HierarchicalStreams.java:29)
        at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:70)
        at hudson.util.RobustCollectionConverter.populateCollection(RobustCollectionConverter.java:85)
        at com.thoughtworks.xstream.converters.collections.CollectionConverter.unmarshal(CollectionConverter.java:80)
        at hudson.util.RobustCollectionConverter.unmarshal(RobustCollectionConverter.java:76)
        at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
        at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
        at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
        at hudson.util.RobustReflectionConverter.unmarshalField(RobustReflectionConverter.java:352)
        at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:290)
        at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:229)
        at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
        at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
        at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
        at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
        at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
        at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
        at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1189)
        at hudson.util.XStream2.unmarshal(XStream2.java:113)
        at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1173)
        at hudson.XmlFile.unmarshal(XmlFile.java:163)
        at hudson.model.Run.reload(Run.java:329)
        at hudson.model.Run.<init>(Run.java:317)
        at hudson.model.AbstractBuild.<init>(AbstractBuild.java:178)
        at hudson.model.Build.<init>(Build.java:103)
        at hudson.model.FreeStyleBuild.<init>(FreeStyleBuild.java:38)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
        at jenkins.model.lazy.LazyBuildMixIn.loadBuild(LazyBuildMixIn.java:158)
        at jenkins.model.lazy.LazyBuildMixIn$1.create(LazyBuildMixIn.java:135)
        at hudson.model.RunMap.retrieve(RunMap.java:224)
        at hudson.model.RunMap.retrieve(RunMap.java:57)
        at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:465)
        at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:448)
        at jenkins.model.lazy.AbstractLazyLoadRunMap.getByNumber(AbstractLazyLoadRunMap.java:356)
        at jenkins.model.lazy.AbstractLazyLoadRunMap.search(AbstractLazyLoadRunMap.java:332)
        at jenkins.model.lazy.AbstractLazyLoadRunMap.newestBuild(AbstractLazyLoadRunMap.java:274)
        at jenkins.model.lazy.LazyBuildMixIn.getLastBuild(LazyBuildMixIn.java:240)
        at hudson.model.AbstractProject.getLastBuild(AbstractProject.java:994)
        at hudson.model.AbstractProject.getLastBuild(AbstractProject.java:145)
        at hudson.model.Job.isLogUpdated(Job.java:318)
        at hudson.model.AbstractProject.getCauseOfBlockage(AbstractProject.java:1147)
        at hudson.model.AbstractProject.isBuildBlocked(AbstractProject.java:1094)
        at hudson.model.Queue.isBuildBlocked(Queue.java:1191)
        at hudson.model.Queue.maintain(Queue.java:1498)
        at hudson.model.Queue$1.call(Queue.java:336)
        at hudson.model.Queue$1.call(Queue.java:333)
        at jenkins.util.AtmostOneTaskExecutor$1.call(AtmostOneTaskExecutor.java:101)
        at jenkins.util.AtmostOneTaskExecutor$1.call(AtmostOneTaskExecutor.java:91)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)
        at java.lang.Thread.run(Thread.java:745)

Victor Martinez

unread,
Feb 5, 2016, 3:30:42 AM2/5/16
to Jenkins Users
Hi,

 It seems that plugin hasn't been loaded in the classpath, doesn't it? Have you tried to wipe out that plugin file manually from the filesystem?

  - cd %JENKINS_HOME%/plugins
  - ls -l *claim*
 
Cheers

dougl...@gmail.com

unread,
Feb 8, 2016, 8:16:37 PM2/8/16
to Jenkins Users
Closer examination of the log reveals that the exception I listed was generated when we had restarted without the plugin installed - yes, we had wiped it manually from the filesystem. After reinstallation, there were no claim plugin exceptions.

dougl...@gmail.com

unread,
Feb 8, 2016, 8:25:32 PM2/8/16
to Jenkins Users
Turns out we are suffering a JS error: "ReferenceError: ShowPopup is not defined" when we are clicking on the Claim It link. I'm not sufficiently familiar with JS to be able to find the error in the code (if any) myself - as far as I can see, the function is there.

Presumably, the defect emerged after our restart because that was when we started using the Claim plugin 2.8. Code was added to AbstractClaimBuildAction/summary.jelly in commit c2ea74e2a58cddff9219a03ffe261c1f95ea4be5, to add integration with the Build Failure Analyzer plugin (which we are using). See:


We have applied the following work-around via Greasemonkey script, just to make the claim "popup" visible at all times. This is simply the content of the (unreachable) ShowPopup() function:

hp = document.getElementById("claimHoverPopup");
hp.style.display = "block";

Applies equally to Firefox 44.0 (on Linux) and Chromium (on Windows or Linux).

dougl...@gmail.com

unread,
Feb 9, 2016, 3:42:03 PM2/9/16
to Jenkins Users
Solved!
 
Since commit c2ea74e2a58cddff9219a03ffe261c1f95ea4be5 the claim plugin has included all the Build Failure Analyzer failure causes in the generated JavaScript, like this:
 
var json = '{"First cause title":"First failure cause description",
             "Second title":"Second description",
             ...
             }';
 
It is failing to escape any single quotes in the failure cause text, which tripped up the browsers' JavaScript parsing. See James Telfer's comment on issue JENKINS-28722

There is a simple work-around: Remove any single quotes from all failure cause titles and descriptions.
Reply all
Reply to author
Forward
0 new messages