You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got this error when updating dependencies in my project without regenerating the resource-config.json:
com.oracle.svm.core.util.VMError$HostedError: InternalFeature defined by com.oracle.svm.hosted.ResourcesFeature unexpectedly failed with a(n) java.lang.NullPointerException
at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:86)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.FeatureHandler.handleFeatureError(FeatureHandler.java:287)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:92)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:773)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:592)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:550)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:544)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:726)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.start(NativeImageGeneratorRunner.java:143)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:98)
Caused by: java.lang.NullPointerException
at java.base/java.lang.Class.isAssignableFrom(Native Method)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.jdk.localization.LocalizationFeature.prepareClassResourceBundle(LocalizationFeature.java:547)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.ResourcesFeature$ResourcesRegistryImpl.lambda$addClassBasedResourceBundle$3(ResourcesFeature.java:189)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.ConditionalConfigurationRegistry.registerConditionalConfiguration(ConditionalConfigurationRegistry.java:43)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.ResourcesFeature$ResourcesRegistryImpl.addClassBasedResourceBundle(ResourcesFeature.java:189)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.configure.ResourceConfigurationParser.parseBundle(ResourceConfigurationParser.java:121)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.configure.ResourceConfigurationParser.parseTopLevelObject(ResourceConfigurationParser.java:95)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.configure.ResourceConfigurationParser.parseAndRegister(ResourceConfigurationParser.java:52)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.configure.ConfigurationParser.parseAndRegister(ConfigurationParser.java:73)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.config.ConfigurationParserUtils.doParseAndRegister(ConfigurationParserUtils.java:130)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.config.ConfigurationParserUtils.lambda$parseAndRegisterConfigurations$2(ConfigurationParserUtils.java:116)
at java.base/java.util.stream.ReferencePipeline$4$1.accept(ReferencePipeline.java:214)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.config.ConfigurationParserUtils$1.tryAdvance(ConfigurationParserUtils.java:109)
at java.base/java.util.Spliterator.forEachRemaining(Spliterator.java:332)
at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:276)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1708)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:310)
at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.IntPipeline.reduce(IntPipeline.java:515)
at java.base/java.util.stream.IntPipeline.sum(IntPipeline.java:473)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.config.ConfigurationParserUtils.parseAndRegisterConfigurations(ConfigurationParserUtils.java:118)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.config.ConfigurationParserUtils.parseAndRegisterConfigurations(ConfigurationParserUtils.java:75)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.ResourcesFeature.beforeAnalysis(ResourcesFeature.java:217)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$9(NativeImageGenerator.java:773)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:90)
... 7 more
com.oracle.svm.driver.NativeImage$NativeImageError
at org.graalvm.nativeimage.driver/com.oracle.svm.driver.NativeImage.showError(NativeImage.java:2309)
at org.graalvm.nativeimage.driver/com.oracle.svm.driver.NativeImage.build(NativeImage.java:1886)
at org.graalvm.nativeimage.driver/com.oracle.svm.driver.NativeImage.performBuild(NativeImage.java:1845)
at org.graalvm.nativeimage.driver/com.oracle.svm.driver.NativeImage.main(NativeImage.java:1827)
at [email protected]/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)
After some digging in the code referenced in the stacktrace I found out, that it might have to do with my resource-config.json being outdated and containing a class name which is not on the classpath anymore. However, this shouldn't make the build fail but rather a warning should be printed.
The corresponding code should be here. A check for bundleClass being null should probably be added.
The text was updated successfully, but these errors were encountered:
shmyer
changed the title
NPE in LocalizationFeature when classNames array contains class which is not in classpath
NPE in LocalizationFeature when resource-config.json contains class which is not in classpath
Jul 22, 2024
I got this error when updating dependencies in my project without regenerating the resource-config.json:
After some digging in the code referenced in the stacktrace I found out, that it might have to do with my resource-config.json being outdated and containing a class name which is not on the classpath anymore. However, this shouldn't make the build fail but rather a warning should be printed.
The corresponding code should be here. A check for bundleClass being null should probably be added.
The text was updated successfully, but these errors were encountered: