helidon-io / helidon

Java libraries for writing microservices
https://helidon.io
Apache License 2.0
3.52k stars 564 forks source link

Failed to execute goal io.helidon.build-tools:helidon-maven-plugin:2.1.2:jlink-image #2681

Closed tivrfoa closed 3 years ago

tivrfoa commented 3 years ago

Hi,

I got the erro below when I ran the command: mvn package -Pjlink-image

...
[INFO] Including 17 Java dependencies: java.base, java.datatransfer, java.desktop, java.instrument, java.logging, java.management, java.naming, java.prefs, java.security.sasl, java.sql, java.transaction.xa, java.xml, jdk.attach, jdk.internal.jvmstat, jdk.jdi, jdk.jdwp.agent, jdk.unsupported
[INFO] Including debug support: jdk.jdwp.agent
[INFO] Creating base image: target\helidon-quickstart-mp-jri
[INFO] Installing 132 application jars in target\helidon-quickstart-mp-jri\app
[INFO]   checking index in CDI beans archive helidon-quickstart-mp.jar
[INFO]   creating missing index for CDI beans archive helidon-microprofile-server-2.2.0.jar
[INFO]   creating missing index for CDI beans archive jersey-weld2-se-2.32.jar
[INFO]   creating missing index for CDI beans archive helidon-health-checks-2.2.0.jar
[INFO]   creating missing index for CDI beans archive helidon-microprofile-fault-tolerance-2.2.0.jar
[INFO]   creating missing index for CDI beans archive openapi-ui-1.1.4.jar
[INFO] Creating startup class list for helidon-quickstart-mp.jar
[INFO] Creating Class Data Sharing archive for helidon-quickstart-mp.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  02:33 min
[INFO] Finished at: 2021-01-22T10:41:03-03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.helidon.build-tools:helidon-maven-plugin:2.1.2:jlink-image (jlink-image) on project helidon-quickstart-mp: Image generation error: io.helidon.build.util.ProcessMonitor$ProcessTimeoutException: Creating Class Data Sharing archive for helidon-quickstart-mp.jar timed out
[ERROR]     OpenJDK 64-Bit Server VM warning: Pre JDK 6 class not supported by CDS: 49.0 javax/inject/Provider
[ERROR]     [2.179s][warning][cds] Preload Warning: Verification failed for org.jboss.weld.environment.se.Weld
[ERROR]     [2.184s][warning][cds] Preload Warning: Verification failed for io.helidon.microprofile.cdi.HelidonContainerImpl
[ERROR]     OpenJDK 64-Bit Server VM warning: Pre JDK 6 class not supported by CDS: 49.0 javax/inject/Provider
[ERROR]     [2.194s][warning][cds] Preload Warning: Cannot find javax/inject/Provider
[ERROR]     OpenJDK 64-Bit Server VM warning: Pre JDK 6 class not supported by CDS: 49.0 javax/inject/Provider
[ERROR]     [2.196s][warning][cds] Preload Warning: Cannot find javax/enterprise/inject/Instance
[ERROR]     OpenJDK 64-Bit Server VM warning: Pre JDK 6 class not supported by CDS: 49.0 javax/inject/Provider
[ERROR]     [2.199s][warning][cds] Preload Warning: Cannot find javax/enterprise/inject/se/SeContainer
[ERROR]     OpenJDK 64-Bit Server VM warning: Pre JDK 6 class not supported by CDS: 49.0 javax/inject/Provider
[ERROR]     [2.415s][warning][cds] Preload Warning: Cannot find javax/enterprise/inject/spi/CDI
[ERROR]     OpenJDK 64-Bit Server VM warning: Pre JDK 6 class not supported by CDS: 49.0 javax/inject/Provider
[ERROR]     [2.423s][warning][cds] Preload Warning: Cannot find org/jboss/weld/inject/WeldInstance
[ERROR]     OpenJDK 64-Bit Server VM warning: Pre JDK 6 class not supported by CDS: 49.0 javax/inject/Provider
[ERROR]     [2.429s][warning][cds] Preload Warning: Cannot find org/jboss/weld/AbstractCDI
[ERROR]     OpenJDK 64-Bit Server VM warning: Pre JDK 6 class not supported by CDS: 49.0 javax/inject/Provider
[ERROR]     [2.439s][warning][cds] Preload Warning: Cannot find io/helidon/microprofile/cdi/HelidonContainerImpl$HelidonCdi
[ERROR]     [7.303s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy1
[ERROR]     [24.931s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy4
[ERROR]     [24.932s][warning][cds] Preload Warning: Cannot find javax/inject/Scope
[ERROR]     OpenJDK 64-Bit Server VM warning: Pre JDK 6 class not supported by CDS: 49.0 javax/inject/Scope
[ERROR]     [24.932s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy6
[ERROR]     [24.946s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy7
[ERROR]     OpenJDK 64-Bit Server VM warning: Pre JDK 6 class not supported by CDS: 49.0 javax/inject/Named
[ERROR]     [24.946s][warning][cds] Preload Warning: Cannot find javax/inject/Named
[ERROR]     OpenJDK 64-Bit Server VM warning: Pre JDK 6 class not supported by CDS: 49.0 javax/inject/Qualifier
[ERROR]     [24.947s][warning][cds] Preload Warning: Cannot find javax/inject/Qualifier
[ERROR]     [24.947s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy8
[ERROR]     [24.947s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy9
[ERROR]     [25.105s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy10
[ERROR]     [25.105s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy11
[ERROR]     [25.105s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy12
[ERROR]     [25.106s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy13
[ERROR]     OpenJDK 64-Bit Server VM warning: Pre JDK 6 class not supported by CDS: 49.0 javax/inject/Provider
[ERROR]     [26.305s][warning][cds] Preload Warning: Verification failed for org.jboss.weld.manager.BeanManagerImpl
[ERROR]     OpenJDK 64-Bit Server VM warning: Pre JDK 6 class not supported by CDS: 49.0 javax/inject/Inject
[ERROR]     [27.226s][warning][cds] Preload Warning: Cannot find javax/inject/Inject
[ERROR]     OpenJDK 64-Bit Server VM warning: Pre JDK 6 class not supported by CDS: 49.0 javax/inject/Singleton
[ERROR]     [27.486s][warning][cds] Preload Warning: Cannot find javax/inject/Singleton
[ERROR]     OpenJDK 64-Bit Server VM warning: Pre JDK 6 class not supported by CDS: 49.0 javax/inject/Provider
[ERROR]     [27.886s][warning][cds] Preload Warning: Verification failed for org.jboss.weld.bean.builtin.BeanManagerProxy
[ERROR]     [28.405s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy15
[ERROR]     [28.422s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy16
[ERROR]     [28.427s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy17
[ERROR]     [28.445s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy18
[ERROR]     OpenJDK 64-Bit Server VM warning: Pre JDK 6 class not supported by CDS: 49.0 javax/inject/Provider
[ERROR]     [28.940s][warning][cds] Preload Warning: Cannot find org/jboss/weld/environment/se/WeldContainer
[ERROR]     [28.957s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy20
[ERROR]     [29.061s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy21
[ERROR]     [29.065s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy22
[ERROR]     OpenJDK 64-Bit Server VM warning: Pre JDK 6 class not supported by CDS: 49.0 javax/inject/Named
[ERROR]     [29.828s][warning][cds] Preload Warning: Verification failed for org.jboss.weld.resolution.ResolvableBuilder
[ERROR]     [30.049s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy23
[ERROR]     [30.635s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy24
[ERROR]     [30.723s][warning][cds] Preload Warning: Cannot find io/helidon/microprofile/metrics/$Proxy25
[ERROR]     [30.827s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy26
[ERROR]     [30.827s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy27
[ERROR]     [30.827s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy28
[ERROR]     [30.827s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy29
[ERROR]     [30.828s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy30
[ERROR]     [30.828s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy31
[ERROR]     [30.828s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy32
[ERROR]     [30.857s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy33
[ERROR]     [30.885s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy34
[ERROR]     [30.915s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy35
[ERROR]     [30.944s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy36
[ERROR]     [31.032s][warning][cds] Preload Warning: Cannot find io/helidon/microprofile/metrics/$Proxy37
[ERROR]     [31.032s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy38
[ERROR]     [31.056s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy39
[ERROR]     [31.067s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy40
[ERROR]     [31.130s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy41
[ERROR]     [31.264s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy42
[ERROR]     [31.452s][warning][cds] Preload Warning: Cannot find io/helidon/microprofile/faulttolerance/$Proxy43
[ERROR]     [31.582s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy44
[ERROR]     [31.586s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy45
[ERROR]     [31.587s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy46
[ERROR]     [31.595s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy47
[ERROR]     [31.720s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy48
[ERROR]     [31.969s][warning][cds] Preload Warning: Cannot find io/helidon/microprofile/jwt/auth/$Proxy49
[ERROR]     [31.969s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy50
[ERROR]     [32.048s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy51
[ERROR]     [33.296s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy52
[ERROR]     [33.643s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy53
[ERROR]     [34.202s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy54
[ERROR]     [34.203s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy55
[ERROR]     [34.253s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy56
[ERROR]     [34.253s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy57
[ERROR]     [34.254s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy58
[ERROR]     [34.292s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy59
[ERROR]     [34.292s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy60
[ERROR]     [34.309s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy61
[ERROR]     [34.310s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy62
[ERROR]     [34.656s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy63
[ERROR]     [34.657s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy64
[ERROR]     [34.657s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy65
[ERROR]     [34.657s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy66
[ERROR]     [34.808s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy67
[ERROR]     [34.808s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy68
[ERROR]     OpenJDK 64-Bit Server VM warning: Pre JDK 6 class not supported by CDS: 49.0 javax/inject/Provider
[ERROR]     [45.336s][warning][cds] Preload Warning: Cannot find org/jboss/weld/bean/builtin/InstanceImpl
[ERROR]     OpenJDK 64-Bit Server VM warning: Pre JDK 6 class not supported by CDS: 49.0 javax/inject/Provider
[ERROR]     [45.450s][warning][cds] resolve_indy for class org/jboss/weld/environment/se/WeldSEBeanRegistrant has encountered exception: java.lang.UnsupportedClassVersionError Unsupported major.minor version for dump time 49.0
[ERROR]     OpenJDK 64-Bit Server VM warning: Pre JDK 6 class not supported by CDS: 49.0 javax/inject/Provider
[ERROR]     [45.456s][warning][cds] Preload Warning: Verification failed for org.jboss.weld.bootstrap.events.configurator.BeanConfiguratorImpl$CreateCallback
[ERROR]     OpenJDK 64-Bit Server VM warning: Pre JDK 6 class not supported by CDS: 49.0 javax/inject/Provider
[ERROR]     [45.457s][warning][cds] resolve_indy for class io/helidon/microprofile/config/ConfigCdiExtension has encountered exception: java.lang.UnsupportedClassVersionError Unsupported major.minor version for dump time 49.0
[ERROR]     [45.457s][warning][cds] resolve_indy for class io/helidon/microprofile/config/ConfigCdiExtension has encountered exception: java.lang.UnsupportedClassVersionError Unsupported major.minor version for dump time 49.0
[ERROR]     [45.457s][warning][cds] resolve_indy for class io/helidon/microprofile/config/ConfigCdiExtension has encountered exception: java.lang.UnsupportedClassVersionError Unsupported major.minor version for dump time 49.0
[ERROR]     [45.457s][warning][cds] resolve_indy for class io/helidon/microprofile/config/ConfigCdiExtension has encountered exception: java.lang.UnsupportedClassVersionError Unsupported major.minor version for dump time 49.0
[ERROR]     [45.457s][warning][cds] resolve_indy for class io/helidon/microprofile/config/ConfigCdiExtension has encountered exception: java.lang.UnsupportedClassVersionError Unsupported major.minor version for dump time 49.0
[ERROR]     [45.457s][warning][cds] resolve_indy for class io/helidon/microprofile/config/ConfigCdiExtension has encountered exception: java.lang.UnsupportedClassVersionError Unsupported major.minor version for dump time 49.0
[ERROR]     [45.670s][warning][cds] Preload Warning: Verification failed for org.jboss.weld.resolution.InterceptorResolvableBuilder
[ERROR]     [45.690s][warning][cds] Preload Warning: Verification failed for org.jboss.weld.resolution.DecoratorResolvableBuilder
[ERROR]     [46.248s][warning][cds] Preload Warning: Cannot find org/microprofileext/openapi/swaggerui/StaticResourcesService$Proxy$_$$_WeldSubclass
[ERROR]     [46.261s][warning][cds] Preload Warning: Cannot find org/microprofileext/openapi/swaggerui/OpenApiUiService$Proxy$_$$_WeldSubclass
[ERROR]     [46.299s][warning][cds] Preload Warning: Cannot find io/helidon/examples/quickstart/mp/GreetResource$Proxy$_$$_WeldSubclass
[ERROR]     OpenJDK 64-Bit Server VM warning: Pre JDK 6 class not supported by CDS: 49.0 javax/inject/Provider
[ERROR]     [46.318s][warning][cds] resolve_indy for class org/jboss/weld/AbstractCDI has encountered exception: java.lang.UnsupportedClassVersionError Unsupported major.minor version for dump time 49.0
[ERROR]     [49.433s][warning][cds] resolve_indy for class io/helidon/microprofile/config/ConfigCdiExtension has encountered exception: java.lang.UnsupportedClassVersionError Unsupported major.minor version for dump time 49.0
[ERROR]     [49.487s][warning][cds] resolve_indy for class io/helidon/microprofile/config/ConfigCdiExtension has encountered exception: java.lang.UnsupportedClassVersionError Unsupported major.minor version for dump time 49.0
[ERROR]     [49.548s][warning][cds] resolve_indy for class io/helidon/microprofile/config/ConfigCdiExtension has encountered exception: java.lang.UnsupportedClassVersionError Unsupported major.minor version for dump time 49.0
[ERROR]     [52.493s][warning][cds] Preload Warning: Cannot find jdk/proxy2/$Proxy72
[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

The repository is here: https://github.com/tivrfoa/helidon-openapi-swagger-ui

Windows 10 64 bits

/helidon-quickstart-mp $ javac --version javac 16-ea

$ java --version openjdk 16-ea 2021-03-16 OpenJDK Runtime Environment (build 16-ea+32-2190) OpenJDK 64-Bit Server VM (build 16-ea+32-2190, mixed mode, sharing)

tivrfoa commented 3 years ago

Bulding with docker works:

docker build -t helidon-quickstart-mp-jri -f Dockerfile.jlink .

REPOSITORY                                                                    TAG                      IMAGE ID       CREATED         SIZE
helidon-quickstart-mp-jri                                                     latest                   1be88682d1fd   2 minutes ago   199MB

docker run -it helidon-quickstart-mp-jri

2021.01.22 14:15:58 INFO io.helidon.common.LogConfig Thread[main,5,main]: Logging at initialization configured using classpath: /logging.properties
2021.01.22 14:15:58 INFO org.jboss.weld.Version Thread[main,5,main]: WELD-000900: 3.1.4 (Final)
2021.01.22 14:15:58 INFO org.jboss.weld.Bootstrap Thread[main,5,main]: WELD-ENV-000020: Using jandex for bean discovery
2021.01.22 14:15:58 INFO org.jboss.weld.Bootstrap Thread[main,5,main]: WELD-000101: Transactional services not available. Injection of @Inject UserTransaction not available. Transactional observers will be invoked synchronously.
2021.01.22 14:15:59 INFO org.jboss.weld.Event Thread[main,5,main]: WELD-000411: Observer method [BackedAnnotatedMethod] private io.helidon.microprofile.openapi.OpenApiCdiExtension.processAnnotatedType(@Observes ProcessAnnotatedType<X>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
2021.01.22 14:15:59 INFO org.jboss.weld.Event Thread[main,5,main]: WELD-000411: Observer method [BackedAnnotatedMethod] public org.glassfish.jersey.ext.cdi1x.internal.ProcessAllAnnotatedTypes.processAnnotatedType(@Observes ProcessAnnotatedType<?>, BeanManager) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
2021.01.22 14:16:00 INFO io.helidon.tracing.tracerresolver.TracerResolverBuilder Thread[main,5,main]: TracerResolver not configured, tracing is disabled
2021.01.22 14:16:00 WARNING io.helidon.microprofile.tracing.TracingCdiExtension Thread[main,5,main]: helidon-microprofile-tracing is on the classpath, yet there is no tracer implementation library. Tracing uses a no-op tracer. As a result, no tracing will be configured for WebServer and JAX-RS
2021.01.22 14:16:00 INFO io.helidon.microprofile.security.SecurityCdiExtension Thread[main,5,main]: Authentication provider is missing from security configuration, but security extension for microprofile is enabled (requires providers configuration at key security.providers). Security will not have any valid authentication provider
2021.01.22 14:16:00 INFO io.helidon.microprofile.security.SecurityCdiExtension Thread[main,5,main]: Authorization provider is missing from security configuration, but security extension for microprofile is enabled (requires providers configuration at key security.providers). ABAC provider is configured for authorization.
2021.01.22 14:16:00 INFO io.helidon.microprofile.server.ServerCdiExtension Thread[main,5,main]: Registering JAX-RS Application: HelidonMP
2021.01.22 14:16:01 INFO io.helidon.webserver.NettyWebServer Thread[nioEventLoopGroup-2-1,10,main]: Channel '@default' started: [id: 0x48e366c4, L:/0.0.0.0:8080]
2021.01.22 14:16:01 INFO io.helidon.microprofile.server.ServerCdiExtension Thread[main,5,main]: Server started on http://localhost:8080 (and all other host addresses) in 3640 milliseconds (since JVM startup).
2021.01.22 14:16:01 INFO io.helidon.common.HelidonFeatures Thread[features-thread,5,main]: Helidon MP 2.2.0 features: [CDI, Config, Fault Tolerance, Health, JAX-RS, Metrics, Open API, Security, Server, Tracing]
^C2021.01.22 14:17:17 INFO io.helidon.webserver.NettyWebServer Thread[nioEventLoopGroup-2-1,10,main]: Channel '@default' closed: [id: 0x48e366c4, L:/0.0.0.0:8080]
2021.01.22 14:17:17 INFO io.helidon.microprofile.server.ServerCdiExtension Thread[helidon-cdi-shutdown-hook,5,main]: Server stopped in 73 milliseconds.
Server stopped in 73 milliseconds.
2021.01.22 14:17:18 INFO org.jboss.weld.Bootstrap Thread[helidon-cdi-shutdown-hook,5,main]: WELD-ENV-002001: Weld SE container 758b65d9-c925-4be5-a315-1b60f9783e97 shut down
romain-grecourt commented 3 years ago

It failed because it took too long: Image generation error: io.helidon.build.util.ProcessMonitor$ProcessTimeoutException: Creating Class Data Sharing archive for helidon-quickstart-mp.jar timed out.

We did raise the hard-coded timeouts in the upcoming version of the jlink-image tool (from 60s to5min) however they should be configurable with the plugin. I've filed an enhancement for that here: https://github.com/oracle/helidon-build-tools/issues/342

tivrfoa commented 3 years ago

It failed because it took too long: Image generation error: io.helidon.build.util.ProcessMonitor$ProcessTimeoutException: Creating Class Data Sharing archive for helidon-quickstart-mp.jar timed out.

We did raise the hard-coded timeouts in the upcoming version of the jlink-image tool (from 60s to5min) however they should be configurable with the plugin. I've filed an enhancement for that here: oracle/helidon-build-tools#342

Thank you! Would you like me to close this issue? Please feel free to close it if you prefer.