db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Leng <wl...@geobot.com>
Subject Re: Oracle config
Date Sun, 06 Jul 2003 17:18:59 GMT
Hi,

I have a different problem and hope someone can help. I use Torque on 
Oracle 8i. The table has a column with the type BLOB. When I try to 
insert through the Peer class, I got an exception (see below).

rethrown as org.apache.torque.TorqueException: ORA-01461: can bind a 
LONG valu
only for insert into a LONG column
         at org.apache.torque.util.BasePeer.doInsert(BasePeer.java:729)
         at org.apache.torque.util.BasePeer.doInsert(BasePeer.java:615)
         at torque.BaseDbTypesPeer.doInsert(BaseDbTypesPeer.java:217)
         at torque.BaseDbTypesPeer.doInsert(BaseDbTypesPeer.java:575)
         at torque.BaseDbTypes.save(BaseDbTypes.java:456)
         at TorqueTest.test_BLOB_Type(TorqueTest.java:576)
         at java.lang.reflect.Method.invoke(Native Method)

thanks

Bill Leng
Metatomix, Inc.

Ramesh Sabeti wrote:

> 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
>>
>>
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message