Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

data-r2dbc-kotlin fails with GraalVM 22.1 #1549

Closed
mhalbritter opened this issue Mar 28, 2022 · 1 comment
Closed

data-r2dbc-kotlin fails with GraalVM 22.1 #1549

mhalbritter opened this issue Mar 28, 2022 · 1 comment
Labels
type: compatibility Native image compatibility issue
Milestone

Comments

@mhalbritter
Copy link
Contributor

openjdk version "17.0.3" 2022-04-19
OpenJDK Runtime Environment GraalVM CE 22.1.0-dev (build 17.0.3+4-jvmci-22.1-b03)
OpenJDK 64-Bit Server VM GraalVM CE 22.1.0-dev (build 17.0.3+4-jvmci-22.1-b03, mixed mode, sharing)

build fails with:

[2/7] Performing analysis...  []                                                                        (22,9s @ 2,29GB)
  16.602 (95,55%) of 17.375 classes reachable
  23.865 (65,39%) of 36.498 fields reachable
  74.825 (84,17%) of 88.895 methods reachable
     434 classes,     0 fields, and     0 methods registered for reflection

Fatal error: com.oracle.svm.core.util.VMError$HostedError: java.lang.reflect.MalformedParameterizedTypeException: Mismatch of count of formal and actual type arguments in constructor of kotlin.jvm.functions.Function1: 2 formal argument(s) 1 actual argument(s)
	at com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:72)
	at com.oracle.svm.reflect.hosted.ReflectionDataBuilder.query(ReflectionDataBuilder.java:661)
	at com.oracle.svm.reflect.hosted.ReflectionDataBuilder.registerTypesForClass(ReflectionDataBuilder.java:366)
	at com.oracle.svm.reflect.hosted.ReflectionDataBuilder.processMethodMetadata(ReflectionDataBuilder.java:260)
	at com.oracle.svm.reflect.hosted.ReflectionDataBuilder.duringAnalysis(ReflectionDataBuilder.java:180)
	at com.oracle.svm.reflect.hosted.ReflectionFeature.duringAnalysis(ReflectionFeature.java:186)
	at com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$10(NativeImageGenerator.java:725)
	at com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:74)
	at com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$11(NativeImageGenerator.java:725)
	at com.oracle.graal.pointsto.PointsToAnalysis.runAnalysis(PointsToAnalysis.java:751)
	at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:722)
	at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:557)
	at com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:514)
	at com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:413)
	at com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:591)
	at com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:129)
	at com.oracle.svm.hosted.NativeImageGeneratorRunner$JDK9Plus.main(NativeImageGeneratorRunner.java:621)
Caused by: java.lang.reflect.MalformedParameterizedTypeException: Mismatch of count of formal and actual type arguments in constructor of kotlin.jvm.functions.Function1: 2 formal argument(s) 1 actual argument(s)
	at java.base/sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.validateConstructorArguments(ParameterizedTypeImpl.java:59)
	at java.base/sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.<init>(ParameterizedTypeImpl.java:52)
	at java.base/sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.make(ParameterizedTypeImpl.java:100)
	at java.base/sun.reflect.generics.factory.CoreReflectionFactory.makeParameterizedType(CoreReflectionFactory.java:105)
	at java.base/sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:140)
	at java.base/sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
	at java.base/sun.reflect.generics.repository.ClassRepository.computeSuperInterfaces(ClassRepository.java:117)
	at java.base/sun.reflect.generics.repository.ClassRepository.getSuperInterfaces(ClassRepository.java:95)
	at java.base/java.lang.Class.getGenericInterfaces(Class.java:1211)
	at com.oracle.svm.reflect.hosted.ReflectionDataBuilder.query(ReflectionDataBuilder.java:657)
	... 15 more
------------------------------------------------------------------------------------------------------------------------
                        6,1s (22,2% of total time) in 23 GCs | Peak RSS: 5,96GB | CPU load: 5,82
========================================================================================================================
@mhalbritter mhalbritter added the type: compatibility Native image compatibility issue label Mar 28, 2022
@mhalbritter mhalbritter added this to the 0.11.4 milestone Mar 28, 2022
@mhalbritter
Copy link
Contributor Author

I got a build from Graal team which is based on oracle/graal#4414, which fixes this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: compatibility Native image compatibility issue
Development

No branches or pull requests

1 participant