tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ovidiu asiminei <ovid...@gmail.com>
Subject Re: strange problem w/ connection pool and Oracle
Date Thu, 12 Feb 2009 13:02:27 GMT
Hi John,

This is my context.xml

<!--
    <Valve
className="org.apache.catalina.valves.CometConnectionManagerValve" />
    -->
         <Resource name="jdbc/dev"
                        auth="Container"
                scope="Shareable"
                type="oracle.jdbc.pool.OracleDataSource"
                driverclassname="oracle.jdbc.pool.OracleDataSource"
                factory="oracle.jdbc.pool.OracleDataSourceFactory"
                connectionCachingEnabled="true"
                connectionCacheName="vvvPool"
                connectionCacheProperties="{MaxStatementsLimit=10,
InitialLimit=10, ConnectionWaitTimeout=180, MaxLimit=80, MinLimit=10,
PropertyCheckInterva
l=180, InactivityTimeout=1800}"
                url="jdbc:oracle:thin:@db.example.com:1521:vvvvv"
                user="yyyy"
                password="cccccc" />

</Context>


In my tomcat lib directory  ( /tomcat/lib )  I have a copy of the Oracle
JDBC jar ( ojdbc14_10g.jar )

Regards,

Ovidiu

On Wed, Feb 11, 2009 at 5:41 PM, <John.C.Cartwright@noaa.gov> wrote:

> Hello All,
>
> I'm having a rather strange problem using Oracle-specific types obtained
> from a connection pool defined my my context.xml.  I'm reading the
> ResultSet w/ getObject, but then when I try to cast the Object to the
> correct type, I see:
>
> Cause: java.lang.ClassCastException: oracle.sql.STRUCT cannot be cast to
> oracle.sql.STRUCT
>
> Strangely, using a DataSource configured via Spring works fine.  I've
> listed the snippet from my context.xml defining the pool that doesn't
> work and the one for my Spring DataSource that does.
>
> Can someone please help me understand what's going on here?
>
> Thanks!
>
> --john
>
> context.xml:
> <Resource name="jdbc/DEVEL"
>          type="javax.sql.DataSource"
>          auth="Container"
>          username="username"
>          password="password"
>          driverClassName="oracle.jdbc.OracleDriver"
>          url="jdbc:oracle:thin:@myhostname:1521:DB"
>          maxActive="8"
>          maxIdle="4"/>
>
>
>
> applicationContext.xml:
>
>    <bean id="dataSource"
> class="org.springframework.jdbc.datasource.DriverManagerDataSource">
>      <property name="driverClassName" value="oracle.jdbc.OracleDriver"/>
>      <property name="url" value="jdbc:oracle:thin:@myhostname:1521:DB"/>
>      <property name="username" value="username"/>
>      <property name="password" value="password"/>
>   </bean>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
ovidiu asiminei

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message