tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Walding <tomcat-u...@walding.com>
Subject Re: JNDI, DataSource and "Cannot create resource instance"
Date Thu, 23 May 2002 21:18:28 GMT
IRWIN,KEITH (HP-Corvallis,ex1) wrote:

>Folks--
>
>I've been beating myself to death over this issue (and have read as many of
>the archives on both this, the postgres-jdbc and google resources) and never
>even get to the point where those solutions work:
>
>Here's the story:
>
>I'm using postgresql jdbc drivers that come with RedHat 7.2 (and I've tried
>a lot of others).
>
>I'm using the Tomcat 4.0.3 RPM version (and had to manually add the tyrex
>classes, though that changed nothing).
>
>I've set things up according to the JNDI Howto:
>
>But when I execute this line of code:
>
>	ConnectionPoolDataSource pooledDataSource = 
>	
>(ConnectionPoolDataSource)envContext.lookup("jdbc/ecosystem");
>
>I get a NamingException with a message:
>
>	Cannot create resource instance.
>
>What exactly is this message telling me?  I'm thinking that it cannot create
>an instance of the javax.sql.DataSource instance (which is in my web.xml and
>server.xml), but the jdbc drivers are there (and only one copy) and aren't
>in my webapp lib dir, and so on and so forth.
>
>I'm trying to get out of using PoolMan since it's no longer in development
>and gives me a "Concurrancy" exception when I try to run db transactions
>against it.
>
>Hints much appreciated!
>
>Keith
>
>--
>To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>
>
>
>  
>
I had this problem the other day and I looked into it quite closely.

It appears that TyrexDataSourceFactory (and other things) are no longer 
placed in the naming-factory.jar.

It used to be in there, but I can't work out where they've moved it.  I 
rolled back to an earlier version of the jar (4.0.2 I believe) and all 
my stuff started working.   I'll do some more investigation this weekend 
as to the correct way to fix it.  I'll also be raising a feature request 
for their ResourceFactory to log the error properly rather than that 
dodgy message that it gives currently!


Hope this helps.


Cheers

Ben



--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message