You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "McKenzie, Mitch" <mm...@MarkelCorp.com> on 2016/08/17 17:34:22 UTC

Tomcat 8.5 Resource Setting Says it's being ignored but documentation shows it is supported

Seeing the following  warning for all of my datasources when tomcat 8.5.4 starts up : Ignoring unknown property: value of "30000" for "validationInterval" property

I see validationInterval in the docs here: https://tomcat.apache.org/tomcat-8.5-doc/jdbc-pool.html

Here is one of my resource defs:

<Resource
name="jdbc/XYZAPP"
auth="Container"
type="javax.sql.DataSource"
factory="org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory"
username="?"
password="?"
driverClassName="some.driver"
url="jdbc:xyz://xyzapp:12345/SomeDB"
initialSize="10"
maxTotal="100"
maxIdle="50"
minIdle="10"
timeBetweenEvictionRunsMillis="30000"
minEvictableIdleTimeMillis="60000"
testOnBorrow="true"
testWhileIdle="false"
testOnReturn="false"
validationQuery="SELECT 1"
validationInterval="30000"
validationQueryTimeout="3"/>


This message has been scanned for malware by Websense. www.websense.com

RE: Tomcat 8.5 Resource Setting Says it's being ignored but documentation shows it is supported

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: McKenzie, Mitch [mailto:mmckenzie@MarkelCorp.com] 
> Subject: Tomcat 8.5 Resource Setting Says it's being ignored but documentation shows it is supported


> Seeing the following  warning for all of my datasources when tomcat 8.5.4 starts up : 
> Ignoring unknown property: value of "30000" for "validationInterval" property

As you should.

> factory="org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory"

> I see validationInterval in the docs here: https://tomcat.apache.org/tomcat-8.5-doc/jdbc-pool.html

Which is the doc for org.apache.tomcat.jdbc.pool.  If you're using DBCP2, you should be looking at the following doc, which is linked to from at least two places in the Tomcat web pages:
http://commons.apache.org/proper/commons-dbcp/configuration.html

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat 8.5 Resource Setting Says it's being ignored but documentation shows it is supported

Posted by Mark Eggers <it...@yahoo.com.INVALID>.
On 8/17/2016 10:34 AM, McKenzie, Mitch wrote:
> Seeing the following  warning for all of my datasources when tomcat 8.5.4 starts up : Ignoring unknown property: value of "30000" for "validationInterval" property
> 
> I see validationInterval in the docs here: https://tomcat.apache.org/tomcat-8.5-doc/jdbc-pool.html
> 
> Here is one of my resource defs:
> 
> <Resource
> name="jdbc/XYZAPP"
> auth="Container"
> type="javax.sql.DataSource"
> factory="org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory"
> username="?"
> password="?"
> driverClassName="some.driver"
> url="jdbc:xyz://xyzapp:12345/SomeDB"
> initialSize="10"
> maxTotal="100"
> maxIdle="50"
> minIdle="10"
> timeBetweenEvictionRunsMillis="30000"
> minEvictableIdleTimeMillis="60000"
> testOnBorrow="true"
> testWhileIdle="false"
> testOnReturn="false"
> validationQuery="SELECT 1"
> validationInterval="30000"
> validationQueryTimeout="3"/>
> 
> 
> This message has been scanned for malware by Websense. www.websense.com
> 

I believe that the configuration above is for Tomcat's database
connection pooling factory, and not the default repackaged Apache
Commons DBCP 2.x factory.

In order to use the Tomcat factory, you'll have to add the following
line to your context.xml:

factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"

See the following for more information:

https://tomcat.apache.org/tomcat-8.5-doc/jdbc-pool.html

. . . just my two cents
/mde/