Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support running on Java 17 #1042

Closed
timja opened this issue Mar 2, 2023 · 7 comments
Closed

Support running on Java 17 #1042

timja opened this issue Mar 2, 2023 · 7 comments

Comments

@timja
Copy link
Member

timja commented Mar 2, 2023

What feature do you want to see added?

Java 17 support

Upstream changes

I was trying to upgrade the media library to possibly fix #1041
But the new version on central only works with Java 17.

Trying to upgrade to Java 17 (just to see if it works, not to require 17 in this project yet) hits:

java.lang.IllegalAccessError: class com.cloudbees.sdk.extensibility.AnnotationLiteral (in unnamed module @0x33833882) cannot access class sun.reflect.annotation.AnnotationParser (in module java.base) because module java.base does not export sun.reflect.annotation to unnamed module @0x33833882

	at com.cloudbees.sdk.extensibility.AnnotationLiteral.of(AnnotationLiteral.java:49)
	at com.cloudbees.sdk.extensibility.AnnotationLiteral.of(AnnotationLiteral.java:45)
	at com.cloudbees.sdk.extensibility.AnnotationLiteral.of(AnnotationLiteral.java:41)
	at com.cloudbees.sdk.extensibility.ExtensionLoaderModule$Default.configure(ExtensionLoaderModule.java:86)
	at com.google.inject.AbstractModule.configure(AbstractModule.java:66)
	at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:409)
	at com.google.inject.AbstractModule.install(AbstractModule.java:108)
	at com.cloudbees.sdk.extensibility.ExtensionFinder.bind(ExtensionFinder.java:76)
	at com.cloudbees.sdk.extensibility.ExtensionFinder.configure(ExtensionFinder.java:60)
	at com.google.inject.AbstractModule.configure(AbstractModule.java:66)
	at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:409)
	at com.google.inject.spi.Elements.getElements(Elements.java:108)
	at com.google.inject.util.Modules$OverrideModule.configure(Modules.java:236)
	at com.google.inject.AbstractModule.configure(AbstractModule.java:66)
	at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:409)
	at com.google.inject.spi.Elements.getElements(Elements.java:108)
	at com.google.inject.util.Modules$OverrideModule.configure(Modules.java:213)
	at com.google.inject.AbstractModule.configure(AbstractModule.java:66)
	at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:409)
	at com.google.inject.AbstractModule.install(AbstractModule.java:108)
	at org.jenkinsci.test.acceptance.guice.World.configure(World.java:86)
	at com.google.inject.AbstractModule.configure(AbstractModule.java:66)
	at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:409)
	at com.google.inject.spi.Elements.getElements(Elements.java:108)
	at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:160)
	at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
	at com.google.inject.Guice.createInjector(Guice.java:87)
	at com.google.inject.Guice.createInjector(Guice.java:69)
	at com.google.inject.Guice.createInjector(Guice.java:59)
	at org.jenkinsci.test.acceptance.guice.World.getInjector(World.java:45)
	at org.jenkinsci.test.acceptance.junit.JenkinsAcceptanceTestRule$1.evaluate(JenkinsAcceptanceTestRule.java:49)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
	at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)

Which appears to be an archived CloudBees project:
https://github.com/cloudbees/extensibility-api

@NotMyFault
Copy link
Member

The repo is archived for more than 4 years. Can we migrate to Guice or drop them on our end? It doesn't look like the repo is getting any updates anytime soon.

@timja
Copy link
Member Author

timja commented Apr 2, 2023

Probably, I didn't spend too long on it after I hit this problem, but recorded where I got to for future efforts.

@basil
Copy link
Member

basil commented Apr 25, 2023

I put in an internal ticket and got this transferred to https://github.com/jenkinsci-transfer/extensibility-api

@timja Can you transfer this to jenkinsci and unarchive it? I can handle the RPU side of things.

@timja
Copy link
Member Author

timja commented Apr 25, 2023

Done

@basil
Copy link
Member

basil commented Apr 25, 2023

After #1122 and #1123 there are only six (6) test failures:

  • plugins.AntPluginTest.testAdvancedConfiguration
  • plugins.GroovyPluginTest.run_groovy
  • plugins.GroovyPluginTest.use_custom_groovy_version
  • plugins.JacocoPluginTest.checkSuccessfulExecutionAndsummary
  • plugins.PipelineTest.testCompletePipeline
  • plugins.WorkflowPluginTest.parallelTests

I will leave it to the maintainers of this repository to investigate these.

@jtnord
Copy link
Member

jtnord commented May 22, 2023

BTW - to test Jenkins (rather than the ATH framework) on different JDKS just set JENKINS_JAVA_HOME to the JDK you want to run Jenkins with. ref

@basil
Copy link
Member

basil commented Jun 20, 2023

Fixed in #1241

@basil basil closed this as completed Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants