Skip to content

Maven build error with Graal VM on Spring Content #1657

@Brogrammer1912

Description

@Brogrammer1912

Hi There,

When attempting to build my project using Graal VM, I encountered an error. I'm not sure if Spring Content supports Graal VM, but I'm raising this issue in case it's a bug or if support could be added.

Expected Result:
Successful build using either of the following commands:

mvn -Pnative native:compile

or

 mvn clean package -Pnative

Actual Result:
Maven build fails with the following error (stack trace below).

2023-10-25T21:17:58.174+05:30  INFO 2035 --- [           main] rocessor$ProxyRegisteringAotContribution : Created proxy type class org.springdoc.webmvc.ui.SwaggerWelcomeWebMvc$$SpringCGLIB$$0 for class org.springdoc.webmvc.ui.SwaggerWelcomeWebMvc
2023-10-25T21:17:58.181+05:30  INFO 2035 --- [           main] rocessor$ProxyRegisteringAotContribution : Created proxy type class org.springdoc.webmvc.ui.SwaggerConfigResource$$SpringCGLIB$$0 for class org.springdoc.webmvc.ui.SwaggerConfigResource
2023-10-25T21:17:58.283+05:30  INFO 2035 --- [           main] o.springframework.hateoas.aot.AotUtils   : Registering Spring HATEOAS types in org.springframework.hateoas for reflection.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  10.308 s
[INFO] Finished at: 2023-10-25T21:17:59+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:3.1.5:process-aot (process-aot) on project CinemaPass: Unable to compile generated source
[ERROR] incompatible types: bad return type in lambda expression
[ERROR]     internal.org.springframework.content.commons.config.StoreFragmentsFactoryBean cannot be converted to internal.org.springframework.content.commons.config.StoreFragments /Users/akshathsaipittala/Git/CinemaPass/target/spring-aot/main/sources/internal/org/springframework/content/commons/config/StoreFragments__BeanDefinitions.java 19:54
[ERROR] incompatible types: bad return type in lambda expression
[ERROR]     internal.org.springframework.content.commons.config.StoreFragmentsFactoryBean cannot be converted to internal.org.springframework.content.commons.config.StoreFragments /Users/akshathsaipittala/Git/CinemaPass/target/spring-aot/main/sources/internal/org/springframework/content/commons/config/StoreFragments__BeanDefinitions.java 58:54
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
dev@Devs-MacBook-Pro CinemaPass % 

Steps to Reproduce:

  1. Use the following tech stack versions:
    • Spring Boot: 3.1.5
    • Spring Content Version: 3.0.6 (Using both spring-content-fs-boot-starter & spring-content-rest-boot-starter)
    • Maven: 3.9.2
    • Graal VM Community Edition: 21
  2. Run the following command: mvn -Pnative native:compile or mvn clean package -Pnative

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions