mybatis-native-demo icon indicating copy to clipboard operation
mybatis-native-demo copied to clipboard

process-aot phase failed

Open yourchanges opened this issue 2 years ago • 3 comments

I run the demo successfully.

but when I copy into the a simple mybatis project , I got the process-aot 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.parsing.XNode
        org.apache.ibatis.builder.CacheRefResolver
        org.apache.ibatis.builder.annotation.MethodResolver
        org.apache.ibatis.builder.ResultMapResolver

        at org.springframework.boot.context.properties.bind.BindableRuntimeHintsRegistrar.registerHints(BindableRuntimeHintsRegistrar.java:91)
        at org.springframework.boot.context.properties.ConfigurationPropertiesBeanFactoryInitializationAotProcessor$ConfigurationPropertiesReflectionHintsContribution.applyTo(ConfigurationPropertiesBeanFactoryInitializationAotProcessor.java:70)
        at org.springframework.context.aot.BeanFactoryInitializationAotContributions.applyTo(BeanFactoryInitializationAotContributions.java:78)
        at org.springframework.context.aot.ApplicationContextAotGenerator.lambda$processAheadOfTime$0(ApplicationContextAotGenerator.java:58)
        at org.springframework.context.aot.ApplicationContextAotGenerator.withCglibClassHandler(ApplicationContextAotGenerator.java:67)
        at org.springframework.context.aot.ApplicationContextAotGenerator.processAheadOfTime(ApplicationContextAotGenerator.java:53)
        at org.springframework.context.aot.ContextAotProcessor.performAotProcessing(ContextAotProcessor.java:106)
        at org.springframework.context.aot.ContextAotProcessor.doProcess(ContextAotProcessor.java:84)
        at org.springframework.context.aot.ContextAotProcessor.doProcess(ContextAotProcessor.java:49)
        at org.springframework.context.aot.AbstractAotProcessor.process(AbstractAotProcessor.java:82)
        at org.springframework.boot.SpringApplicationAotProcessor.main(SpringApplicationAotProcessor.java:80)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  9.245 s
[INFO] Finished at: 2023-06-06T18:46:51+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:3.0.6:process-aot (process-aot) on project mobileservice: Process terminated with exit code: 1 -> [Help 1]
[ERROR] 

any ideas or tips?

yourchanges avatar Jun 06 '23 10:06 yourchanges

@yourchanges Cloud you provide a small repro project?

kazuki43zoo avatar Jun 06 '23 11:06 kazuki43zoo

Sure, but it will take a few more hours to do some copy and merge jobs

yourchanges avatar Jun 07 '23 01:06 yourchanges

Confirmed, it caused by the mybatis-plus. I'll find some way to solve it.

yourchanges avatar Jun 07 '23 03:06 yourchanges