question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Possible bug during executable .war file creation with spring-boot-maven-plugin

See original GitHub issue

I’ve tested to set up JSF (Mojarra) with the currently Spring-Boot (1.5.6.RELEASE) and try to create an executable .war file with spring-boot-maven-plugin and the repackage goal.

The problem is that the application within this .war starts up but got problem to initialze. After some days of tests and tests and debug, I finally switch down the Spring-Boot Releases step by step and the last working Version for “executable .war Files” is 1.5.2.

Currently I can’t find the final error/bug/reason for this behavior.

I have forked a JSF/SpringBoot Demonstration and set it up with Version 1.5.3.RELEASE

If you follow the instructions (simple mvn clean install spring-boot:repackage) and try to execute it with java -jar you will see the error. Change in pom to a lower version and it runs perfectly.

https://github.com/ton3r/Spring-Boot-JSF-Example

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
wilkinsonacommented, Sep 8, 2017

It’s a regression in Tomcat 8.5.14. I’ve opened https://bz.apache.org/bugzilla/show_bug.cgi?id=61503. There’s nothing much that we can do in Spring Boot so I’m going to close this. We’ll pick up a version of Tomcat that fixes the problem in due course.

1reaction
wilkinsonacommented, Sep 8, 2017

Thanks for the sample. I’ve successfully reproduced the problem now.

As far as I can tell, the problem isn’t with Spring Boot itself but with the version of Tomcat that’s used. Spring Boot 1.5.2 works and it uses Tomcat 8.5.11. Spring Boot 1.5.3 and later fail and they use more recent versions of Tomcat 8.5. Crucially, Spring Boot 1.5.6 works if I set <tomcat.version>8.5.11</tomcat.version> in the application’s pom. Lastly, Spring Boot 1.5.6 fails with the latest version of Tomcat 8.5 (8.5.20) so the change in Tomcat’s still there.

Read more comments on GitHub >

github_iconTop Results From Across the Web

maven build failing when generating war package for spring ...
java class as a normal Java app, build a war file that is both standalone executable and deployable in external Tomcat as usual...
Read more >
Spring Boot - Executable war file structure - LogicBig
This war file of course won't be executable, but can be deployed to a server running with servlet container.
Read more >
Create a Deployable WAR File with Spring Boot
With this blog post, I will share how to edit your Spring Boot app so that when built with Maven, it generates a...
Read more >
Converting a Spring Boot JAR Application to a WAR
For detailed steps on how to configure your application to create a WAR file for your container, please see: Packaging executable jar and...
Read more >
Spring Boot Reference Guide
Build tool plugins. 58. Spring Boot Maven plugin. 58.1. Including the plugin; 58.2. Packaging executable jar and war files. 59. Spring Boot Gradle...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found