jenkins-gitlab-hook-plugin icon indicating copy to clipboard operation
jenkins-gitlab-hook-plugin copied to clipboard

unsupported Java version: 11

Open shah-sid opened this issue 5 years ago • 9 comments

Jenkins version - 2.164.2 Gitlab-Hook Plugin version - 1.4.2 Ruby-Runtime version 0.13

Trying to install gitlab-hook plugin in jenkins, while installing ruby-runtime it throws error

java.lang.RuntimeException: unsupported Java version: 11 at org.jruby.RubyInstanceConfig.initGlobalJavaVersion(RubyInstanceConfig.java:1674) at org.jruby.RubyInstanceConfig.<clinit>(RubyInstanceConfig.java:1387) Caused: java.lang.ExceptionInInitializerError at org.jruby.embed.internal.AbstractLocalContextProvider.<init>(AbstractLocalContextProvider.java:42)

Tried installing Ruby-runtime plugin too but same error. Please look into it.

Thanks

Screenshot from 2019-05-09 11-32-52

shah-sid avatar May 09 '19 06:05 shah-sid

stay tuned

Lim-LinYuanbo avatar May 01 '20 07:05 Lim-LinYuanbo

Hi, I solved it by changing java version to 8th. Maybe there is a problem with java 11 compatibility issues. https://www.jenkins.io/doc/administration/requirements/jenkins-on-java-11/

zhumabek avatar May 02 '20 22:05 zhumabek

Hi, I solved it by changing java version to 8th. Maybe there is a problem with java 11 compatibility issues. https://www.jenkins.io/doc/administration/requirements/jenkins-on-java-11/

Thanks.

yuanzhiying avatar Aug 20 '20 01:08 yuanzhiying

Hello everyone! I still have the same issue with java 11. The compatibility issue still persists on my side I am using Ubuntu 20.04. Any fix available? PS: It's mandatory for my project that I work with java 11.

Offliner21 avatar Feb 11 '21 11:02 Offliner21

Hi, I solved it by changing java version to 8th. Maybe there is a problem with java 11 compatibility issues. https://www.jenkins.io/doc/administration/requirements/jenkins-on-java-11/

How can switch the JVM version to Java 8. I'm using MAC OS Big SUR. Running Jenkins without Docker and just starting with these tools. Please help. @yuanzhiying @zhumabek

InfiniteDreamz avatar Feb 13 '21 05:02 InfiniteDreamz

This is the manual solution I think I found. (may not, but this is works to me)

Jenkins version - 2.277.1 OS - Mac os : catalina

First, enter this into the terminal

vi /usr/local/Cellar/jenkins/2.x.x/homebrew.mxcl.jenkins.plist

(2.x.x is 2.277.1 for me.)

Then you will see this.

   <?xml version="1.0" encoding="UTF-8"?>
   <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
   <plist version="1.0">
     <dict>
       <key>Label</key>
       <string>homebrew.mxcl.jenkins-lts</string>
       <key>ProgramArguments</key>
       <array>
         **<string>/usr/local/opt/openjdk@11/bin/java</string>**
         <string>-Dmail.smtp.starttls.enable=true</string>
         <string>-jar</string>
         <string>/usr/local/opt/jenkins-lts/libexec/jenkins.war</string>
         <string>--httpListenAddress=0.0.0.0</string>
         <string>--httpPort=8080</string>
       </array>
       <key>RunAtLoad</key>
       <true/>
     </dict>
   </plist>
     **<string>/usr/local/opt/openjdk@11/bin/java</string>**

change here like this

   <?xml version="1.0" encoding="UTF-8"?>
   <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
   <plist version="1.0">
     <dict>
       <key>Label</key>
       <string>homebrew.mxcl.jenkins-lts</string>
       <key>ProgramArguments</key>
       <array>
         **<string>/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java</string>**
         <string>-Dmail.smtp.starttls.enable=true</string>
         <string>-jar</string>
         <string>/usr/local/opt/jenkins-lts/libexec/jenkins.war</string>
         <string>--httpListenAddress=0.0.0.0</string>
         <string>--httpPort=8080</string>
       </array>
       <key>RunAtLoad</key>
       <true/>
     </dict>
   </plist>

Then restart brew services Now ruby-runtime should work normally, I write it down hoping it will help someone.

FineRoot1253 avatar Apr 16 '21 02:04 FineRoot1253

has ** ?

chunta avatar Jun 12 '21 17:06 chunta

has ** ?

@chunta What does ** mean?

FineRoot1253 avatar Jun 14 '21 07:06 FineRoot1253

I have solved this problem refer to @JunGeunHong1129 Pay attention to two points:

  1. none **
  2. Use shortcut keys(command+Option+C) to obtain the path

zhyafe avatar Sep 15 '21 08:09 zhyafe