-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Anu,

On 5/3/14, 12:18 AM, Anu Prab wrote:
>> 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.

That wasn't clear in your first post.

>> 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.

Stack trace?

>> 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.

There can be more than one context.xml. Dan was asking if you are sure
you wanted to modify the site-wide context.xml file instead of just
doing it for a single web application (which is much more popular and
safe).

> 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" />

Okay, what are the differences between the <Resource> configuration
and your usage of them? NPE would likely point to an incorrect
resource name being used in your code, but since you haven't posted
any stack trace, I can only guess.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTZG/eAAoJEBzwKT+lPKRY1PgQAL6mOANf/eAPLdflZFkpUHt6
A5ja+nJrhHNnmNhTKQR/cY6rvTLhjarogi0MRaB3ncs9GxF6XFKM5H1Zi/FOd0AT
wLwr+G+y2RQEghyLZY7LGJ/EPN3KsDwsy4WADm3KW/zQ28ZU96Cikqo1mjpW/C4u
Pl1rv7Pd6LW9ncrs5GllGA5OoJWXQwG7uUDWZoZDy5eZm9Znq8XRvX2U399ZdVuH
zMtjpIe+QA79lpPWf0xFQNIRc6IHxxsJBp45jZrS+dgh0wjhnMSVsOLrGIMHYCZ2
XSt/iRtbS1YGlyQuTLMJ7hSTJalxFCeEHj4yi/I5thCBoo4UsFC9NoZeMWf4zT+G
w3vRhCyDMvrmz7Fwu2npGfPf2LnOM7tuoeVwkJnV4JjCEYz6I6hkMNc5ZVmWOd2Q
DKXRxWYqX2X6Uz4F/RDpZRbZLKgVkGpb1euYume/uLVL8MxLSR+40lVzVWeJSkEe
ARg+dwPBWohJU9KZR/jOfG1C45Kr8SSKvqWy3Cmn+9UKoed9YYcAy11Px5AaD6hl
J3Z1M2W9jSpxet5KbwlCxcSRo/xgtY3lCft9XwsJZSDaj+xGCd5ON2TjGdxXXbex
+TNZrySJ/gg0304ZnHfFsRRRJ9//rPv7v4N9sRv29gq4VwviQqiHG/rrQKawcIeK
moy4KcBHaw4h4S9kRiCG
=Axzi
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to