0

Anyone knows the error "Error: Could not find option 'InlineBeforeAnalysis'"?? I am getting that error when I try to generate the image using spring-native.

Error: Could not find option 'InlineBeforeAnalysis'. Use -H:PrintFlags= to list all available options.
Error: Use -H:+ReportExceptionStackTraces to print stacktrace of underlying exception
Error: Image build request failed with exit status 1
       <profile>
            <id>native-image</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-maven-plugin</artifactId>
                        <configuration>
                            <classifier>exec</classifier>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.graalvm.nativeimage</groupId>
                        <artifactId>native-image-maven-plugin</artifactId>
                        <version>21.0.0</version>
                        <configuration>
                            <!-- The native image build needs to know the entry point to your application -->
                            <mainClass>com.mainpackage.Application</mainClass>
                            <buildArgs>
                                --no-fallback -H:+InlineBeforeAnalysis  -H:+ReportExceptionStackTraces
                            </buildArgs>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>native-image</goal>
                                </goals>
                                <phase>package</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

Thanks very much in advance.

  • 1
    are you using Macos Big Sur? I had same issue and I suspect is related to this https://github.com/oracle/graal/issues/2144 – user2669657 Apr 03 '21 at 01:51
  • 1
    If you're using macOS m1 try to update GraalVM to latest(21.0.0.2) version had same issue with its version(20.3.1) – user2669657 Apr 04 '21 at 18:45
  • Thank you very much :), I have updated the java graalvm version as you suggested and it worked. I'm not having that error. It is not working yet cause I have a different error, ``` Fatal error:java.lang.TypeNotPresentException: Type javax.servlet.Filter not present ``` However, I am not using that class consciously. I am using spring web flux with security. – Fany Castro Vizoso Apr 06 '21 at 08:11

0 Answers0