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

FATAL: Could not initialize class hudson.util.ProcessTree$UnixReflection

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • Jenkins 2.144

      Intermittently I keep getting failed build status due to the following repeated error log. Note that this is not consistent behaviour. I will get a few builds completely successful triggered on a merge request to my Git repo and then a following build job would fail with the reported issue.
      java.lang.NoClassDefFoundError: Could not initialize class hudson.util.ProcessTree$UnixReflection*08:12:19* at hudson.util.ProcessTree$UnixProcess.kill(ProcessTree.java:647)08:12:19 at hudson.util.ProcessTree$UnixProcess.killRecursively(ProcessTree.java:668)08:12:19 at hudson.util.ProcessTree$Unix.killAll(ProcessTree.java:589)08:12:19 at hudson.Launcher$LocalLauncher.kill(Launcher.java:949)08:12:19 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:496)08:12:19 at hudson.model.Run.execute(Run.java:1735)08:12:19 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)08:12:19 at hudson.model.ResourceController.execute(ResourceController.java:97)08:12:19 at hudson.model.Executor.run(Executor.java:415)

          [JENKINS-46523] FATAL: Could not initialize class hudson.util.ProcessTree$UnixReflection

          Aviv Yam added a comment -

          I had the same issue. soled it by downgrading java from 1.9 to 1.8u45

          Aviv Yam added a comment - I had the same issue. soled it by downgrading java from 1.9 to 1.8u45

          Larry Schiefer added a comment - - edited

          Seeing the same thing on Mac OS X High Sierra (10.13.1) running Java 1.9 (build 9_181):

          $ java -version
          java version "9"
          Java(TM) SE Runtime Environment (build 9+181)
          Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)
          

          This happens whenever the shell is used to execute other processes, such as fastlane to build iOS apps, which in turn calls xcode.

          I downgraded Java to 1.8u144 and was able to build.

          Larry Schiefer added a comment - - edited Seeing the same thing on Mac OS X High Sierra (10.13.1) running Java 1.9 (build 9_181): $ java -version java version "9" Java(TM) SE Runtime Environment (build 9+181) Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode) This happens whenever the shell is used to execute other processes, such as fastlane to build iOS apps, which in turn calls xcode . I downgraded Java to 1.8u144 and was able to build.

          Daniel Heid added a comment -

          This is not a plugin specific problem, but depends on Jenkins overall Java 9 compatibility. Closing this ticket. You can reopen it, if the problems still occurs after https://issues.jenkins-ci.org/browse/JENKINS-40689 has been solved.

          Daniel Heid added a comment - This is not a plugin specific problem, but depends on Jenkins overall Java 9 compatibility. Closing this ticket. You can reopen it, if the problems still occurs after https://issues.jenkins-ci.org/browse/JENKINS-40689 has been solved.

          Oleg Nenashev added a comment -

          The issue is still there. I see it in Java 11 tests

           

          Oleg Nenashev added a comment - The issue is still there. I see it in Java 11 tests  

          Oleg Nenashev added a comment -

          I'll take it

          Oleg Nenashev added a comment - I'll take it

          I have the same issue with java 11.

          timur suleimanov added a comment - I have the same issue with java 11.

          Arun Prasad added a comment -

          I also faced this issue intermittently. But, the no. of occurrences of failure is really high compared to success. Adding a sleep of 4 minutes at the end of script made it work. Artifactory plugin publishes artifacts after the script finishes. Somehow artifacts are always published, but afterwards, this error happens.

          The issue was not reproducible for iOS build happening on the same slave machine. Only Android build had this issue. So, I did not explore along the line of java version problem mentioned here.

          Arun Prasad added a comment - I also faced this issue intermittently. But, the no. of occurrences of failure is really high compared to success. Adding a sleep of 4 minutes at the end of script made it work. Artifactory plugin publishes artifacts after the script finishes. Somehow artifacts are always published, but afterwards, this error happens. The issue was not reproducible for iOS build happening on the same slave machine. Only Android build had this issue. So, I did not explore along the line of java version problem mentioned here.

          Gautam Das added a comment - - edited

          Hi oleg_nenashev arunp1990 I am still facing this issue quite frequently while running a Jenkins Maven Project. Not sure how to resolve it. I tried all the steps mentioned in above comments but none of them worked.

          Below are few other details:-

          Java Version - 1.8.0_231

          Jenkins Version - 2.235.1

          Please do let me know if any further info is required.

          Gautam Das added a comment - - edited Hi oleg_nenashev arunp1990  I am still facing this issue quite frequently while running a Jenkins Maven Project. Not sure how to resolve it. I tried all the steps mentioned in above comments but none of them worked. Below are few other details:- Java Version - 1.8.0_231 Jenkins Version - 2.235.1 Please do let me know if any further info is required.

            oleg_nenashev Oleg Nenashev
            bitmaven Salman Ahmad
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: