You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2012/11/30 10:18:05 UTC
[Bug 54225] New: if initSQL property is set to an empty string a
NullPointerException is thrown by DataSource#getConnection()
https://issues.apache.org/bugzilla/show_bug.cgi?id=54225
Bug ID: 54225
Summary: if initSQL property is set to an empty string a
NullPointerException is thrown by
DataSource#getConnection()
Product: Tomcat Modules
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P2
Component: jdbc-pool
Assignee: dev@tomcat.apache.org
Reporter: jan.keimel@generali.de
Classification: Unclassified
If the Resource in the server.xml is defined with initSQL="" the method
DataSource#getConnection() throws a NullPointerException. I would suggest to
change this behaviour that the part in the
org.apache.tomcat.jdbc.pool.DataSourceFactory class gets changed from
>>>
value = properties.getProperty(PROP_INITSQL);
if (value != null ) {
poolProperties.setInitSQL(value);
}
<<<
to
value = properties.getProperty(PROP_INITSQL);
if (value != null && ! "".equals(value)) {
poolProperties.setInitSQL(value);
}
java.lang.NullPointerException
at
org.apache.tomcat.jdbc.pool.ConnectionPool.setupConnection(ConnectionPool.java:276)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:180)
at
org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:124)
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 54225] if initSQL property is set to an empty string a
NullPointerException is thrown by DataSource#getConnection()
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54225
Filip Hanik <fh...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #1 from Filip Hanik <fh...@apache.org> ---
Fixed in r1616592
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org