This week's giveaway is in the Java/Jakarta EE forum. We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line! See Tomcat code may need to write the contents of your session to some external location for various reasons.
And it appears that you tried to put a JDBC connection (or rather, the connection from a connection pool) into your session. Why did you do that? You shouldn't hang onto a session for any longer than a single request, and there's no point in doing so. Just get a connection from the pool every time you need one.