Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-16266

Graalvm native applications fail with ClassNotFoundException: java.time.ZoneRegion

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 15.1.0.Dev01, 15.0.8.Final
    • None
    • None
    • None

      Protostream 5.0.6.Final added the ZoneIdAdapter to help users marshall the internal java time classes. This adapter uses reflection to allows the marshalling of the internal class java.time.ZoneRegion, which causes the GraalVM core and client-hotrod modules to fail at runtime with the following message:

      [2024-07-04T09:05:27.684Z] Jul 04, 2024 5:05:27 AM org.infinispan.factories.AbstractComponentRegistry componentFailed
      [2024-07-04T09:05:27.684Z] ERROR: ISPN000660: DefaultCacheManager start failed, stopping any running components
      [2024-07-04T09:05:27.684Z] org.infinispan.commons.CacheConfigurationException: ISPN000659: Component ComponentWrapper{name=org.infinispan.marshall.protostream.impl.SerializationContextRegistry, instance=org.infinispan.marshall.protostream.impl.SerializationContextRegistryImpl@119e2b8b, status=FAILED} failed to start
      [2024-07-04T09:05:27.684Z] 	at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:584)
      [2024-07-04T09:05:27.684Z] 	at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:807)
      [2024-07-04T09:05:27.684Z] 	at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:634)
      [2024-07-04T09:05:27.684Z] 	at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:598)
      [2024-07-04T09:05:27.684Z] 	at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:576)
      [2024-07-04T09:05:27.684Z] 	at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:807)
      [2024-07-04T09:05:27.684Z] 	at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:634)
      [2024-07-04T09:05:27.684Z] 	at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:598)
      [2024-07-04T09:05:27.684Z] 	at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:576)
      [2024-07-04T09:05:27.684Z] 	at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:807)
      [2024-07-04T09:05:27.684Z] 	at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:634)
      [2024-07-04T09:05:27.684Z] 	at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:598)
      [2024-07-04T09:05:27.684Z] 	at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:576)
      [2024-07-04T09:05:27.684Z] 	at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:807)
      [2024-07-04T09:05:27.684Z] 	at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:634)
      [2024-07-04T09:05:27.684Z] 	at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:598)
      [2024-07-04T09:05:27.684Z] 	at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:576)
      [2024-07-04T09:05:27.684Z] 	at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:807)
      [2024-07-04T09:05:27.684Z] 	at org.infinispan.factories.GlobalComponentRegistry.preStart(GlobalComponentRegistry.java:307)
      [2024-07-04T09:05:27.684Z] 	at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:241)
      [2024-07-04T09:05:27.684Z] 	at org.infinispan.manager.DefaultCacheManager.internalStart(DefaultCacheManager.java:778)
      [2024-07-04T09:05:27.684Z] 	at org.infinispan.manager.DefaultCacheManager.start(DefaultCacheManager.java:746)
      [2024-07-04T09:05:27.684Z] 	at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:412)
      [2024-07-04T09:05:27.684Z] 	at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:361)
      [2024-07-04T09:05:27.684Z] 	at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:336)
      [2024-07-04T09:05:27.684Z] 	at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:324)
      [2024-07-04T09:05:27.684Z] 	at org.infinispan.graalvm.EmbeddedTest.xmlConfigTest(EmbeddedTest.java:31)
      [2024-07-04T09:05:27.684Z] 	at java.base@21.0.2/java.lang.reflect.Method.invoke(Method.java:580)
      [2024-07-04T09:05:27.684Z] 	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:728)
      [2024-07-04T09:05:27.684Z] 	at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
      [2024-07-04T09:05:27.684Z] 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
      [2024-07-04T09:05:27.684Z] 	at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
      [2024-07-04T09:05:27.684Z] 	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
      [2024-07-04T09:05:27.684Z] 	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
      [2024-07-04T09:05:27.684Z] 	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
      [2024-07-04T09:05:27.684Z] 	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
      [2024-07-04T09:05:27.684Z] 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
      [2024-07-04T09:05:27.684Z] 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
      [2024-07-04T09:05:27.684Z] 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
      [2024-07-04T09:05:27.684Z] 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
      [2024-07-04T09:05:27.684Z] 	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
      [2024-07-04T09:05:27.684Z] 	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
      [2024-07-04T09:05:27.684Z] 	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:218)
      [2024-07-04T09:05:27.684Z] 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
      [2024-07-04T09:05:27.684Z] 	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:214)
      [2024-07-04T09:05:27.684Z] 	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:139)
      [2024-07-04T09:05:27.684Z] 	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:69)
      [2024-07-04T09:05:27.684Z] 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
      [2024-07-04T09:05:27.684Z] 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
      [2024-07-04T09:05:27.684Z] 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
      [2024-07-04T09:05:27.684Z] 	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
      [2024-07-04T09:05:27.684Z] 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
      [2024-07-04T09:05:27.684Z] 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
      [2024-07-04T09:05:27.684Z] 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
      [2024-07-04T09:05:27.684Z] 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
      [2024-07-04T09:05:27.684Z] 	at java.base@21.0.2/java.util.ArrayList.forEach(ArrayList.java:1596)
      [2024-07-04T09:05:27.684Z] 	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
      [2024-07-04T09:05:27.685Z] 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
      [2024-07-04T09:05:27.685Z] 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
      [2024-07-04T09:05:27.685Z] 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
      [2024-07-04T09:05:27.685Z] 	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
      [2024-07-04T09:05:27.685Z] 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
      [2024-07-04T09:05:27.685Z] 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
      [2024-07-04T09:05:27.685Z] 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
      [2024-07-04T09:05:27.685Z] 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
      [2024-07-04T09:05:27.685Z] 	at java.base@21.0.2/java.util.ArrayList.forEach(ArrayList.java:1596)
      [2024-07-04T09:05:27.685Z] 	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
      [2024-07-04T09:05:27.685Z] 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
      [2024-07-04T09:05:27.685Z] 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
      [2024-07-04T09:05:27.685Z] 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
      [2024-07-04T09:05:27.685Z] 	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
      [2024-07-04T09:05:27.685Z] 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
      [2024-07-04T09:05:27.685Z] 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
      [2024-07-04T09:05:27.685Z] 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
      [2024-07-04T09:05:27.685Z] 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
      [2024-07-04T09:05:27.685Z] 	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
      [2024-07-04T09:05:27.685Z] 	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
      [2024-07-04T09:05:27.685Z] 	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
      [2024-07-04T09:05:27.685Z] 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:198)
      [2024-07-04T09:05:27.685Z] 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:169)
      [2024-07-04T09:05:27.685Z] 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:93)
      [2024-07-04T09:05:27.685Z] 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:58)
      [2024-07-04T09:05:27.685Z] 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:141)
      [2024-07-04T09:05:27.685Z] 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:57)
      [2024-07-04T09:05:27.685Z] 	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:103)
      [2024-07-04T09:05:27.685Z] 	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:94)
      [2024-07-04T09:05:27.685Z] 	at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:52)
      [2024-07-04T09:05:27.685Z] 	at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:70)
      [2024-07-04T09:05:27.685Z] 	at org.graalvm.junit.platform.NativeImageJUnitLauncher.execute(NativeImageJUnitLauncher.java:74)
      [2024-07-04T09:05:27.685Z] 	at org.graalvm.junit.platform.NativeImageJUnitLauncher.main(NativeImageJUnitLauncher.java:129)
      [2024-07-04T09:05:27.685Z] 	at java.base@21.0.2/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)
      [2024-07-04T09:05:27.685Z] Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: java.time.ZoneRegion
      [2024-07-04T09:05:27.685Z] 	at org.infinispan.protostream.impl.SerializationContextImpl.classForName(SerializationContextImpl.java:296)
      [2024-07-04T09:05:27.685Z] 	at java.base@21.0.2/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
      [2024-07-04T09:05:27.685Z] 	at java.base@21.0.2/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:1024)
      [2024-07-04T09:05:27.685Z] 	at java.base@21.0.2/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
      [2024-07-04T09:05:27.685Z] 	at java.base@21.0.2/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      [2024-07-04T09:05:27.685Z] 	at java.base@21.0.2/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575)
      [2024-07-04T09:05:27.685Z] 	at java.base@21.0.2/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260)
      [2024-07-04T09:05:27.685Z] 	at java.base@21.0.2/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616)
      [2024-07-04T09:05:27.685Z] 	at org.infinispan.protostream.impl.SerializationContextImpl.registerMarshaller(SerializationContextImpl.java:255)
      [2024-07-04T09:05:27.685Z] 	at org.infinispan.protostream.types.java.CommonTypesSchema.registerMarshallers(CommonTypesSchema.java:85)
      [2024-07-04T09:05:27.685Z] 	at org.infinispan.marshall.protostream.impl.SerializationContextRegistryImpl.register(SerializationContextRegistryImpl.java:124)
      [2024-07-04T09:05:27.685Z] 	at org.infinispan.marshall.protostream.impl.SerializationContextRegistryImpl$MarshallerContext.addContextInitializer(SerializationContextRegistryImpl.java:134)
      [2024-07-04T09:05:27.685Z] 	at org.infinispan.marshall.protostream.impl.SerializationContextRegistryImpl.start(SerializationContextRegistryImpl.java:46)
      [2024-07-04T09:05:27.685Z] 	at org.infinispan.marshall.protostream.impl.CorePackageImpl$2.start(CorePackageImpl.java:51)
      [2024-07-04T09:05:27.685Z] 	at org.infinispan.marshall.protostream.impl.CorePackageImpl$2.start(CorePackageImpl.java:44)
      [2024-07-04T09:05:27.685Z] 	at org.infinispan.factories.impl.BasicComponentRegistryImpl.invokeStart(BasicComponentRegistryImpl.java:616)
      [2024-07-04T09:05:27.685Z] 	at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:607)
      [2024-07-04T09:05:27.685Z] 	at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:576)
      [2024-07-04T09:05:27.685Z] 	... 90 more
      [2024-07-04T09:05:27.685Z] Caused by: java.lang.ClassNotFoundException: java.time.ZoneRegion
      [2024-07-04T09:05:27.685Z] 	at org.graalvm.nativeimage.builder/com.oracle.svm.core.hub.ClassForNameSupport.forName(ClassForNameSupport.java:122)
      [2024-07-04T09:05:27.685Z] 	at org.graalvm.nativeimage.builder/com.oracle.svm.core.hub.ClassForNameSupport.forName(ClassForNameSupport.java:86)
      [2024-07-04T09:05:27.685Z] 	at java.base@21.0.2/java.lang.Class.forName(DynamicHub.java:1356)
      [2024-07-04T09:05:27.685Z] 	at java.base@21.0.2/java.lang.Class.forName(DynamicHub.java:1319)
      [2024-07-04T09:05:27.685Z] 	at java.base@21.0.2/java.lang.Class.forName(DynamicHub.java:1312)
      [2024-07-04T09:05:27.685Z] 	at org.infinispan.protostream.impl.SerializationContextImpl.classForName(SerializationContextImpl.java:294)
      [2024-07-04T09:05:27.685Z] 	... 107 more
      

              remerson@redhat.com Ryan Emerson
              remerson@redhat.com Ryan Emerson
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: