Javalin.start() should throw if startup fails
See original GitHub issueActual behavior (the bug)
I have another server occupying the port 8080. The Javalin.start()
function completes successfully, but Javalin is not running.
Expected behavior
Since start()
is synchronous, I expect the start()
function to throw an exception if Javalin
fails to start (e.g. on BindException).
To Reproduce
- run
netcat -l 8080
- start Javalin on port 8080:
Javalin.create().start(8080)
.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Javalin.start() should throw if startup fails · Issue #492
I have another server occupying the port 8080. The Javalin.start() function completes successfully, but Javalin is not running. ... Since start() ...
Read more >Documentation - Javalin - A lightweight Java and Kotlin ...
start() method spawns a user thread, starts the server, and then returns. Your program will not exit until this thread is terminated by...
Read more >Validation improvements, Micrometer support, and a lot of ...
The validation added in 2.2.0 is one of Javalin's most popular ... if it failed to start, now it throws instead; sessionHandler() no...
Read more >Running Javalin on GraalVM (22MB total size)
If the compiler decides to include this class, it will just do that and throw an error if the class is not found....
Read more >Archive - v3 documentation
start() method spawns a user thread, starts the server, and then returns. Your program will not exit until this thread is terminated by...
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
Thanks, missed that one. Fixed in https://github.com/tipsy/javalin/commit/10ebe08b8c10a390baeb0ad2cd607cc285eb1d91.
There’s been a lot of traffic the past few days because of the article in Java Magazine, so I’m trying to respond as quickly as possible 😃
What about: