db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramesh Sabeti" ...@reazon.com>
Subject RE: Oracle config
Date Thu, 03 Jul 2003 22:43:02 GMT
Here's a working Oracle setup:

torque.database.default=default
torque.database.default.adapter=oracle 

torque.dsfactory.default.connection.driver =
oracle.jdbc.driver.OracleDriver 
torque.dsfactory.default.connection.url =
jdbc:oracle:thin:@servername:1521:dbname
torque.dsfactory.default.connection.user = USERNAME 
torque.dsfactory.default.connection.password = password

torque.dsfactory.default.factory=org.apache.torque.dsfactory.TorqueDataS
ourceFactory
torque.dsfactory.default.pool.defaultMaxConnections=10
torque.dsfactory.default.pool.maxExpiryTime=3600
torque.dsfactory.default.pool.connectionWaitTimeout=10

torque.database.logInterval=0


Of course, you need to replace servername, dbname, username, and
password with correct properties.

Good luck,

Ramesh.



> -----Original Message-----
> From: Irazabal, Alex [mailto:Alex.Irazabal@aig.com]
> Sent: Thursday, July 03, 2003 11:36 AM
> To: 'torque-user@db.apache.org'
> Subject: Oracle config
> 
> I have looked thru the archives for a valid configuration file for
Oracle.
> Here is what I have and it doesn't seem to work...
>
torque.dsfactory.CPMSDEV.factory=org.apache.torque.dsfactory.TorqueDataS
ou
> rc
> eFactory
> 
> torque.dsfactory.CPMSDEV.pool.defaultMaxConnections=10
> 
> torque.dsfactory.CPMSDEV.pool.maxExpiryTime=3600
> 
> torque.dsfactory.CPMSDEV.pool.connectionWaitTimeout=10
> 
> torque.dsfactory.CPMSDEV.connection.driver =
> oracle.jdbc.driver.OracleDriver
> 
> torque.dsfactory.CPMSDEV.connection.url =
> jdbc:oracle:thin://ETA:1521:CPMSDEV
> 
> torque.dsfactory.CPMSDEV.connection.user = CPMS_CLAIM_OWNER
> 
> torque.dsfactory.CPMSDEV.connection.password = CPMS_CLAIM_OWNER
> 
> 
> 
> And here is the error I get when I run my test:
> 
> 235 [main] ERROR dsfactory.AbstractDataSourceFactory - Property:
driver
> value: oracle.jdbc.driver.OracleDriver is not supported by DataSource:
> org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS
> 
> 235 [main] ERROR dsfactory.TorqueDataSourceFactory -
> 
> java.lang.reflect.InvocationTargetException
> 
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 
> at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:
> 39
> )
> 
> at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Im
> pl
> .java:25)
> 
> at java.lang.reflect.Method.invoke(Method.java:324)
> 
> at
>
org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUti
ls
> .j
> ava:1650)
> 
> at
>
org.apache.torque.dsfactory.AbstractDataSourceFactory.setProperty(Abstra
ct
> Da
> taSourceFactory.java:121)
> 
> at
>
org.apache.torque.dsfactory.TorqueDataSourceFactory.initCPDS(TorqueDataS
ou
> rc
> eFactory.java:134)
> 
> at
>
org.apache.torque.dsfactory.TorqueDataSourceFactory.initialize(TorqueDat
aS
> ou
> rceFactory.java:108)
> 
> at org.apache.torque.Torque.initDataSourceFactories(Torque.java:323)
> 
> at org.apache.torque.Torque.initialize(Torque.java:237)
> 
> at org.apache.torque.Torque.init(Torque.java:406)
> 
> at org.apache.torque.Torque.init(Torque.java:386)
> 
> at com.ai.torque.om.cpmsdevTest.main(cpmsdevTest.java:14)
> 
> Caused by: java.lang.ClassNotFoundException:
> oracle.jdbc.driver.OracleDriver
> 
> at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
> 
> at java.security.AccessController.doPrivileged(Native Method)
> 
> at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
> 
> at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
> 
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
> 
> at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
> 
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
> 
> at java.lang.Class.forName0(Native Method)
> 
> at java.lang.Class.forName(Class.java:140)
> 
> at
>
org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS.setDriver(DriverAd
ap
> te
> rCPDS.java:441)
> 
> ... 13 more
> 
> 266 [main] ERROR torque.Torque -
> 
> 
> 
> Any ideas?
> 
> 
> 
> Alex Irazabal
> AIGM Distributed Apps
> 3 Beaver Valley Road
> 
> Wilmington DE-19803
> * (302)-252-4783
> 
> 



Mime
View raw message