On one developer workstation running Eclipse Helios SR2, Windows 7 and Tomcat 6.0.32 we have a very strange case of duplicate JNDI connection pools
- Running tomcat from Eclipse
- server.xml
>
<Context docBase="path to web app" path="/ds-web" reloadable="true">
<Resource
name="jdbc/ds"
username="ds"
password="pass"
type="javax.sql.DataSource"
url="jdbc:postgresql://localhost:5432/ds"
auth="Container"
driverClassName="org.postgresql.Driver"
factory="org.apache.commons.dbcp.BasicDataSourceFactory"
logAbandoned="true"
maxActive="30"
maxIdle="10"
maxWait="1000"
removeAbandoned="true"
removeAbandonedTimeout="60"
validationQuery="SELECT 1"
testOnBorrow="true"
testOnReturn="true"/>
</Context>
- When start server, on the console we see the following 3 times in a row
AbandonedObjectPool is used
(org.apache.commons.dbcp.AbandonedObjectPool@11aa58b)
LogAbandoned: true
RemoveAbandoned: true
RemoveAbandonedTimeout: 60
- Application then fails to find the JNDI resource
- If we remove the
<Resource>inserver.xml, then the console shows no connection pool is created at all - On another developer machine with the same hardware and OS we do not have this problem
Any ideas?
Thanks
Marc
We re-installed postgresql on the machine and the problem got solved somehow.
We’re thinking something in the original postgresql config had been messed up and tomcat was failing to connect to the BD somehow. I guess tomcat was simply “trying 3 times”, thus the triple output.
Another unsolved mystery…