V.Thangavelu,

I ran into a similar error as what you state below a month or so ago.

Chuck Caldarale had made the suggestion, and it turned out to be the elixir for 
me, was to make ABSOLUTELY sure you had NO other classes (or jar files) of the 
same name, i.e. tomcat-dbcp.jar, floating around elsewhere in the directory 
anywhere.
It not only can, but will wreak havoc on this DBCP connection.

Double check that, clean it out if you find extras, kill of the context.xml 
file created from META-INF/ in the conf directory.

And try again.

That worked wonders for me.

Barry

-----Original Message-----
From: Harry Metske [mailto:harry.met...@gmail.com] 
Sent: Monday, April 19, 2010 2:04 AM
To: Tomcat Users List
Subject: Re: Oracle Universal connection pooling type cast problem while 
configuring in server.xml

this is an exact cut/paste from an earlier post, it won't help you repeating 
the same questions.

regards,
Harry


2010/4/19 Thangavelu.V <thangavel...@yalamanchili.co.in>


>
> server.xml configurartion
>
>  <Context docBase="UCP" path="/UCP" reloadable="true"
> source="org.eclipse.jst.jee.server:UCP">
>      <Resource auth="Container" description="DataSource Reference"
> driverClassName="oracle.jdbc.OracleDriver"
>                        maxActive="4" maxIdle="2" maxWait="5000"
> name="jdbc/oracleds" factory="oracle.jdbc.pool.OracleDataSource"
>                        username="branch" password="branch"
> type="oracle.ucp.jdbc.PoolDataSourceImpl"
>                        url="jdbc:oracle:thin:@//192.168.203.12:1521/ycs"
> validationQuery="select 1 from dual"/>
>      </Context>
>
> Error Details
> javax.naming.NamingException: Could not create resource factory 
> instance [Root exception is java.lang.ClassCastException:
> oracle.jdbc.pool.OracleDataSource cannot be cast to 
> javax.naming.spi.ObjectFactory]
>        at
>
> org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.
> java:102)
>        at
> javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
>        at org.apache.naming.NamingContext.lookup(NamingContext.java:793)
>
>

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

Reply via email to