Need help with these warnings when debugging is stopped

Hello! I am getting these warnings when I stop debugging, I was wondering if this is normal behavior or something with our configuration that is affecting:

2025-04-17T15:22:52.511-04:00 WARN 8281 — [nio-8080-exec-5] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.http.converter.HttpMessageNotWritableException: No converter for [class java.util.LinkedHashMap] with preset Content-Type ‘text/plain;charset=ISO-8859-1’]

Disconnected from the target VM, address: ‘127.0.0.1:50847’, transport: ‘socket’
2025-04-17T15:23:17.714-04:00 INFO 8281 — [ionShutdownHook] o.s.b.w.e.tomcat.GracefulShutdown : Commencing graceful shutdown. Waiting for active requests to complete
2025-04-17T15:23:17.717-04:00 INFO 8281 — [tomcat-shutdown] o.s.b.w.e.tomcat.GracefulShutdown : Graceful shutdown complete
2025-04-17T15:23:17.728-04:00 INFO 8281 — [ionShutdownHook] i.j.d.impl.JmixEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit ‘main’
2025-04-17T15:23:17.730-04:00 INFO 8281 — [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated…
2025-04-17T15:23:17.731-04:00 INFO 8281 — [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.

2025-04-17T15:23:17.739-04:00 WARN 8281 — [ionShutdownHook] org.atmosphere.cpr.DefaultBroadcaster : AtmosphereResource 93916d7c-5df7-435c-a280-4ee5dc30ac04 is not suspended. If cached messages exists, this may cause unexpected situation. Suspend first

Greetings!

Seems like this is fine behaviour for shutting down the application.
In overall, this behavior is expected and doesn’t affect your application’s functionality:


1. HttpMessageNotWritableException: No converter for LinkedHashMap with preset Content-Type 'text/plain;charset=ISO-8859-1'

Idk, why this happends, need to check code, but as I understand - Spring is trying to write a LinkedHashMap (for example, from a @ExceptionHandler that returns a Map<String, Object>) to the response body, but the response’s Content-Type is text/plain. Spring Boot doesn’t include a message converter that can serialize a Map as plain text, so you get this warning.

How to fix it:

  • Return JSON explicitly:
    @ExceptionHandler(MyException.class)
    @ResponseBody
    @RequestMapping(produces = MediaType.APPLICATION_JSON_VALUE)
    public ResponseEntity<Map<String, Object>> handleMyEx(MyException ex) {
        // …
    }
    
  • Or return a simple String if you really want plain text:
    @ExceptionHandler(MyException.class)
    public ResponseEntity<String> handleMyEx(MyException ex) {
        return ResponseEntity
            .status(HttpStatus.BAD_REQUEST)
            .body("Error: " + ex.getMessage());
    }
    
  • In most Spring Boot apps, MappingJackson2HttpMessageConverter is already on the classpath. Just ensure your controller methods are annotated (e.g. with @ResponseBody or @RestController) so that JSON conversion kicks in.

2. Graceful shutdown INFO logs

Commencing graceful shutdown. Waiting for active requests to complete  
Graceful shutdown complete  
Closing JPA EntityManagerFactory for persistence unit ‘main’  
HikariPool-1 - Shutdown initiated…  
HikariPool-1 - Shutdown completed.

These are purely informational logs from Tomcat, Spring Boot, JPA and HikariCP when your application is shutting down. They indicate:

  1. Tomcat is waiting for in-flight requests to finish.
  2. The JPA EntityManagerFactory is closing.
  3. The Hikari connection pool is shutting down.

You can safely ignore these — they confirm that resources are being closed cleanly.


3. WARN … DefaultBroadcaster : AtmosphereResource … is not suspended

This warning comes from Atmosphere (used by Vaadin/Jmix for server‑push). On shutdown, some Atmosphere resources weren’t suspended before cached messages were cleaned up. Since the server is stopping anyway, those messages won’t be delivered, so it’s harmless.

If you really want to silence it: (that i not recommend)
You can programmatically shut down all broadcasters when your application context closes:

import org.atmosphere.cpr.BroadcasterFactory;

// in a @PreDestroy method or ApplicationListener<ContextClosedEvent>:
BroadcasterFactory.getDefault().shutdown();

In summary:

  • First warning: adjust your controller to produce JSON (or return a plain String), seems like side effect, not related
  • Shutdown INFO logs: normal, nothing to fix.
  • Atmosphere warning: harmless on shutdown; optionally shut down broadcasters yourself if you need to clean up more explicitly. But as i said this is ok for vaadin & jmix

Best Regards,
Dmitry

1 Like