• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • Jenkins 1.634
      JobConfigHistory Plugin 2.15
      Maven Integration Plugin 2.10

      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!

          [JENKINS-41375] JobConfigHistory fails to revert

          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.

          Stefan Brausch added a comment - 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.

          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

          Jochen A. Fürbacher added a comment - 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

          Antoni Yanev added a comment -

          Hi,

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

          Best Regards,

          Antoni

          Antoni Yanev added a comment - Hi, There is a Selenium grid hub running on this server. We are using JDK 8u45. Best Regards, Antoni

          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

          Jochen A. Fürbacher added a comment - 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 added a comment -

          Hello,

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

          Best Regards,
          Antoni

          Antoni Yanev added a comment - Hello, We have some jobs with - . or_ but most of them are just alphanumeric. Best Regards, Antoni

          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.

          Jochen A. Fürbacher added a comment - 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 added a comment -

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

          Antoni Yanev added a comment - Yes, we have tried doing it without the Selenium grid hub running.

          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?

          Jochen A. Fürbacher added a comment - 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 added a comment -

          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.

          Antoni Yanev added a comment - 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.

          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.

          Jochen A. Fürbacher added a comment - 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.

            jochenafuerbacher Jochen A. Fürbacher
            antoniy Antoni Yanev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: