airsonic / airsonic

:satellite: :cloud: :notes:Airsonic, a Free and Open Source community driven media server (fork of Subsonic and Libresonic)
https://airsonic.github.io
GNU General Public License v3.0
2k stars 234 forks source link

Fails to start with OpenJDK 14, java.base does not "exports jdk.internal" #1600

Open psa opened 4 years ago

psa commented 4 years ago

Problem description

Fails to start with OpenJDK 14 with java.lang.reflect.InaccessibleObjectException: Unable to make field public static final jdk.internal.PreviewFeature$Feature jdk.internal.PreviewFeature$Feature.TEXT_BLOCKS accessible: module java.base does not "exports jdk.internal"

Steps to reproduce

Install OpenJDK 14

java '-Dairsonic.home=/path/to/music' '-Dserver.context-path=/audio' '-Dserver.address=127.0.0.1' '-Dserver.port=4040' -Xmx512m '-Djava.awt.headless=true' -jar /usr/local/bin/airsonic.war

System information

Additional notes

Works fine with OpenJDK 13

The full Stack:

2020-04-03 03:21:08.689 INFO --- org.airsonic.player.Application : Starting Application v10.5.0-RELEASE on redacted with PID 56529 (/usr/local/bin/airsonic.war started by airsonic in redacted) 2020-04-03 03:21:08.693 INFO --- org.airsonic.player.Application : The following profiles are active: legacy 2020-04-03 03:21:10.543 ERROR --- o.s.boot.SpringApplication : Application startup failed

java.lang.reflect.InaccessibleObjectException: Unable to make field public static final jdk.internal.PreviewFeature$Feature jdk.internal.PreviewFeature$Feature.TEXT_BLOCKS accessible: module java.base does not "exports jdk.internal" to unnamed module @580871f3 at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:349) ~[na:na] at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:289) ~[na:na] at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:174) ~[na:na] at java.base/java.lang.reflect.Field.setAccessible(Field.java:168) ~[na:na] at org.springframework.util.ReflectionUtils.makeAccessible(ReflectionUtils.java:444) ~[spring-core-4.3.25.RELEASE.jar!/:4.3.25.RELEASE] at org.springframework.core.type.classreading.AbstractRecursiveAnnotationVisitor.getEnumValue(AbstractRecursiveAnnotationVisitor.java:84) ~[spring-core-4.3.25.RELEASE.jar!/:4.3.25.RELEASE] at org.springframework.core.type.classreading.AbstractRecursiveAnnotationVisitor.visitEnum(AbstractRecursiveAnnotationVisitor.java:74) ~[spring-core-4.3.25.RELEASE.jar!/:4.3.25.RELEASE] at org.springframework.asm.ClassReader.readAnnotationValue(ClassReader.java:2087) ~[spring-core-4.3.25.RELEASE.jar!/:4.3.25.RELEASE] at org.springframework.asm.ClassReader.readAnnotationValues(ClassReader.java:2012) ~[spring-core-4.3.25.RELEASE.jar!/:4.3.25.RELEASE] at org.springframework.asm.ClassReader.readMethod(ClassReader.java:1130) ~[spring-core-4.3.25.RELEASE.jar!/:4.3.25.RELEASE] at org.springframework.asm.ClassReader.accept(ClassReader.java:729) ~[spring-core-4.3.25.RELEASE.jar!/:4.3.25.RELEASE] at org.springframework.asm.ClassReader.accept(ClassReader.java:527) ~[spring-core-4.3.25.RELEASE.jar!/:4.3.25.RELEASE] at org.springframework.core.type.classreading.SimpleMetadataReader.(SimpleMetadataReader.java:64) ~[spring-core-4.3.25.RELEASE.jar!/:4.3.25.RELEASE] at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:102) ~[spring-core-4.3.25.RELEASE.jar!/:4.3.25.RELEASE] at org.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory.createMetadataReader(ConcurrentReferenceCachingMetadataReaderFactory.java:87) ~[spring-boot-1.5.22.RELEASE.jar!/:1.5.22.RELEASE] at org.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory.getMetadataReader(ConcurrentReferenceCachingMetadataReaderFactory.java:74) ~[spring-boot-1.5.22.RELEASE.jar!/:1.5.22.RELEASE] at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80) ~[spring-core-4.3.25.RELEASE.jar!/:4.3.25.RELEASE] at org.springframework.context.annotation.ConfigurationClassUtils.checkConfigurationClassCandidate(ConfigurationClassUtils.java:100) ~[spring-context-4.3.25.RELEASE.jar!/:4.3.25.RELEASE] at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:334) ~[spring-context-4.3.25.RELEASE.jar!/:4.3.25.RELEASE] at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:228) ~[spring-context-4.3.25.RELEASE.jar!/:4.3.25.RELEASE] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:272) ~[spring-context-4.3.25.RELEASE.jar!/:4.3.25.RELEASE] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:92) ~[spring-context-4.3.25.RELEASE.jar!/:4.3.25.RELEASE] at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:687) ~[spring-context-4.3.25.RELEASE.jar!/:4.3.25.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:524) ~[spring-context-4.3.25.RELEASE.jar!/:4.3.25.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:123) ~[spring-boot-1.5.22.RELEASE.jar!/:1.5.22.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:666) ~[spring-boot-1.5.22.RELEASE.jar!/:1.5.22.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:353) ~[spring-boot-1.5.22.RELEASE.jar!/:1.5.22.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:300) ~[spring-boot-1.5.22.RELEASE.jar!/:1.5.22.RELEASE] at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:135) ~[spring-boot-1.5.22.RELEASE.jar!/:1.5.22.RELEASE] at org.airsonic.player.Application.main(Application.java:221) ~[classes!/:10.5.0-RELEASE] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na] at java.base/java.lang.reflect.Method.invoke(Method.java:564) ~[na:na] at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) ~[airsonic.war:10.5.0-RELEASE] at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) ~[airsonic.war:10.5.0-RELEASE] at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) ~[airsonic.war:10.5.0-RELEASE] at org.springframework.boot.loader.WarLauncher.main(WarLauncher.java:59) ~[airsonic.war:10.5.0-RELEASE]

randomnicode commented 4 years ago

This is likely an issue due to Airsonic using old tech and libraries.

You can either switch to airsonic-advanced, or alternatively wait for someone to upgrade the Spring libraries to the modern age (which might take a year or so since it isn't even on the roadmap for the upcoming release)

fxthomas commented 4 years ago

I would like to point out that it is on the roadmap for the next release after 10.6: https://github.com/airsonic/airsonic/milestone/3.

randomnicode commented 4 years ago

Right, as I stated, not on the roadmap for the next release (10.6.0): https://github.com/airsonic/airsonic/milestone/6

It is on the roadmap for the release after the next release (11.0).

But gauging from the past release history and times between successive releases, you'll be waiting for a while, given that even the next release (10.6.0) hasn't happened yet, much less the one after that (11.0), and there is usually a significant time period between releases (and no timelines or dev rhythms for them either)

tesshucom commented 4 years ago

LTS is Java 17 after Java 11, right? At the moment, No need to rush.

Related to #1618.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.