You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by jcbf <j....@schmitt-elevadores.com> on 2006/08/10 17:22:28 UTC
Tomcat 5.5 Cannot create PoolableConnectionFactory
After successfuly connecting to the databases through JDBC drivers over a
proxool pool,
I tried to configure JNDI datasources so that my dbforms webapp could
cleanly call
and implement connections through the JNDI space.
In tomcat 5.5 the web context file looks like :
<Resource
name="jdbc/DB1"
type="javax.sql.DataSource"
driverClassName="com.informix.jdbc.IfxDriver"
password="pwd"
maxIdle="2"
maxWait="5000"
username="usr"
url="jdbc:informix-sqli://host:1234/db1:INFORMIXSERVER=svr"
maxActive="16"
removeAbandoned="true"
removeAbandonedTimeout="60"
/>
I have two more DBs configured the same way in the same file.
The web.xml looks like :
<resource-ref>
<description>DB1 Connector</description>
<res-ref-name>jdbc/DB1</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref>
<description>DB2 Connector</description>
<res-ref-name>jdbc/DB2l</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref>
<description>DB3 Connector</description>
<res-ref-name>jdbc/DB3</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
The dbforms config file looks like this :
<dbconnection
id = "db1"
name = "java:comp/env/jdbc/DB1"
isJndi = "true"
default = "true"
/>
<dbconnection
id = "db2"
name = "java:comp/env/jdbc/DB2"
isJndi = "true"
/>
<dbconnection
id = "db3"
name = "java:comp/env/jdbc/DB3"
isJndi = "true"
/>
The web starts up ok ,except when I get into a JSP with data from those
connections where it crashes stating :
java.lang.IllegalArgumentException: JDBC-Troubles:
was not able to create connection from DbConnection = id=db1
and tomcat sigs :
ERROR-[10.08.2006
14:25:14]-[http-9080-Processor25]-[org.dbforms.config.DbConnection.getConnec
tionFromJNDI
(DbConnection.java:625)]-::getConnectionFromJNDI - exception:
org.apache.tomcat.dbcp.dbcp.SQLNestedException:
Cannot create PoolableConnectionFactory (Database not found or no system
permission.)
at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource
.java:855)
Any insight ?
Thanks in advance.
João Brägger