[JIRA] (JENKINS-41375) JobConfigHistory fails to revert

22 views
Skip to first unread message

antoni.yanev@zetta.bg (JIRA)

unread,
Jan 24, 2017, 10:51:02 AM1/24/17
to jenkinsc...@googlegroups.com
Antoni Yanev created an issue
 
Jenkins / Bug JENKINS-41375
JobConfigHistory fails to revert
Issue Type: Bug Bug
Assignee: Stefan Brausch
Components: jobconfighistory-plugin
Created: 2017/Jan/24 3:50 PM
Environment: Jenkins 1.634
JobConfigHistory Plugin 2.15
Maven Integration Plugin 2.10
Labels: plugin
Priority: Major Major
Reporter: Antoni Yanev

Hello,

When we try to revert to a previous job configuration we get the following error:
java.io.IOException: Failed to persist config.xml
at hudson.model.AbstractItem.updateByXml(AbstractItem.java:646)
at hudson.model.AbstractItem.updateByXml(AbstractItem.java:625)
at hudson.plugins.jobConfigHistory.JobConfigHistoryProjectAction.doRestore(JobConfigHistoryProjectAction.java:219)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:121)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
at org.kohsuke.stapler.MetaClass$13.dispatch(MetaClass.java:411)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:249)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:123)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:370)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
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: org.xml.sax.SAXException: SAX2 driver class org.apache.xerces.parsers.SAXParser not found
java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
at org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:230)
at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:191)
at jenkins.util.xml.XMLUtils.safeTransform(XMLUtils.java:48)
at hudson.model.AbstractItem.updateByXml(AbstractItem.java:641)
... 78 more
Caused by: java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:430)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:383)
at org.xml.sax.helpers.NewInstance.newInstance(NewInstance.java:82)
at org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:228)
... 81 more

Please advise!

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

antoni.yanev@zetta.bg (JIRA)

unread,
Jan 30, 2017, 3:26:04 AM1/30/17
to jenkinsc...@googlegroups.com
Antoni Yanev commented on Bug JENKINS-41375
 
Re: JobConfigHistory fails to revert

Hello,

Do you happen to have any feedback on this issue?

Best Regards,
Antoni

stefan.brausch@1und1.de (JIRA)

unread,
Jan 30, 2017, 4:27:02 AM1/30/17
to jenkinsc...@googlegroups.com

I can't reproduce the problem.

Did you have the issue only with one job or with different jobs?

Maybe the config file was blocked from another file writer. Maybe you can restart your jenkins instance and try it again?

antoni.yanev@zetta.bg (JIRA)

unread,
Jan 30, 2017, 5:03:02 AM1/30/17
to jenkinsc...@googlegroups.com

We restarted Jenkins last week after the upgrade of the JobConfigHistory plugin to the latest version.
The plugin doesn't work with different jobs.

antoni.yanev@zetta.bg (JIRA)

unread,
Jan 31, 2017, 9:29:01 AM1/31/17
to jenkinsc...@googlegroups.com

Can this be because of user permissions?

stefan.brausch@1und1.de (JIRA)

unread,
Feb 1, 2017, 3:14:01 AM2/1/17
to jenkinsc...@googlegroups.com

The user should have job config permissions.

antoni.yanev@zetta.bg (JIRA)

unread,
Feb 1, 2017, 3:16:01 AM2/1/17
to jenkinsc...@googlegroups.com

Which user does the plugin uses?

stefan.brausch@1und1.de (JIRA)

unread,
Feb 1, 2017, 3:31:03 AM2/1/17
to jenkinsc...@googlegroups.com

Users without the config permissions don't see the restore button. It you see the button, you should have the rights.

Can you give me more information about your OS?
It's possible to change and save the job configs without problems?

antoni.yanev@zetta.bg (JIRA)

unread,
Feb 1, 2017, 3:40:02 AM2/1/17
to jenkinsc...@googlegroups.com

Ok, so it's not the permission, because I can see the button.
The OS is Windows Server 2008 R2.
Yes, the configs are changed and saved without problems.

antoni.yanev@zetta.bg (JIRA)

unread,
Feb 8, 2017, 2:38:01 AM2/8/17
to jenkinsc...@googlegroups.com

Hello,

Do you happen to have any update?
Or if you need some further information?

Best Regards,
Antoni

antoni.yanev@zetta.bg (JIRA)

unread,
Feb 16, 2017, 6:59:01 AM2/16/17
to jenkinsc...@googlegroups.com

Hello,

Do you have any updates?

Best Regards,
Antoni

stefan.brausch@1und1.de (JIRA)

unread,
Feb 16, 2017, 7:08:01 AM2/16/17
to jenkinsc...@googlegroups.com

Looks like a Windows problem but i've only unix and macOS systems. I'm waiting for a colleague with a Windows environment. I will come back from vacation in march.

mail@jochen-fuerbacher.de (JIRA)

unread,
Mar 17, 2017, 10:38:04 AM3/17/17
to jenkinsc...@googlegroups.com

Hello,

I cannot reproduce this issue even on Windows 7. But it looks like there's some problem with the SAX parser.
What Java version are you using?
Do you run Jenkins in an application server? If yes, what application server?

Best regards,
Jochen

This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

mail@jochen-fuerbacher.de (JIRA)

unread,
Mar 17, 2017, 10:39:02 AM3/17/17
to jenkinsc...@googlegroups.com
Change By: Jochen A. Fürbacher
Assignee: Stefan Brausch Jochen A. Fürbacher

antoni.yanev@zetta.bg (JIRA)

unread,
Mar 20, 2017, 4:40:03 AM3/20/17
to jenkinsc...@googlegroups.com

Hi,

There is a Selenium grid hub running on this server.
We are using JDK 8u45.

Best Regards,

Antoni

mail@jochen-fuerbacher.de (JIRA)

unread,
Mar 24, 2017, 8:35:01 AM3/24/17
to jenkinsc...@googlegroups.com

Hello,

I can't also reproduce this issue with running a Selenium grid hub on the same windows machine.

Do you use some special characters (any character except a-z,A-Z,0-9) in your job names?

Best regards,
Jochen

antoni.yanev@zetta.bg (JIRA)

unread,
Mar 24, 2017, 8:38:01 AM3/24/17
to jenkinsc...@googlegroups.com

Hello,

We have some jobs with - . or_ but most of them are just alphanumeric.

Best Regards,
Antoni

mail@jochen-fuerbacher.de (JIRA)

unread,
Mar 24, 2017, 8:47:05 AM3/24/17
to jenkinsc...@googlegroups.com

Ok, that should work.

Have you tried to use JobConfigHistory when the Selenium grid hub is not running? I just want to be sure, that it doesn't have anything to do with it.

antoni.yanev@zetta.bg (JIRA)

unread,
Mar 24, 2017, 9:02:01 AM3/24/17
to jenkinsc...@googlegroups.com

Yes, we have tried doing it without the Selenium grid hub running.

mail@jochen-fuerbacher.de (JIRA)

unread,
Mar 24, 2017, 9:40:01 AM3/24/17
to jenkinsc...@googlegroups.com

Three more things:

  • JobConfigHistory does not only persist changes in job configurations, but also changes in node configurations. Could you try JobConfigHistory on a node?
  • Did you configure JobConfigHistory to use an other directory than the default one or did you even configure JobConfigHistory? (Global jenkins configuration page)
  • I am also wondering about the stack trace you provided. There's the line
    at hudson.plugins.jobConfigHistory.JobConfigHistoryProjectAction.doRestore(JobConfigHistoryProjectAction.java:219)
    

    , however in JobConfigHistory 2.15 there's no method or anything in line 219, as you can see here. Maybe there went something wrong during the upgrade of JobConfigHistory. Can you rollback to the earlier version you installed, try it there and upgrade to the newest version again?

antoni.yanev@zetta.bg (JIRA)

unread,
Mar 24, 2017, 9:46:01 AM3/24/17
to jenkinsc...@googlegroups.com

I cannot test it on the node at the moment.
The JobConfigHistory settings are the default ones.
We had a previous version of JobConfigHistory (2.4) and got the same error, that's why we updated to 2.15.

mail@jochen-fuerbacher.de (JIRA)

unread,
Mar 24, 2017, 10:01:01 AM3/24/17
to jenkinsc...@googlegroups.com

You don't need to test JCH on an existing node. You can create a new dumb slave node (e.g. "Launch slave agents via Java Web Start") that you don't start. Just create and reconfigure such a slave node.

Reply all
Reply to author
Forward
0 new messages