> Hi, > > We are using Tomcat 7.0.40 version. We are using Tomcat DBCP for pooling > connections. > > We are able to pool connections for different aliases. But for one alias, > connections are not pooling. The user and password is good because the same > alias in apache dbcp works fine.
>What do you mean by “alias”? Not following you there. Well, alias is the resource name. > > Why are we not able to pool any connections here? >Also, what do you mean when you say it’s “not pooling”? Are you getting an >error or exception? If so, what is it? Yes, whenever a connection is requested from this particular resource, a null pointer exception is thrown at the point of invoking getConnection. > > Here is a sample of context xml entry: >Are you putting this in “conf/context.xml”? If so, are you sure that’s what you >want? Yes, this is from context.xml. All the resources work except for one. What could be the reason? > > <Resource name="jdbc/resource" > auth="Container" > type="javax.sql.DataSource" > fairQueue="true" > factory="< customEncrytpedFactory>” >Have you tried taking your custom factory out of the mix and using a stock one? > Do you still see the same issue? Since the same custom factory is working for other resources except for this one, I have not tried this out. > username="<username>" > password="<encrypted_password>" > driverClassName="oracle.jdbc.OracleDriver" > url="<url>" > timeBetweenEvictionRunsMillis="1800000" > validationQuery="SELECT 1 from dual" > validationInterval="30000" > maxActive="50" > minIdle="4" > maxIdle="4" > maxWait="10000" > initialSize="4" > removeAbandonedTimeout="60" > removeAbandoned="true" > logAbandoned="false" > minEvictableIdleTimeMillis="600000" > initSQL="<initSQL>” > testOnBorrow="false" > testOnReturn="false" > testWhileIdle="true" > /> > > Thanks, > > Anu