Hello, I'm trying to run a native image generated with springboot 3.2.6 and graalvm-jdk-21.0.3, but when the application tries to start the following error occurs. Would anyone know what could be going on?

Application run failed org.springframework.boot.AotInitializerNotFoundException: Startup with AOT mode enabled failed: AOT initializer com.picpay.ResidenceAssistenceApplication__ApplicationContextInitializer could not be found at org.springframework.boot.SpringApplication.addAotGeneratedInitializerIfNecessary(SpringApplication.java:443) at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:400) at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) at com.picpay.ResidenceAssistenceApplication.main(ResidenceAssistenceApplication.java:18) at java.base@21.0.3/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)

My configurations:


<plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.4.1</version>
          <configuration>
              <archive>
                  <manifest>
                      <mainClass>com.main.Class</mainClass>
                  </manifest>
              </archive>
          </configuration>
          </plugin>
          <plugin>
          <groupId>org.graalvm.buildtools</groupId>
          <artifactId>native-maven-plugin</artifactId>
          <version>0.10.2</version>
          <configuration>
              <imageName>${project.artifactId}</imageName>
              <verbose>true</verbose>
              <buildArgs>
                  <arg>--initialize-at-build-time=org.apache.commons.logging.LogFactoryService,org.apache.commons.logging.LogFactory,org.slf4j.LoggerFactory,ch.qos.logback,org.slf4j.LoggerFactory,ch.qos.logback.core.status.StatusBase,ch.qos.logback.classic.Level,ch.qos.logback.core.status.InfoStatus</arg>
              </buildArgs>
          </configuration>
          <executions>
              <execution>
                  <id>build-native</id>
                  <goals>
                      <goal>compile-no-fork</goal>
                  </goals>
                  <phase>package</phase>
              </execution>
          </executions>
          </plugin>
          <plugin>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-maven-plugin</artifactId>
          <configuration>
              <mainClass>com.main.Class</mainClass>
          </configuration>
          </plugin>

Comment From: wilkinsona

How did you build the app? Are you using spring-boot-starter-parent and did you use the native profile?

If this doesn't help and you would like us to spend some more time investigating, please spend some time providing a complete yet minimal sample that reproduces the problem. You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue.

Comment From: georgeoikawapp

How did you build the app? Are you using spring-boot-starter-parent and did you use the native profile?

If this doesn't help and you would like us to spend some more time investigating, please spend some time providing a complete yet minimal sample that reproduces the problem. You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue.

a im using spring-boot-starter but using spring-boot-starter-parent 3.2.6 the error changed... and i have built with mvn clean package -Pnative Unfortunately I don't have permission to share the project, but I will try to send the settings as complete as possible.

The error with spring-boot-starter-parent 3.2.6 and my pom.xml attached

ERROR NOW: You are starting the application with AOT mode enabled but AOT processing hasn't happened. Please build your application with enabled AOT processing first, or remove the system property 'spring.aot.enabled' to run the application in regular mode

Comment From: wilkinsona

Thanks.

Unfortunately, that pom doesn't really help as it doesn't show us how the module that you're building as a native image is configured.

Unfortunately I don't have permission to share the project

We don't need (or want) your whole project. We'd much prefer a sample that contains the bare minimum that's required to reproduce the problem. It should be possible for you to produce one based on your actual project. It looks to me like AOT processing isn't running as part of the application being built so I'd recommend focusing on that when trying to create the sample.

Comment From: georgeoikawapp

i could create the zip @wilkinsona this way you can simulate the error

Comment From: philwebb

@georgeoikawapp I'm afraid your sample project doesn't build:

$ mvn clean package -Pnative
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[WARNING] 'parent.relativePath' of POM com.picpay.insurance:insurance-residence-assistence-core:0.0.1-SNAPSHOT (/Users/pwebb/Downloads/ms-insurance-residence-assistence/insurance-residence-assistence-core/pom.xml) points at org.springframework.boot:ms-insurance-residence-assistence instead of com.picpay.insurance:ms-insurance-residence-assistence, please verify your project structure @ line 6, column 13
[FATAL] Non-resolvable parent POM for com.picpay.insurance:insurance-residence-assistence-core:0.0.1-SNAPSHOT: The following artifacts could not be resolved: com.picpay.insurance:ms-insurance-residence-assistence:pom:0.0.1-SNAPSHOT (absent): Could not find artifact com.picpay.insurance:ms-insurance-residence-assistence:pom:0.0.1-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 6, column 13
[WARNING] 'parent.relativePath' of POM com.picpay.insurance:insurance-residence-assistence-dataprovider:0.0.1-SNAPSHOT (/Users/pwebb/Downloads/ms-insurance-residence-assistence/insurance-residence-assistence-dataprovider/pom.xml) points at org.springframework.boot:ms-insurance-residence-assistence instead of com.picpay.insurance:ms-insurance-residence-assistence, please verify your project structure @ line 6, column 10
[FATAL] Non-resolvable parent POM for com.picpay.insurance:insurance-residence-assistence-dataprovider:0.0.1-SNAPSHOT: The following artifacts could not be resolved: com.picpay.insurance:ms-insurance-residence-assistence:pom:0.0.1-SNAPSHOT (absent): Could not find artifact com.picpay.insurance:ms-insurance-residence-assistence:pom:0.0.1-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 6, column 10
[WARNING] 'parent.relativePath' of POM com.picpay.insurance:insurance-residence-assistence-entrypoint:0.0.1-SNAPSHOT (/Users/pwebb/Downloads/ms-insurance-residence-assistence/insurance-residence-assistence-entrypoint/pom.xml) points at org.springframework.boot:ms-insurance-residence-assistence instead of com.picpay.insurance:ms-insurance-residence-assistence, please verify your project structure @ line 5, column 10
[FATAL] Non-resolvable parent POM for com.picpay.insurance:insurance-residence-assistence-entrypoint:0.0.1-SNAPSHOT: The following artifacts could not be resolved: com.picpay.insurance:ms-insurance-residence-assistence:pom:0.0.1-SNAPSHOT (absent): Could not find artifact com.picpay.insurance:ms-insurance-residence-assistence:pom:0.0.1-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 5, column 10
[WARNING] 'parent.relativePath' of POM com.picpay.insurance:insurance-residence-assistence-coverage:0.0.1-SNAPSHOT (/Users/pwebb/Downloads/ms-insurance-residence-assistence/insurance-residence-assistence-coverage/pom.xml) points at org.springframework.boot:ms-insurance-residence-assistence instead of com.picpay.insurance:ms-insurance-residence-assistence, please verify your project structure @ line 6, column 13
[FATAL] Non-resolvable parent POM for com.picpay.insurance:insurance-residence-assistence-coverage:0.0.1-SNAPSHOT: The following artifacts could not be resolved: com.picpay.insurance:ms-insurance-residence-assistence:pom:0.0.1-SNAPSHOT (absent): Could not find artifact com.picpay.insurance:ms-insurance-residence-assistence:pom:0.0.1-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 6, column 13
[WARNING] 'parent.relativePath' of POM com.picpay.insurance:insurance-residence-assistence-batch:0.0.1-SNAPSHOT (/Users/pwebb/Downloads/ms-insurance-residence-assistence/insurance-residence-assistence-batch/pom.xml) points at org.springframework.boot:ms-insurance-residence-assistence instead of com.picpay.insurance:ms-insurance-residence-assistence, please verify your project structure @ line 6, column 10
[FATAL] Non-resolvable parent POM for com.picpay.insurance:insurance-residence-assistence-batch:0.0.1-SNAPSHOT: The following artifacts could not be resolved: com.picpay.insurance:ms-insurance-residence-assistence:pom:0.0.1-SNAPSHOT (absent): Could not find artifact com.picpay.insurance:ms-insurance-residence-assistence:pom:0.0.1-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 6, column 10
[WARNING] 'parent.relativePath' of POM com.picpay.insurance:insurance-residence-assistence-worker-processed-payment:0.0.1-SNAPSHOT (/Users/pwebb/Downloads/ms-insurance-residence-assistence/insurance-residence-assistence-worker-processed-payment/pom.xml) points at org.springframework.boot:ms-insurance-residence-assistence instead of com.picpay.insurance:ms-insurance-residence-assistence, please verify your project structure @ line 6, column 10
[FATAL] Non-resolvable parent POM for com.picpay.insurance:insurance-residence-assistence-worker-processed-payment:0.0.1-SNAPSHOT: The following artifacts could not be resolved: com.picpay.insurance:ms-insurance-residence-assistence:pom:0.0.1-SNAPSHOT (absent): Could not find artifact com.picpay.insurance:ms-insurance-residence-assistence:pom:0.0.1-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 6, column 10
[WARNING] 'parent.relativePath' of POM com.picpay.insurance:insurance-residence-assistence-worker-active-listening:0.0.1-SNAPSHOT (/Users/pwebb/Downloads/ms-insurance-residence-assistence/insurance-residence-assistence-worker-active-listening/pom.xml) points at org.springframework.boot:ms-insurance-residence-assistence instead of com.picpay.insurance:ms-insurance-residence-assistence, please verify your project structure @ line 6, column 10
[FATAL] Non-resolvable parent POM for com.picpay.insurance:insurance-residence-assistence-worker-active-listening:0.0.1-SNAPSHOT: The following artifacts could not be resolved: com.picpay.insurance:ms-insurance-residence-assistence:pom:0.0.1-SNAPSHOT (absent): Could not find artifact com.picpay.insurance:ms-insurance-residence-assistence:pom:0.0.1-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 6, column 10
[WARNING] 'build.plugins.plugin.version' for org.sonarsource.scanner.maven:sonar-maven-plugin is missing. @ line 216, column 12
 @ 
[ERROR] The build could not read 7 projects -> [Help 1]
[ERROR]   
[ERROR]   The project com.picpay.insurance:insurance-residence-assistence-core:0.0.1-SNAPSHOT (/Users/pwebb/Downloads/ms-insurance-residence-assistence/insurance-residence-assistence-core/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for com.picpay.insurance:insurance-residence-assistence-core:0.0.1-SNAPSHOT: The following artifacts could not be resolved: com.picpay.insurance:ms-insurance-residence-assistence:pom:0.0.1-SNAPSHOT (absent): Could not find artifact com.picpay.insurance:ms-insurance-residence-assistence:pom:0.0.1-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 6, column 13 -> [Help 2]
[ERROR]   
[ERROR]   The project com.picpay.insurance:insurance-residence-assistence-dataprovider:0.0.1-SNAPSHOT (/Users/pwebb/Downloads/ms-insurance-residence-assistence/insurance-residence-assistence-dataprovider/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for com.picpay.insurance:insurance-residence-assistence-dataprovider:0.0.1-SNAPSHOT: The following artifacts could not be resolved: com.picpay.insurance:ms-insurance-residence-assistence:pom:0.0.1-SNAPSHOT (absent): Could not find artifact com.picpay.insurance:ms-insurance-residence-assistence:pom:0.0.1-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 6, column 10 -> [Help 2]
[ERROR]   
[ERROR]   The project com.picpay.insurance:insurance-residence-assistence-entrypoint:0.0.1-SNAPSHOT (/Users/pwebb/Downloads/ms-insurance-residence-assistence/insurance-residence-assistence-entrypoint/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for com.picpay.insurance:insurance-residence-assistence-entrypoint:0.0.1-SNAPSHOT: The following artifacts could not be resolved: com.picpay.insurance:ms-insurance-residence-assistence:pom:0.0.1-SNAPSHOT (absent): Could not find artifact com.picpay.insurance:ms-insurance-residence-assistence:pom:0.0.1-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 5, column 10 -> [Help 2]
[ERROR]   
[ERROR]   The project com.picpay.insurance:insurance-residence-assistence-coverage:0.0.1-SNAPSHOT (/Users/pwebb/Downloads/ms-insurance-residence-assistence/insurance-residence-assistence-coverage/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for com.picpay.insurance:insurance-residence-assistence-coverage:0.0.1-SNAPSHOT: The following artifacts could not be resolved: com.picpay.insurance:ms-insurance-residence-assistence:pom:0.0.1-SNAPSHOT (absent): Could not find artifact com.picpay.insurance:ms-insurance-residence-assistence:pom:0.0.1-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 6, column 13 -> [Help 2]
[ERROR]   
[ERROR]   The project com.picpay.insurance:insurance-residence-assistence-batch:0.0.1-SNAPSHOT (/Users/pwebb/Downloads/ms-insurance-residence-assistence/insurance-residence-assistence-batch/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for com.picpay.insurance:insurance-residence-assistence-batch:0.0.1-SNAPSHOT: The following artifacts could not be resolved: com.picpay.insurance:ms-insurance-residence-assistence:pom:0.0.1-SNAPSHOT (absent): Could not find artifact com.picpay.insurance:ms-insurance-residence-assistence:pom:0.0.1-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 6, column 10 -> [Help 2]
[ERROR]   
[ERROR]   The project com.picpay.insurance:insurance-residence-assistence-worker-processed-payment:0.0.1-SNAPSHOT (/Users/pwebb/Downloads/ms-insurance-residence-assistence/insurance-residence-assistence-worker-processed-payment/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for com.picpay.insurance:insurance-residence-assistence-worker-processed-payment:0.0.1-SNAPSHOT: The following artifacts could not be resolved: com.picpay.insurance:ms-insurance-residence-assistence:pom:0.0.1-SNAPSHOT (absent): Could not find artifact com.picpay.insurance:ms-insurance-residence-assistence:pom:0.0.1-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 6, column 10 -> [Help 2]
[ERROR]   
[ERROR]   The project com.picpay.insurance:insurance-residence-assistence-worker-active-listening:0.0.1-SNAPSHOT (/Users/pwebb/Downloads/ms-insurance-residence-assistence/insurance-residence-assistence-worker-active-listening/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for com.picpay.insurance:insurance-residence-assistence-worker-active-listening:0.0.1-SNAPSHOT: The following artifacts could not be resolved: com.picpay.insurance:ms-insurance-residence-assistence:pom:0.0.1-SNAPSHOT (absent): Could not find artifact com.picpay.insurance:ms-insurance-residence-assistence:pom:0.0.1-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 6, column 10 -> [Help 2]
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

Please make sure that it's not relying on something in your ~/.m2/repository directory.

Comment From: georgeoikawapp

Hello @philwebb I adjusted the build of this sample project and when removing the internal dependencies the i could create and run the native image... I believe the problem is in one of these internal dependencies

Comment From: wilkinsona

Thanks for the update. Please update your sample to mimic what the internal dependency is doing such that it recreates the problem. We can then take another look.

Comment From: georgeoikawapp

Guys, after build the projeto now to receive this error:


[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:3.2.6:process-aot (process-aot) on project insurance-residence-assistence-entrypoint: Process terminated with exit code: 1 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:3.2.6:process-aot (process-aot) on project insurance-residence-assistence-entrypoint: Process terminated with exit code: 1
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:333)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:316)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:174)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000(MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run(MojoExecutor.java:162)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute(DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:906)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:283)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:206)
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
    at java.base/java.lang.reflect.Method.invoke(Method.java:580)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:283)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:226)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:407)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:348)
Caused by: org.apache.maven.plugin.MojoExecutionException: Process terminated with exit code: 1
    at org.springframework.boot.maven.AbstractAotMojo.execute(AbstractAotMojo.java:118)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:126)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:328)
    ... 23 more
Caused by: org.apache.maven.plugin.MojoExecutionException: Process terminated with exit code: 1
    at org.springframework.boot.maven.JavaProcessExecutor.run(JavaProcessExecutor.java:74)
    at org.springframework.boot.maven.AbstractAotMojo.generateAotAssets(AbstractAotMojo.java:135)
    at org.springframework.boot.maven.ProcessAotMojo.executeAot(ProcessAotMojo.java:98)
    at org.springframework.boot.maven.AbstractAotMojo.execute(AbstractAotMojo.java:115)
    ... 25 more

Comment From: wilkinsona

It looks to me like your Logback configuration is faulty:

17:15:35,673 |-INFO in ch.qos.logback.core.joran.util.ConfigurationWatchListUtil@52d645b1 - Adding [jar:file:/Users/awilkinson/.m2/repository/org/springframework/boot/spring-boot/3.2.6/spring-boot-3.2.6.jar!/org/springframework/boot/logging/logback/defaults.xml] to configuration watch list.
17:15:35,673 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@2101b44a - URL [jar:file:/Users/awilkinson/.m2/repository/org/springframework/boot/spring-boot/3.2.6/spring-boot-3.2.6.jar!/org/springframework/boot/logging/logback/defaults.xml] is not of type file
17:15:35,675 |-INFO in ch.qos.logback.core.joran.action.ConversionRuleAction - registering conversion word applicationName with class [org.springframework.boot.logging.logback.ApplicationNameConverter]
17:15:35,675 |-INFO in ch.qos.logback.core.joran.action.ConversionRuleAction - registering conversion word clr with class [org.springframework.boot.logging.logback.ColorConverter]
17:15:35,675 |-INFO in ch.qos.logback.core.joran.action.ConversionRuleAction - registering conversion word correlationId with class [org.springframework.boot.logging.logback.CorrelationIdConverter]
17:15:35,675 |-INFO in ch.qos.logback.core.joran.action.ConversionRuleAction - registering conversion word wex with class [org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter]
17:15:35,675 |-INFO in ch.qos.logback.core.joran.action.ConversionRuleAction - registering conversion word wEx with class [org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter]
17:15:35,676 |-INFO in ch.qos.logback.core.joran.util.ConfigurationWatchListUtil@52d645b1 - Adding [jar:file:/Users/awilkinson/.m2/repository/org/springframework/boot/spring-boot/3.2.6/spring-boot-3.2.6.jar!/org/springframework/boot/logging/logback/console-appender.xml] to configuration watch list.
17:15:35,676 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@2101b44a - URL [jar:file:/Users/awilkinson/.m2/repository/org/springframework/boot/spring-boot/3.2.6/spring-boot-3.2.6.jar!/org/springframework/boot/logging/logback/console-appender.xml] is not of type file
17:15:35,707 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.apache.catalina.startup.DigesterFactory] to ERROR
17:15:35,707 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@2cc3ad05 - Propagating ERROR level on Logger[org.apache.catalina.startup.DigesterFactory] onto the JUL framework
17:15:35,708 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.apache.catalina.util.LifecycleBase] to ERROR
17:15:35,708 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@2cc3ad05 - Propagating ERROR level on Logger[org.apache.catalina.util.LifecycleBase] onto the JUL framework
17:15:35,708 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.apache.coyote.http11.Http11NioProtocol] to WARN
17:15:35,708 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@2cc3ad05 - Propagating WARN level on Logger[org.apache.coyote.http11.Http11NioProtocol] onto the JUL framework
17:15:35,708 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.apache.sshd.common.util.SecurityUtils] to WARN
17:15:35,708 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@2cc3ad05 - Propagating WARN level on Logger[org.apache.sshd.common.util.SecurityUtils] onto the JUL framework
17:15:35,708 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.apache.tomcat.util.net.NioSelectorPool] to WARN
17:15:35,708 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@2cc3ad05 - Propagating WARN level on Logger[org.apache.tomcat.util.net.NioSelectorPool] onto the JUL framework
17:15:35,708 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.eclipse.jetty.util.component.AbstractLifeCycle] to ERROR
17:15:35,708 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@2cc3ad05 - Propagating ERROR level on Logger[org.eclipse.jetty.util.component.AbstractLifeCycle] onto the JUL framework
17:15:35,708 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.hibernate.validator.internal.util.Version] to WARN
17:15:35,708 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@2cc3ad05 - Propagating WARN level on Logger[org.hibernate.validator.internal.util.Version] onto the JUL framework
17:15:35,708 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.springframework.boot.actuate.endpoint.jmx] to WARN
17:15:35,708 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@2cc3ad05 - Propagating WARN level on Logger[org.springframework.boot.actuate.endpoint.jmx] onto the JUL framework
17:15:35,708 |-WARN in ch.qos.logback.core.model.processor.AppenderModelHandler - Appender named [CONSOLE] not referenced. Skipping further processing.
17:15:35,708 |-WARN in ch.qos.logback.core.model.processor.AppenderModelHandler - Appender named [CONSOLE-DEV] not referenced. Skipping further processing.
17:15:35,708 |-WARN in ch.qos.logback.core.model.processor.AppenderModelHandler - Appender named [CONSOLE] not referenced. Skipping further processing.
17:15:35,708 |-INFO in ch.qos.logback.core.model.processor.DefaultProcessor@710b18a6 - End of configuration.
17:15:35,710 |-INFO in org.springframework.boot.logging.logback.SpringBootJoranConfigurator@119020fb - Registering current configuration as safe fallback point

None of the appenders are being referenced so no log output is produced. Fixing that, then shows a problem with the configuration of a log level:

Caused by: java.lang.IllegalArgumentException: No enum constant org.springframework.boot.logging.LogLevel.${PICPAY_KAFKA_LOGGING_LEVEL}

You need to set PICPAY_KAFKA_LOGGING_LEVEL somewhere.

Comment From: georgeoikawapp

I set the PICPAY_KAFKA_LOGGING_LEVEL and works, the application starts on the sample project... just on real projeto the native image doesnt run... i will try to discovery what internal dependency is...

Comment From: georgeoikawapp

I have another question... in a project with submodules that generate jars (core and dataprovider), do I need to put the native profile on everyone? or only those that generate the artifact with the main method?

Comment From: wilkinsona

The native profile's defined in spring-boot-starter-parent so it will exist in every module that inherits from this parent. Whether you use that parent for every module or only those that are building a Spring Boot application is up to you. There's no hard requirement to do it one way or the other.

If you have any further questions about Maven profiles, please follow up on Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements.

Comment From: georgeoikawapp

i have a new error on the full project, aotInitilizers empty and generating AotInitializerNotFoundException. This is em SpringApplication class. OBS. the main class is set in pom.xml

   private void addAotGeneratedInitializerIfNecessary(List<ApplicationContextInitializer<?>> initializers) {
      if (AotDetector.useGeneratedArtifacts()) {
         List<ApplicationContextInitializer<?>> aotInitializers = new ArrayList(
            initializers.stream().filter(AotApplicationContextInitializer.class::isInstance).toList()
         );
         if (aotInitializers.isEmpty()) {
            String initializerClassName = this.mainApplicationClass.getName() + "__ApplicationContextInitializer";
            if (!ClassUtils.isPresent(initializerClassName, this.getClassLoader())) {
               throw new AotInitializerNotFoundException(this.mainApplicationClass, initializerClassName);
            }

            aotInitializers.add(AotApplicationContextInitializer.forInitializerClasses(new String[]{initializerClassName}));
         }

         initializers.removeAll(aotInitializers);
         initializers.addAll(0, aotInitializers);
      }
   }

Comment From: wilkinsona

That's the error that you reported originally, isn't it? Regardless, we can't do anything more to help you without the minimal sample that we've requested a few times already. We'll be happy to continue trying to help you but we need that sample. If you cannot provide one then I'm afraid we'll have to close this issue as we cannot afford to spend any more time on it without something concrete to act upon.

Comment From: georgeoikawapp

ok, thanks... you can close this issue

Comment From: georgeoikawapp

@wilkinsona I discovered the dependency that was causing the problem... it was openfeign, even using the latest version... after removing the dependency and settings in application.yaml and starting to use the springboot 3.2 rest client I was able to start the application native

Comment From: wilkinsona

We have a smoke test for using Spring Cloud's Open Feign support with AOT and GraalVM that works. If it's not working for you, you may want to open a Spring Cloud OpenFeign issue but you should only do so after creating a complete, yet minimal sample that reproduces the problem.