Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-5488

Can't create or modify jobs with jobConfigHistory plugin testing with "mvn hpi:run"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • Mac OS X 10.5.8, 4GB RAM, Java 1.6.
      Firefox 3.5.7
      Also seen on red-hat linux running jdk 1.6.
      Also seen on Windows XP running jdk 1.6.
      Also seen on MacOSX 10.6.6 running jdk 1.6

      I am running the jobConfigHistory plugin with mvn hpi:run from within IntelliJ IDEA 9.
      I cannot create a new job or modify an existing job; I get a 500 error every time.
      To reproduce:
      1) Run with mvn hpi:run
      2) go to http://localhost:8080/view/All/newJob
      3) enter a unique job name
      4) click "Build a free-style software project"
      5) click OK

      My browser then goes to http://localhost:8080/view/All/createItem
      and contains this stack trace (there's more bug report after the stack trace):

      HTTP ERROR: 500

      Operation Changed on noon36 did not succeed

      RequestURI=/view/All/createItem
      Caused by:

      java.lang.RuntimeException: Operation Changed on noon36 did not succeed
      at hudson.plugins.jobConfigHistory.ConfigHistoryListenerHelper.createNewHistoryEntry(ConfigHistoryListenerHelper.java:123)
      at hudson.plugins.jobConfigHistory.JobConfigHistorySaveableListener.onChange(JobConfigHistorySaveableListener.java:27)
      at hudson.model.listeners.SaveableListener.fireOnChange(SaveableListener.java:80)
      at hudson.model.AbstractItem.save(AbstractItem.java:220)
      at hudson.model.Hudson.createProject(Hudson.java:1975)
      at hudson.model.Hudson.createProject(Hudson.java:1952)
      at hudson.model.Hudson.doCreateItem(Hudson.java:2518)
      at hudson.model.AllView.doCreateItem(AllView.java:73)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:185)
      at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:101)
      at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:54)
      at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:74)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:492)
      at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:180)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:492)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:408)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:117)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1074)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:94)
      at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:86)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
      at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
      at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
      at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
      at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
      at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
      at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
      at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
      at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
      at org.mortbay.jetty.Server.handle(Server.java:285)
      at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
      at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:765)
      at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:628)
      at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
      at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
      at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
      Caused by: java.io.IOException: Failed to detect encoding of /Users/bshine/src/os-hudson/plugins/jobConfigHistory/./work/jobs/noon36/config.xml
      at hudson.XmlFile.sniffEncoding(XmlFile.java:272)
      at hudson.XmlFile.readRaw(XmlFile.java:197)
      at hudson.XmlFile.writeRawTo(XmlFile.java:214)
      at hudson.XmlFile.asString(XmlFile.java:205)
      at hudson.plugins.jobConfigHistory.ConfigHistoryListenerHelper.createNewHistoryEntry(ConfigHistoryListenerHelper.java:103)
      ... 50 more

      Caused by:

      java.io.IOException: Failed to detect encoding of /Users/bshine/src/os-hudson/plugins/jobConfigHistory/./work/jobs/noon36/config.xml
      at hudson.XmlFile.sniffEncoding(XmlFile.java:272)
      at hudson.XmlFile.readRaw(XmlFile.java:197)
      at hudson.XmlFile.writeRawTo(XmlFile.java:214)
      at hudson.XmlFile.asString(XmlFile.java:205)
      at hudson.plugins.jobConfigHistory.ConfigHistoryListenerHelper.createNewHistoryEntry(ConfigHistoryListenerHelper.java:103)
      at hudson.plugins.jobConfigHistory.JobConfigHistorySaveableListener.onChange(JobConfigHistorySaveableListener.java:27)
      at hudson.model.listeners.SaveableListener.fireOnChange(SaveableListener.java:80)
      at hudson.model.AbstractItem.save(AbstractItem.java:220)
      at hudson.model.Hudson.createProject(Hudson.java:1975)
      at hudson.model.Hudson.createProject(Hudson.java:1952)
      at hudson.model.Hudson.doCreateItem(Hudson.java:2518)
      at hudson.model.AllView.doCreateItem(AllView.java:73)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:185)
      at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:101)
      at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:54)
      at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:74)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:492)
      at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:180)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:492)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:408)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:117)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1074)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:94)
      at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:86)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
      at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
      at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
      at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
      at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
      at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
      at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
      at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
      at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
      at org.mortbay.jetty.Server.handle(Server.java:285)
      at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
      at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:765)
      at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:628)
      at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
      at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
      at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)

      Powered by Jetty://
      ...
      After doing this, while the browser is still on the 500 page, I examine the file on disk:
      ~/src/os-hudson/hudson/main $ ls -l /Users/bshine/src/os-hudson/plugins/jobConfigHistory/./work/jobs/noon36/config.xml
      rw-rr- 1 bshine users 406 Feb 3 12:36 /Users/bshine/src/os-hudson/plugins/jobConfigHistory/./work/jobs/noon36/config.xml

      Actually looking at the contents of the file, it looks reasonable:
      ore /Users/bshine/src/os-hudson/plugins/jobConfigHistory/./work/jobs/noon36/config.xml
      <?xml version='1.0' encoding='UTF-8'?>
      <project>
      <keepDependencies>false</keepDependencies>
      <properties/>
      <scm class="hudson.scm.NullSCM"/>
      <canRoam>false</canRoam>
      <disabled>false</disabled>
      <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
      <triggers class="vector"/>
      <concurrentBuild>false</concurrentBuild>
      <builders/>
      <publishers/>
      <buildWrappers/>
      </project>

      Returning to http://localhost:8080/ the job I just created ("noon36") does not exist in the list of jobs.

            mfriedenhagen Mirko Friedenhagen
            bshine bshine
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: