I am trying to compile springboot project with GraalVM, but it gives me the following error:
Exception in thread "main" org.springframework.boot.context.properties.bind.MissingParametersCompilerArgumentException: Constructor binding in a native image requires compilation with -parameters but the following classes were compiled without it:
org.apache.ibatis.mapping.ResultFlag
org.apache.ibatis.builder.annotation.MethodResolver
org.apache.ibatis.builder.ResultMapResolver
org.apache.ibatis.parsing.XNode
org.apache.ibatis.builder.CacheRefResolver
My project springboot version is 3.0.2 GraalVM version is:
openjdk version "17.0.6" 2023-01-17
OpenJDK Runtime Environment GraalVM CE 22.3.1 (build 17.0.6+10-jvmci-22.3-b13)
OpenJDK 64-Bit Server VM GraalVM CE 22.3.1 (build 17.0.6+10-jvmci-22.3-b13, mixed mode, sharing)
My maven build configuration is:
<build>
<plugins>
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
So what is wrong here? Thanks!!
Comment From: snicoll
The error message should answer your question:
Constructor binding in a native image requires compilation with -parameters but the following classes were compiled without it:
Those classes should be compiled with -parameters. I've raised https://github.com/mybatis/mybatis-3/issues/2858
Going forward, please ask questions on StackOverflow, as mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements.
Comment From: scottfrederick
Duplicates #34837