Uber Jar created from maven-shade-plugin failed on application startup
See original GitHub issueEnvironment Details
- Helidon Version: 1.4.1
- Helidon MP
- JDK version: Open JDK 8
- OS: Window 10
Problem Description
Plugin :
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>${mainClass}</mainClass>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>META-INF/beans.xml</resource>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
Console output
Feb 06, 2020 6:08:13 PM io.helidon.microprofile.server.Main configureLogging
INFO: Logging configured using defaults
Feb 06, 2020 6:08:13 PM org.jboss.weld.bootstrap.WeldStartup <clinit>
INFO: WELD-000900: 3.1.1 (Final)
Feb 06, 2020 6:08:14 PM org.jboss.weld.environment.deployment.discovery.DiscoveryStrategyFactory create
INFO: WELD-ENV-000020: Using jandex for bean discovery
Feb 06, 2020 6:08:18 PM org.jboss.weld.bootstrap.WeldStartup startContainer
INFO: WELD-000101: Transactional services not available. Injection of @Inject UserTransaction not available. Transactional observers will be invoked synchronously.
Exception in thread "main" org.jboss.weld.exceptions.DeploymentException: Exception List with 2 exceptions:
Exception 0 :
org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type double with qualifiers @ConfigProperty
at injection point [BackedAnnotatedParameter] Parameter 2 of [BackedAnnotatedConstructor] @Inject io.helidon.health.checks.DiskSpaceHealthCheck(@ConfigProperty File, @ConfigProperty double)
at io.helidon.health.checks.DiskSpaceHealthCheck.<init>(DiskSpaceHealthCheck.java:0)
at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:378)
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:290)
at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:143)
at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:164)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:526)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:64)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:62)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:62)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:55)
at org.jboss.weld.executor.CommonForkJoinPoolExecutorServices.lambda$wrap$0(CommonForkJoinPoolExecutorServices.java:70)
at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1424)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Steps to reproduce
mvn clean package java -jar target\microservice-starter-helidon.jar
https://github.com/ERS-HCL/microservice-starter/tree/master/microservice-starter-helidon
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Uber Jar created from maven-shade-plugin failed on ... - GitHub
Hello, in general we prefer (and support) deployment with multiple jars (as is created with our quickstarts), due to issues with resources in...
Read more >Jersey fails when creating uber jar with maven-assembly-plugin
The problem this poses when creating an uber jar is that there may be multiple jars with the same file, as different jars...
Read more >Building and running Drools in a fat jar not working starting 7.45
At runtime, we see the error message "There already exists an implementation for service org.kie.api.KieServices with same priority 0".
Read more >How to create executable JAR for camel-main project
You need to use maven-shade-plugin to create executable JAR. Be aware that uber jar is not fully tested feature and it is Your...
Read more >Java Deployment Options | Cloud Functions Documentation
An uber JAR is a JAR file that contains the function classes as well as all of its dependencies. You can build an...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can run your application, but you need to exclude some features from Helidon (as these depend on the
beans.xml
not being present in their jar file). Change your dependency on Helidon as follows:Modify your shade plugin configuration as follows:
Closing this issue as