The H2 database registers a JVM shutdown hook to ensure database files are properly closed on shutdown. We don’t really need this as we only use it in-memory (H2 also supports databases backed by persistent files ), and it gets in the way as this hook will have a reference to the H2 loading classloader; since we have several integration tests needing isolated or custom classloaders, these classloaders are being leaked. |