You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Joshi Gautam <jg...@cisco.com> on 2004/01/31 00:05:16 UTC
OracleConnection - Torque
I am facing a problem with Oracle Connections _ Torque.
I get the following exception when I try to create an Array descriptor
Object
java.lang.ClassCastException
at
oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:108)
I get the connection from Torque using :-
Connection dbCon = Torque.getConnection();
And here is the statement where it fails :-
oracle.sql.ArrayDescriptor ad =
oracle.sql.ArrayDescriptor.createDescriptor("A_VARRAY",dbCon);
All other JDBC calls work fine.
Here is my setup in Torque.properties
torque.database.default=default
torque.database.default.adapter=oracle
torque.dsfactory.default.factory=
org.apache.torque.dsfactory.Jdbc2PoolDataSourceFactory
torque.dsfactory.default.pool.defaultMaxActive=10
torque.dsfactory.default.pool.testOnBorrow=true
torque.dsfactory.default.pool.validationQuery=SELECT 1 from dual
torque.dsfactory.default.connection.driver =
oracle.jdbc.driver.OracleDriver
torque.dsfactory.default.connection.url =
jdbc:oracle:thin:@localhost:1521:oracle
torque.dsfactory.default.connection.user = auser
torque.dsfactory.default.connection.password = apassword
In the lib I have the following Jar files
commons-dbcp-1.0-dev-20020806.jar
commons-pool-1.0.jar
classes12.jar.
I think the connection returned by the pool cannot be cast into
OraceConnection. If anyone knows the resolution to this problem please
let me know.
Thanks in advance
Gautam
RE: OracleConnection - Torque
Posted by "Suchisubhra Sinha (susinha)" <su...@cisco.com>.
In one my test case I have used like this. But not sure whether this
is the best way to do
This. But it works.
DatabasePsmlManagerService databasePsmlManagerService = new
DatabasePsmlManagerService();
Connection dbCon = databasePsmlManagerService.getDbConnection();
~suchi
-----Original Message-----
From: Joshi Gautam [mailto:jgautam@cisco.com]
Sent: Friday, January 30, 2004 3:05 PM
To: jetspeed-user@jakarta.apache.org
Subject: OracleConnection - Torque
I am facing a problem with Oracle Connections _ Torque.
I get the following exception when I try to create an Array descriptor
Object
java.lang.ClassCastException
at
oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:108)
I get the connection from Torque using :-
Connection dbCon = Torque.getConnection();
And here is the statement where it fails :-
oracle.sql.ArrayDescriptor ad =
oracle.sql.ArrayDescriptor.createDescriptor("A_VARRAY",dbCon);
All other JDBC calls work fine.
Here is my setup in Torque.properties
torque.database.default=default
torque.database.default.adapter=oracle
torque.dsfactory.default.factory=
org.apache.torque.dsfactory.Jdbc2PoolDataSourceFactory
torque.dsfactory.default.pool.defaultMaxActive=10
torque.dsfactory.default.pool.testOnBorrow=true
torque.dsfactory.default.pool.validationQuery=SELECT 1 from dual
torque.dsfactory.default.connection.driver =
oracle.jdbc.driver.OracleDriver torque.dsfactory.default.connection.url
= jdbc:oracle:thin:@localhost:1521:oracle
torque.dsfactory.default.connection.user = auser
torque.dsfactory.default.connection.password = apassword
In the lib I have the following Jar files
commons-dbcp-1.0-dev-20020806.jar
commons-pool-1.0.jar
classes12.jar.
I think the connection returned by the pool cannot be cast into
OraceConnection. If anyone knows the resolution to this problem please
let me know.
Thanks in advance
Gautam
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org