Hi all,
I have a problem, please can anyone help?
I'm trying to create an Oracle pooled connection as a JNDI resource.
I made the required configuration:
WEB-INF\web.xml file:
<web-app>
<resource-ref>
<res-ref-name>jdbc/toto</res-ref-name>
<res-type>oracle.jdbc.pool.OracleConnectionPoolDataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>
%TOMCAT_HOME%\conf\server.xml
<Context path="/titi" docBase="c:\www\titi" debug="0" reloadable="true">
<Resource name="jdbc/toto" auth="Container"
type="oracle.jdbc.pool.OracleConnectionPoolDataSource"/>
<ResourceParams name="jdbc/toto">
<parameter>
<name>user</name>
<value>tutu</value>
</parameter>
<parameter>
<name>password</name>
<value>tutu</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:oracle:thin:@host:port:db</value>
</parameter>
</ResourceParams>
</Context>
When I register the resource from a program, everything works fine, when I try to
register the pooled connection thru JNDI I get the following error:
javax.naming.NamingException: Cannot create resource instance
the list bindings and related methods give the following:
toto: org.apache.naming.ResourceRef: Reference Class Name:
oracle.jdbc.pool.OracleConnectionPoolDataSource
Type: scope
Content: Shareable
Type: auth
Content: Container
Type: user
Content: tutu
Type: url
Content: jdbc:oracle:thin:@host:port:db
Type: password
Content: tutu
Does anybody have a clue?
PS: sorry for my long message, I've been working on this for quite a while now :)
Amine