Bug 61312 - NullPointerException in StatementCache.isCached
Summary: NullPointerException in StatementCache.isCached
Status: RESOLVED FIXED
Alias: None
Product: Tomcat Modules
Classification: Unclassified
Component: jdbc-pool (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-17 10:52 UTC by Holger Sunke
Modified: 2018-01-11 01:44 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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