"configure" fails with major.minor version issue

瀏覽次數:21 次
跳到第一則未讀訊息

GI D

未讀,
2021年7月12日 上午9:30:532021/7/12
收件者:Jenkins Users
On a copied installation of Jenkins 1.609 to a new server, I notice that when I select a build and click "configure", I get a greyed-out config page with "LOADING" as a watermark that never goes away. At the same time I see in catalina.out lots of errors such as this:

Jul 12, 2021 4:15:20 PM hudson.ExpressionFactory2$JexlExpression evaluate
WARNING: Caught exception evaluating: d.helpFile in /jenkins/job/platform%20set%20branch%20name/configure. Reason: jav
a.lang.reflect.InvocationTargetException
....
....
Caused by: java.lang.UnsupportedClassVersionError: org/jenkinsci/plugins/scriptsecurity/sandbox/RejectedAccessException : Unsupported major.minor version 52.0


I think the reason is that, for a few days, I was running the new Jenkins with a slightly newer Java version (1.6.0_41 rather than 1.6.0_30). Now I have made sure I run it with _30. During this short period this particular build has been executed a few times. However I do get the same problem on other builds that have not executed on this new server.

Almost all errors (or warnings if you will) are about the script-security plugin.

Please advise.

- George

GI D

未讀,
2021年7月12日 上午10:33:202021/7/12
收件者:Jenkins Users
Let me add that the system property java.class.version  on both servers new (source and copy) has the value 50.0

So it seems I need to get rid of all 52.0 stuff.
訊息已遭刪除

Ivan Fernandez Calvo

未讀,
2021年7月12日 中午12:25:522021/7/12
收件者:Jenkins Users

the Java 6 version you are using is EOL since 2013 (see https://en.wikipedia.org/wiki/Java_version_history) and your Jenkins version was released in 2015 (see https://www.jenkins.io/changelog-stable/#v1.609.3) so I don't know if that version can run on Java 6, I dunno why you are trying to use something old and with tons of issues resolved in the latest version on an outdated and without support Java version, but sounds like a no-good idea.

GI D

未讀,
2021年7月12日 下午2:21:512021/7/12
收件者:Jenkins Users
On our current production server we run 1.609 with Java 1.6. It is very very old but it's not my decision to upgrade it, it's the Dev Team's. This version and this Java are indeed compatible, Jenkins runs fine on our current server.

I therefore need to revert to 1.6 anything that has, inadvertently, gone to 1.8. Please help me with that.  To start with, am I running into 1.8 plugins, or 1.8 artifacts?

Some sites suggest that this is a browser/Javascript issue. I'm at a loss.

Ivan Fernandez Calvo

未讀,
2021年7月12日 下午3:11:032021/7/12
收件者:Jenkins Users
I guess you update some plugins one of those plugins is the script security plugin, which in the version you update works on Jenkins 1.609 but does not support Java 6. I will tell you that the faster solution is to restore the plugins folder from a backup that you have before the changes on the plugins, if you do not have that backup you have to review all hpi files in the plugins folder, and check the file MANIFEST.MF inside the hip file, it is a zip, in that manifest, you have to check the value in "Minimum-Java-Version:", all the plugins that require 1.8 are not valid for your installation. But again you have a security clock boom on that instance a Java version from 2013 and a Jenkins core from 2015.

GI D

未讀,
2021年7月13日 下午2:27:592021/7/13
收件者:Jenkins Users
I downgraded script-security to a version that runs in 1.6 and the problem is now fixed. Thanks for your help!

Harry G.

未讀,
2021年7月14日 上午9:14:542021/7/14
收件者:Jenkins Users
Hi Bob,

we also have legacy projects where developers still need Java 1.6.
But maybe there is a misunderstanding, you don't need to run Jenkins istself under that version then, even not the agents.
You just need to have a JDK1.6 somewhere available on your agent and configred as tool for your agent, then select this JDK in the build job/pipeline script.

Harald
回覆所有人
回覆作者
轉寄
0 則新訊息