Bug 61312

Summary: NullPointerException in StatementCache.isCached
Product: Tomcat Modules Reporter: Holger Sunke <holger.sunke>
Component: jdbc-poolAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description Holger Sunke 2017-07-17 10:52:30 UTC
Hallo,

I somehow got a NPE in StatementCache.isCached method  with Apache Tomcat 8.5.14:

The private PooledConnection pcon is null in this situation:

Caused by: java.lang.NullPointerException: null
	at org.apache.tomcat.jdbc.pool.interceptor.StatementCache.isCached(StatementCache.java:202) ~[tomcat-jdbc.jar:na]
	at org.apache.tomcat.jdbc.pool.interceptor.StatementCache.invoke(StatementCache.java:175) ~[tomcat-jdbc.jar:na]
	at org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:108) ~[tomcat-jdbc.jar:na]
	at org.apache.tomcat.jdbc.pool.interceptor.AbstractCreateStatementInterceptor.invoke(AbstractCreateStatementInterceptor.java:75) ~[tomcat-jdbc.jar:na]
	at org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:108) ~[tomcat-jdbc.jar:na]
	at org.apache.tomcat.jdbc.pool.interceptor.ConnectionState.invoke(ConnectionState.java:152) ~[tomcat-jdbc.jar:na]
	at org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:108) ~[tomcat-jdbc.jar:na]
	at org.apache.tomcat.jdbc.pool.TrapException.invoke(TrapException.java:40) ~[tomcat-jdbc.jar:na]
	... 136 common frames omitted
Comment 1 changjun 2018-01-08 09:55:53 UTC
hi everyone,

is there any update of this bug? any workaround of this bug? thanks.
Comment 2 Keiichi Fujino 2018-01-11 01:44:11 UTC
Done.
see r1820816

This fix will be in :
- 9.0.x for 9.0.3 onwards
- 8.5.x for 8.5.25 onwards
- 8.0.x for 8.0.49 onwards
- 7.0.x for 7.0.84 onwards