You can change the DB log parameter "log_statement" setting to ALL for the
time being and ensure the query execution.



On Mon, Jun 15, 2015 at 2:12 PM, Jose María Zaragoza <demablo...@gmail.com>
wrote:

> Hello:
>
>
> I'm using Tomcat 7.0.59 and PostgreSQL JDBC driver 9.4-1201-jdbc4
>
> The context.xml settings are
>
>
> <Resource auth="Container" type="javax.sql.DataSource"
>                   factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
>                   driverClassName="org.postgresql.Driver"
>                   initialSize="0"  maxActive="100" maxIdle="20"
> maxWait="10000" mindIdle="0"
>                   name="datasource/bbdd" password="fake"
> removeAbandoned="true"
>
>
> url="jdbc:postgresql://localhost:9999,localhost:5432,localhost:5433/bbdd?LoginTimeout=3&amp;loadBalanceHosts=false"
>                   username="foo" validationQuery="SELECT 1"
> testOnBorrow="true" timeBetweenEvictionRunsMillis="0"/>
>
>
> I've configured JDBC driver in failover mode ( as you can see in URL
> definition )
>
> When I test this configuration ( I stop/start databases but , at
> least, there is one running ) , sometimes I'm getting this error
> message:
>
>
> org.apache.ibatis.exceptions.PersistenceException:
> ### Error querying database.  Cause:
> org.postgresql.util.PSQLException: This connection has been closed.
>
> How is it possible if testOnBorrow="true" and validationQuery="SELECT 1" ?
> How I can debug if validationQuery is working as I want  ?
>
>
> Thanks and regards
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to