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

Selenium plugin install error after upgrade to Jenkins 2.0

      I was using the Selenium plugin prior to Jenkins 2.0 release without any problems. When I tried to install the Selenium plugin after upgrading to Jenkins 2.0 (now on 2.1) I receive this error:

      java.io.IOException: Failed to dynamically deploy this plugin
      at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1750)
      at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1511)
      at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)
      at java.lang.Thread.run(Unknown Source)
      Caused by: java.nio.file.FileSystemException: C:\Users\tdjenkins\.jenkins\plugins\selenium\WEB-INF\lib\commons-lang3-3.4.jar: The process cannot access the file because it is being used by another process.

      at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
      at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
      at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
      at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source)
      at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(Unknown Source)
      at java.nio.file.Files.deleteIfExists(Unknown Source)
      at hudson.Util.deleteFile(Util.java:260)
      at hudson.Util.deleteRecursive(Util.java:314)
      at hudson.Util.deleteContentsRecursive(Util.java:226)
      at hudson.Util.deleteRecursive(Util.java:305)
      at hudson.Util.deleteContentsRecursive(Util.java:226)
      at hudson.Util.deleteRecursive(Util.java:305)
      at hudson.Util.deleteContentsRecursive(Util.java:226)
      at hudson.Util.deleteRecursive(Util.java:305)
      at hudson.ClassicPluginStrategy.explode(ClassicPluginStrategy.java:602)
      at hudson.ClassicPluginStrategy.createPluginWrapper(ClassicPluginStrategy.java:173)
      at hudson.PluginManager.dynamicLoad(PluginManager.java:697)
      at hudson.PluginManager.dynamicLoad(PluginManager.java:663)
      at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1746)

      It successfully installed in the update center (blue circle) but the plugin wasn't available after restarting. I also tried manually deleting the plugin and reinstalling it no avail.
      Could you provide any insight on whether this is a bug or on how to get around this error?

          [JENKINS-34714] Selenium plugin install error after upgrade to Jenkins 2.0

          It seems like the selenium plugin is already installed and running. Could you try removing the plugin and installing again?

          Rouke Broersma added a comment - It seems like the selenium plugin is already installed and running. Could you try removing the plugin and installing again?

          I have never had this happen when installing the plugin, so honestly I do not know. Perhaps you could try to find out what process is using the file C:\Users\tdjenkins\.jenkins\plugins\selenium\WEB-INF\lib\commons-lang3-3.4.jar and kill that process?

          Rouke Broersma added a comment - I have never had this happen when installing the plugin, so honestly I do not know. Perhaps you could try to find out what process is using the file C:\Users\tdjenkins\.jenkins\plugins\selenium\WEB-INF\lib\commons-lang3-3.4.jar and kill that process?

          The process it was attached to is Java. I tried rebooting the machine and reinstalling the plugin but it didn't work.

          Keegan Caradonna added a comment - The process it was attached to is Java. I tried rebooting the machine and reinstalling the plugin but it didn't work.

          I installed a fresh copy of Jenkins 2.2 locally and installed the Selenium plugin and it worked. I then copied that Selenium plugin folder and pasted it to the plugin folder of the deployed Jenkins instance and restarted Jenkins. This was the error:

          May 10, 2016 1:27:27 PM jenkins.InitReactorRunner$1 onTaskFailed
          SEVERE: Failed Loading plugin selenium
          java.io.IOException: Failed to initialize
          at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:519)
          at hudson.PluginManager$2$1$1.run(PluginManager.java:415)
          at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
          at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
          at jenkins.model.Jenkins$7.runTask(Jenkins.java:996)
          at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
          at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at java.lang.Thread.run(Unknown Source)
          Caused by: java.io.IOException: Unable to read C:\Users\tdjenkins\.jenkins\selenium.xml
          at hudson.XmlFile.unmarshal(XmlFile.java:165)
          at hudson.Plugin.load(Plugin.java:264)
          at hudson.plugins.selenium.PluginImpl.start(PluginImpl.java:141)
          at hudson.ClassicPluginStrategy.startPlugin(ClassicPluginStrategy.java:527)
          at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:516)
          ... 9 more
          Caused by: com.thoughtworks.xstream.converters.ConversionException: null : null
          ---- Debugging information ----
          cause-exception : java.lang.NullPointerException
          cause-message : null
          class : hudson.plugins.selenium.PluginImpl
          required-type : hudson.plugins.selenium.PluginImpl
          converter-type : hudson.util.RobustReflectionConverter
          path : /hudson.plugins.selenium.PluginImpl
          line number : 83
          version : not available
          -------------------------------
          at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:79)
          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:114)
          at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1173)
          at hudson.XmlFile.unmarshal(XmlFile.java:163)
          ... 13 more
          Caused by: java.lang.NullPointerException
          at hudson.diagnosis.OldDataMonitor.report(OldDataMonitor.java:219)
          at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:330)
          at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:229)
          at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
          ... 22 more

          Keegan Caradonna added a comment - I installed a fresh copy of Jenkins 2.2 locally and installed the Selenium plugin and it worked. I then copied that Selenium plugin folder and pasted it to the plugin folder of the deployed Jenkins instance and restarted Jenkins. This was the error: May 10, 2016 1:27:27 PM jenkins.InitReactorRunner$1 onTaskFailed SEVERE: Failed Loading plugin selenium java.io.IOException: Failed to initialize at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:519) at hudson.PluginManager$2$1$1.run(PluginManager.java:415) at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282) at jenkins.model.Jenkins$7.runTask(Jenkins.java:996) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: Unable to read C:\Users\tdjenkins\.jenkins\selenium.xml at hudson.XmlFile.unmarshal(XmlFile.java:165) at hudson.Plugin.load(Plugin.java:264) at hudson.plugins.selenium.PluginImpl.start(PluginImpl.java:141) at hudson.ClassicPluginStrategy.startPlugin(ClassicPluginStrategy.java:527) at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:516) ... 9 more Caused by: com.thoughtworks.xstream.converters.ConversionException: null : null ---- Debugging information ---- cause-exception : java.lang.NullPointerException cause-message : null class : hudson.plugins.selenium.PluginImpl required-type : hudson.plugins.selenium.PluginImpl converter-type : hudson.util.RobustReflectionConverter path : /hudson.plugins.selenium.PluginImpl line number : 83 version : not available ------------------------------- at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:79) 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:114) at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1173) at hudson.XmlFile.unmarshal(XmlFile.java:163) ... 13 more Caused by: java.lang.NullPointerException at hudson.diagnosis.OldDataMonitor.report(OldDataMonitor.java:219) at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:330) at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:229) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72) ... 22 more

          Replacing the existing plugin in this way does not work because there was a configuration change between the last and the current version which makes the old configuration file invalid. That is what is causing the crash now as is shown by this line: Caused by: java.io.IOException: Unable to read C:\Users\tdjenkins\.jenkins\selenium.xml.
          If the plugin update had worked, jenkins would have taken care of this, but because of manually replacing the plugin, the configuration file is not converted to the new format and jenkins fails on loading the configuration.
          If you remove the C:\Users\tdjenkins\.jenkins\selenium.xml file the plugin should load fine, but this does mean having to setup the plugin configuration again.

          Rouke Broersma added a comment - Replacing the existing plugin in this way does not work because there was a configuration change between the last and the current version which makes the old configuration file invalid. That is what is causing the crash now as is shown by this line: Caused by: java.io.IOException: Unable to read C:\Users\tdjenkins\.jenkins\selenium.xml. If the plugin update had worked, jenkins would have taken care of this, but because of manually replacing the plugin, the configuration file is not converted to the new format and jenkins fails on loading the configuration. If you remove the C:\Users\tdjenkins\.jenkins\selenium.xml file the plugin should load fine, but this does mean having to setup the plugin configuration again.

          Thanks mobrockers it worked!

          Keegan Caradonna added a comment - Thanks mobrockers it worked!

          Issue has been fixed for user but might be an unidentified bug underneath, not sure.

          Rouke Broersma added a comment - Issue has been fixed for user but might be an unidentified bug underneath, not sure.

          Some backstory: Issue arose when we upgraded from Jenkins 1.6.* to 2.0. The Selenium plugin failed to install and the only error was logged in jenkins.err. The original error printed was: Caused by: java.io.IOException: Unable to read C:\Users\tdjenkins\.jenkins\selenium.xml

          Keegan Caradonna added a comment - Some backstory: Issue arose when we upgraded from Jenkins 1.6.* to 2.0. The Selenium plugin failed to install and the only error was logged in jenkins.err. The original error printed was: Caused by: java.io.IOException: Unable to read C:\Users\tdjenkins\.jenkins\selenium.xml

            mobrockers Rouke Broersma
            caradonna9 Keegan Caradonna
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: