spring-attic / spring-native

Spring Native is now superseded by Spring Boot 3 official native support
https://docs.spring.io/spring-boot/docs/current/reference/html/native-image.html
Apache License 2.0
2.74k stars 355 forks source link

Spring Native with buildpacks error com.oracle.graal.pointsto.constraints.UnresolvedElementException #1693

Closed brianmolinaspring closed 2 years ago

brianmolinaspring commented 2 years ago

I am trying to build a Spring Native application using buildpacks by following the instructions from: https://docs.spring.io/spring-native/docs/current/reference/htmlsingle/#getting-started

I am use Java version to 11.

When running mvn spring-boot:build-image I receive the following error related to BeanUtils:

[INFO]     [creator]     The bundle named: com/sun/rowset/RowSetResourceBundle, has not been found. If the bundle is part of a module, verify the bundle name is a fully qualified class name. Otherwise verify the bundle path is accessible in the classpath.
[INFO]     [creator]     [2/7] Performing analysis...  []                                 (9.3s @ 0.55GB)
[INFO]     [creator]        1,462 (66.82%) of  2,188 classes reachable
[INFO]     [creator]        1,262 (43.79%) of  2,882 fields reachable
[INFO]     [creator]        5,111 (60.79%) of  8,407 methods reachable
[INFO]     [creator]          133 classes,     0 fields, and     0 methods registered for reflection
[INFO]     [creator]
[INFO]     [creator]     Fatal error: com.oracle.graal.pointsto.util.AnalysisError$ParsingError: Error encountered while parsing org.springframework.boot.SpringApplication.createSpringFactoriesInstances(java.lang.Class, java.lang.Class[], java.lang.ClassLoader, java.lang.Object[], java.util.Set)
[INFO]     [creator]     Parsing context:
[INFO]     [creator]        at app//org.springframework.boot.SpringApplication.createSpringFactoriesInstances(SpringApplication.java:446)
[INFO]     [creator]        at app//org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:438)
[INFO]     [creator]        at app//org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:431)
[INFO]     [creator]
[INFO]     [creator]            at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.AnalysisError.parsingError(AnalysisError.java:152)
[INFO]     [creator]            at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.MethodTypeFlow.createFlowsGraph(MethodTypeFlow.java:104)
[INFO]     [creator]            at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureFlowsGraphCreated(MethodTypeFlow.java:83)
[INFO]     [creator]            at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.MethodTypeFlow.getOrCreateMethodFlowsGraph(MethodTypeFlow.java:65)
[INFO]     [creator]            at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.typestate.DefaultSpecialInvokeTypeFlow.onObservedUpdate(DefaultSpecialInvokeTypeFlow.java:61)
[INFO]     [creator]            at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.TypeFlow.update(TypeFlow.java:558)
[INFO]     [creator]            at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.PointsToAnalysis$1.run(PointsToAnalysis.java:635)
[INFO]     [creator]            at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.executeCommand(CompletionExecutor.java:193)
[INFO]     [creator]            at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.lambda$executeService$0(CompletionExecutor.java:177)
[INFO]     [creator]            at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
[INFO]     [creator]            at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
[INFO]     [creator]            at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
[INFO]     [creator]            at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
[INFO]     [creator]            at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
[INFO]     [creator]            at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
[INFO]     [creator]     Caused by: org.graalvm.compiler.java.BytecodeParser$BytecodeParserError: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved method during parsing: org.springframework.beans.BeanUtils$KotlinDelegate.instantiateClass(java.lang.reflect.Constructor, java.lang.Object[]). This error is reported at image build time because class org.springframework.beans.BeanUtils is registered for linking at image build time by system default
[INFO]     [creator]            at parsing app//org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:196)
[INFO]     [creator]            at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.throwParserError(BytecodeParser.java:2506)
[INFO]     [creator]            at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.throwParserError(SharedGraphBuilderPhase.java:105)
[INFO]     [creator]            at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3367)
[INFO]     [creator]            at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.handleBytecodeBlock(BytecodeParser.java:3319)
[INFO]     [creator]            at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3164)
[INFO]     [creator]            at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:1138)
[INFO]     [creator]            at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:1030)
[INFO]     [creator]            at jdk.internal.vm.compiler/org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:84)
[INFO]     [creator]            at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.phases.SharedGraphBuilderPhase.run(SharedGraphBuilderPhase.java:79)
[INFO]     [creator]            at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.run(Phase.java:49)
[INFO]     [creator]            at jdk.internal.vm.compiler/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:261)
[INFO]     [creator]            at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:42)
[INFO]     [creator]            at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:38)
[INFO]     [creator]            at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.AnalysisParsedGraph.parseBytecode(AnalysisParsedGraph.java:135)
[INFO]     [creator]            at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisMethod.ensureGraphParsed(AnalysisMethod.java:685)
[INFO]     [creator]            at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.phases.InlineBeforeAnalysisGraphDecoder.lookupEncodedGraph(InlineBeforeAnalysis.java:180)
[INFO]     [creator]            at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.PEGraphDecoder.doInline(PEGraphDecoder.java:1162)
[INFO]     [creator]            at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.PEGraphDecoder.tryInline(PEGraphDecoder.java:1145)
[INFO]     [creator]            at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.PEGraphDecoder.trySimplifyInvoke(PEGraphDecoder.java:1003)
[INFO]     [creator]            at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.PEGraphDecoder.handleInvoke(PEGraphDecoder.java:957)
[INFO]     [creator]            at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.GraphDecoder.processNextNode(GraphDecoder.java:817)
[INFO]     [creator]            at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.phases.InlineBeforeAnalysisGraphDecoder.processNextNode(InlineBeforeAnalysis.java:240)
[INFO]     [creator]            at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.GraphDecoder.decode(GraphDecoder.java:548)
[INFO]     [creator]            at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.PEGraphDecoder.decode(PEGraphDecoder.java:833)
[INFO]     [creator]            at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.phases.InlineBeforeAnalysis.decodeGraph(InlineBeforeAnalysis.java:98)
[INFO]     [creator]            at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:176)
[INFO]     [creator]            at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:343)
[INFO]     [creator]            at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.MethodTypeFlow.createFlowsGraph(MethodTypeFlow.java:93)
[INFO]     [creator]            ... 13 more
[INFO]     [creator]     Caused by: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved method during parsing: org.springframework.beans.BeanUtils$KotlinDelegate.instantiateClass(java.lang.reflect.Constructor, java.lang.Object[]). This error is reported at image build time because class org.springframework.beans.BeanUtils is registered for linking at image build time by system default
[INFO]     [creator]            at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.reportUnresolvedElement(SharedGraphBuilderPhase.java:298)
[INFO]     [creator]            at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.handleUnresolvedMethod(SharedGraphBuilderPhase.java:288)
[INFO]     [creator]            at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.handleUnresolvedInvoke(SharedGraphBuilderPhase.java:244)
[INFO]     [creator]            at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genInvokeStatic(BytecodeParser.java:1664)
[INFO]     [creator]            at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genInvokeStatic(BytecodeParser.java:1639)
[INFO]     [creator]            at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5224)
[INFO]     [creator]            at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3359)
[INFO]     [creator]            ... 38 more
[INFO]     [creator]     --------------------------------------------------------------------------------
[INFO]     [creator]         3.1s (6.6% of total time) in 17 GCs | Peak RSS: 1.73GB | CPU load: 4.78
[INFO]     [creator]     ================================================================================
[INFO]     [creator]     Failed generating '/layers/paketo-buildpacks_native-image/native-image/com.psp.ms.GetCouponsDetailsApplication' after 44.4s.
[INFO]     [creator]     Error: Image build request failed with exit status 1
[INFO]     [creator]     unable to invoke layer creator
[INFO]     [creator]     unable to contribute native-image layer
[INFO]     [creator]     error running build
[INFO]     [creator]     exit status 1
[INFO]     [creator]     ERROR: failed to build: exit status 1
[DEBUG] Releasing connection
[DEBUG] http-outgoing-1: set socket timeout to 0
[DEBUG] Connection can be kept alive indefinitely
[DEBUG] CookieSpec selected: default
[DEBUG] Auth cache not set in the context
[DEBUG] Get connection for route {}->docker://localhost:2376
[DEBUG] http-outgoing-1: set socket timeout to 0
[DEBUG] Executing request POST /v1.24/containers/d75595c671f8459a7d9b5e97d1422a33e437a2fc701704182e9087555ff29d66/wait HTTP/1.1
[DEBUG] Target auth state: UNCHALLENGED
[DEBUG] Proxy auth state: UNCHALLENGED
[DEBUG] http-outgoing-1 >> POST /v1.24/containers/d75595c671f8459a7d9b5e97d1422a33e437a2fc701704182e9087555ff29d66/wait HTTP/1.1
[DEBUG] http-outgoing-1 >> Content-Length: 0
[DEBUG] http-outgoing-1 >> Host: localhost
[DEBUG] http-outgoing-1 >> Connection: Keep-Alive
[DEBUG] http-outgoing-1 >> User-Agent: Apache-HttpClient/4.5.13 (Java/11.0.9)
[DEBUG] http-outgoing-1 >> Accept-Encoding: gzip,deflate
[DEBUG] http-outgoing-1 << HTTP/1.1 200 OK
[DEBUG] http-outgoing-1 << Api-Version: 1.41
[DEBUG] http-outgoing-1 << Content-Type: application/json
[DEBUG] http-outgoing-1 << Date: Fri, 19 Aug 2022 16:30:03 GMT
[DEBUG] http-outgoing-1 << Docker-Experimental: false
[DEBUG] http-outgoing-1 << Ostype: linux
[DEBUG] http-outgoing-1 << Server: Docker/20.10.17 (linux)
[DEBUG] http-outgoing-1 << Transfer-Encoding: chunked
[DEBUG] Connection can be kept alive indefinitely
[DEBUG] Releasing connection
[DEBUG] http-outgoing-1: set socket timeout to 0
[DEBUG] Connection can be kept alive indefinitely
[DEBUG] CookieSpec selected: default
[DEBUG] Auth cache not set in the context
[DEBUG] Get connection for route {}->docker://localhost:2376
[DEBUG] http-outgoing-1: set socket timeout to 0
[DEBUG] Executing request DELETE /v1.24/containers/d75595c671f8459a7d9b5e97d1422a33e437a2fc701704182e9087555ff29d66?force=1 HTTP/1.1
[DEBUG] Target auth state: UNCHALLENGED
[DEBUG] Proxy auth state: UNCHALLENGED
[DEBUG] http-outgoing-1 >> DELETE /v1.24/containers/d75595c671f8459a7d9b5e97d1422a33e437a2fc701704182e9087555ff29d66?force=1 HTTP/1.1
[DEBUG] http-outgoing-1 >> Host: localhost
[DEBUG] http-outgoing-1 >> Connection: Keep-Alive
[DEBUG] http-outgoing-1 >> User-Agent: Apache-HttpClient/4.5.13 (Java/11.0.9)
[DEBUG] http-outgoing-1 >> Accept-Encoding: gzip,deflate
[DEBUG] http-outgoing-1 << HTTP/1.1 204 No Content
[DEBUG] http-outgoing-1 << Api-Version: 1.41
[DEBUG] http-outgoing-1 << Date: Fri, 19 Aug 2022 16:30:03 GMT
[DEBUG] http-outgoing-1 << Docker-Experimental: false
[DEBUG] http-outgoing-1 << Ostype: linux
[DEBUG] http-outgoing-1 << Server: Docker/20.10.17 (linux)
[DEBUG] Connection can be kept alive indefinitely
[DEBUG] Releasing connection
[DEBUG] http-outgoing-1: set socket timeout to 0
[DEBUG] Connection can be kept alive indefinitely
[DEBUG] CookieSpec selected: default
[DEBUG] Auth cache not set in the context
[DEBUG] Get connection for route {}->docker://localhost:2376
[DEBUG] http-outgoing-1: set socket timeout to 0
[DEBUG] Executing request DELETE /v1.24/volumes/pack-layers-tadkkqgzkg?force=1 HTTP/1.1
[DEBUG] Target auth state: UNCHALLENGED
[DEBUG] Proxy auth state: UNCHALLENGED
[DEBUG] http-outgoing-1 >> DELETE /v1.24/volumes/pack-layers-tadkkqgzkg?force=1 HTTP/1.1
[DEBUG] http-outgoing-1 >> Host: localhost
[DEBUG] http-outgoing-1 >> Connection: Keep-Alive
[DEBUG] http-outgoing-1 >> User-Agent: Apache-HttpClient/4.5.13 (Java/11.0.9)
[DEBUG] http-outgoing-1 >> Accept-Encoding: gzip,deflate
[DEBUG] http-outgoing-1 << HTTP/1.1 204 No Content
[DEBUG] http-outgoing-1 << Api-Version: 1.41
[DEBUG] http-outgoing-1 << Date: Fri, 19 Aug 2022 16:30:03 GMT
[DEBUG] http-outgoing-1 << Docker-Experimental: false
[DEBUG] http-outgoing-1 << Ostype: linux
[DEBUG] http-outgoing-1 << Server: Docker/20.10.17 (linux)
[DEBUG] Connection can be kept alive indefinitely
[DEBUG] Releasing connection
[DEBUG] http-outgoing-1: set socket timeout to 0
[DEBUG] Connection can be kept alive indefinitely
[DEBUG] CookieSpec selected: default
[DEBUG] Auth cache not set in the context
[DEBUG] Get connection for route {}->docker://localhost:2376
[DEBUG] http-outgoing-1: set socket timeout to 0
[DEBUG] Executing request DELETE /v1.24/volumes/pack-app-abmgcsmias?force=1 HTTP/1.1
[DEBUG] Target auth state: UNCHALLENGED
[DEBUG] Proxy auth state: UNCHALLENGED
[DEBUG] http-outgoing-1 >> DELETE /v1.24/volumes/pack-app-abmgcsmias?force=1 HTTP/1.1
[DEBUG] http-outgoing-1 >> Host: localhost
[DEBUG] http-outgoing-1 >> Connection: Keep-Alive
[DEBUG] http-outgoing-1 >> User-Agent: Apache-HttpClient/4.5.13 (Java/11.0.9)
[DEBUG] http-outgoing-1 >> Accept-Encoding: gzip,deflate
[DEBUG] http-outgoing-1 << HTTP/1.1 204 No Content
[DEBUG] http-outgoing-1 << Api-Version: 1.41
[DEBUG] http-outgoing-1 << Date: Fri, 19 Aug 2022 16:30:03 GMT
[DEBUG] http-outgoing-1 << Docker-Experimental: false
[DEBUG] http-outgoing-1 << Ostype: linux
[DEBUG] http-outgoing-1 << Server: Docker/20.10.17 (linux)
[DEBUG] Connection can be kept alive indefinitely
[DEBUG] Releasing connection
[DEBUG] http-outgoing-1: set socket timeout to 0
[DEBUG] Connection can be kept alive indefinitely
[DEBUG] CookieSpec selected: default
[DEBUG] Auth cache not set in the context
[DEBUG] Get connection for route {}->docker://localhost:2376
[DEBUG] http-outgoing-1: set socket timeout to 0
[DEBUG] Executing request DELETE /v1.24/images/pack.local/builder/gfhuwccynq:latest?force=1 HTTP/1.1
[DEBUG] Target auth state: UNCHALLENGED
[DEBUG] Proxy auth state: UNCHALLENGED
[DEBUG] http-outgoing-1 >> DELETE /v1.24/images/pack.local/builder/gfhuwccynq:latest?force=1 HTTP/1.1
[DEBUG] http-outgoing-1 >> Host: localhost
[DEBUG] http-outgoing-1 >> Connection: Keep-Alive
[DEBUG] http-outgoing-1 >> User-Agent: Apache-HttpClient/4.5.13 (Java/11.0.9)
[DEBUG] http-outgoing-1 >> Accept-Encoding: gzip,deflate
[DEBUG] http-outgoing-1 << HTTP/1.1 200 OK
[DEBUG] http-outgoing-1 << Api-Version: 1.41
[DEBUG] http-outgoing-1 << Content-Type: application/json
[DEBUG] http-outgoing-1 << Date: Fri, 19 Aug 2022 16:30:04 GMT
[DEBUG] http-outgoing-1 << Docker-Experimental: false
[DEBUG] http-outgoing-1 << Ostype: linux
[DEBUG] http-outgoing-1 << Server: Docker/20.10.17 (linux)
[DEBUG] http-outgoing-1 << Transfer-Encoding: chunked
[DEBUG] Connection can be kept alive indefinitely
[DEBUG] http-outgoing-1: Close connection
[DEBUG] Connection discarded
[DEBUG] Releasing connection [Not bound]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  03:51 min
[INFO] Finished at: 2022-08-19T11:30:04-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.6.6:build-image (default-cli) on project ms_con_psp_getcouponsdetails: Execution default-cli of goal org.springframework.boot:spring-boot-maven-plugin:2.6.6:build-image failed: Builder lifecycle 'creator' failed with status code 145 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.6.6:build-image (default-cli) on project ms_con_psp_getcouponsdetails: Execution default-cli of goal org.springframework.boot:spring-boot-maven-plugin:2.6.6:build-image failed: Builder lifecycle 'creator' failed with status code 145
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:375)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.springframework.boot:spring-boot-maven-plugin:2.6.6:build-image failed: Builder lifecycle 'creator' failed with status code 145
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:148)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.springframework.boot.buildpack.platform.build.BuilderException: Builder lifecycle 'creator' failed with status code 145
    at org.springframework.boot.buildpack.platform.build.Lifecycle.run (Lifecycle.java:196)
    at org.springframework.boot.buildpack.platform.build.Lifecycle.execute (Lifecycle.java:143)
    at org.springframework.boot.buildpack.platform.build.Builder.executeLifecycle (Builder.java:151)
    at org.springframework.boot.buildpack.platform.build.Builder.build (Builder.java:113)
    at org.springframework.boot.maven.BuildImageMojo.buildImage (BuildImageMojo.java:230)
    at org.springframework.boot.maven.BuildImageMojo.execute (BuildImageMojo.java:220)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR]
[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/PluginExecutionException
mfranklin1 commented 2 years ago

FYI I reverted to build pack paketobuildpacks/builder:0.1.234-tiny from a few weeks ago - and upgraded to

org.springframework.boot spring-boot-starter-parent 2.7.3

and now the spring-boot-maven-plugin maven successfully works again. So somewhere between https://hub.docker.com/r/paketobuildpacks/builder/tags?page=1&name=tiny the 0.1.234-tiny release and0.1.245-tiny (latest) something 'broke' in one of the build packs. I'll see if I can isolate it more.

EDIT:

So 0.1.241-tiny from 9 days ago - works fine

0.1.242-tiny from 2 days ago - causes the BeanUtils error.

I'd suggest downgrading to paketobuildpacks/builder:0.1.241-tiny if you are experiencing this issue until it get fixed. I haven't checked but the associated base and full builders from 9 days ago will probably also be okay if you are using one of them.

brianmolinaspring commented 2 years ago

FYI I reverted to build pack paketobuildpacks/builder:0.1.234-tiny from a few weeks ago - and upgraded to org.springframework.boot spring-boot-starter-parent 2.7.3

and now the spring-boot-maven-plugin maven successfully works again. So somewhere between https://hub.docker.com/r/paketobuildpacks/builder/tags?page=1&name=tiny the 0.1.234-tiny release and0.1.245-tiny (latest) something 'broke' in one of the build packs. I'll see if I can isolate it more.

EDIT:

So 0.1.241-tiny from 9 days ago - works fine

0.1.242-tiny from 2 days ago - causes the BeanUtils error.

I'd suggest downgrading to paketobuildpacks/builder:0.1.241-tiny if you are experiencing this issue until it get fixed. I haven't checked but the associated base and full builders from 9 days ago will probably also be okay if you are using one of them.

thanks, this solution my problem, I'm on the lookout for when I fix the other versions

brianmolinaspring commented 2 years ago

thanks, this solution my problem, I'm on the lookout for when I fix the other versions

scottfrederick commented 2 years ago

See https://github.com/paketo-buildpacks/native-image/issues/176 for workarounds to this problem, and follow that issue for the resolution.