I am connecting to an Oracle db but I get the following exception.  What I don't understand is that I am able to build the Torque objects and dynamically generate the database with this below properties so why won't it save a record?.  My torque.properties file looks like this:
 
torque.database.default=emt
torque.dsfactory.emt.adapter=oracle
torque.dsfactory.emt.factory=org.apache.torque.dsfactory.TorqueDataSourceFactory
torque.dsfactory.emt.pool.defaultMaxConnections=10
torque.dsfactory.emt.pool.maxExpiryTime=3600
torque.dsfactory.emt.pool.connectionWaitTimeout=10
torque.dsfactory.emt.connection.driver=oracle.jdbc.driver.OracleDriver
torque.dsfactory.emt.connection.url="" class=696051314-04022004>myserver.com:1521:RD01
torque.dsfactory.emt.connection.username=*********
torque.dsfactory.emt.connection.password=*********
 
 
java.sql.SQLException: invalid arguments in call
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
        at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1160)
        at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:184)
        at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:360)
        at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:521)
        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:325)
        at java.sql.DriverManager.getConnection(DriverManager.java:512)
        at java.sql.DriverManager.getConnection(DriverManager.java:171)
        at org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS.getPooledConnection(DriverAdapterCPDS.java:205)
        at org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS.getPooledConnection(DriverAdapterCPDS.java:175)
        at org.apache.torque.pool.ConnectionPool.getNewConnection(ConnectionPool.java:254)
        at org.apache.torque.pool.ConnectionPool.getConnection(ConnectionPool.java:223)
        at org.apache.torque.pool.TorqueClassicDataSource.getConnection(TorqueClassicDataSource.java:488)
        at org.apache.torque.pool.TorqueClassicDataSource.getConnection(TorqueClassicDataSource.java:458)
        at org.apache.torque.TorqueInstance.getConnection(TorqueInstance.java:743)
        at org.apache.torque.Torque.getConnection(Torque.java:306)
        at org.apache.torque.util.Transaction.beginOptional(Transaction.java:118)
        at org.apache.torque.util.Transaction.begin(Transaction.java:100)
        at com.novainfo.emt.dao.BasePublisher.save(BasePublisher.java:490)
        at com.novainfo.emt.dao.BasePublisher.save(BasePublisher.java:471)
        at com.novainfo.emt.test.TestTorque.go(TestTorque.java:31)
        at com.novainfo.emt.test.TestTorque.main(TestTorque.java:13)
 
 
-----Original Message-----
From: Moore, Richard [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 04, 2004 6:59 AM
To: [EMAIL PROTECTED]
Subject: cannot use 2 connections

Hello,

 

I am using jetspeed/turbine/torque, my default connection works fine but I am having a problem using a second connection. My Torque.properties contains :

 

torque.database.default=default

### torque.database.default.adapter=hypersonic

torque.database.default.adapter=mysql

torque.database.trdb.adapter=oracle

### torque.database.default.adapter=mssql

 

##

## Using torque's old pool

##

### torque.dsfactory.default.connection.driver = org.hsqldb.jdbcDriver

### torque.dsfactory.default.connection.url = "">

### torque.dsfactory.default.connection.user = sa

### torque.dsfactory.default.connection.password =

 

torque.dsfactory.default.factory=org.apache.torque.dsfactory.TorqueDataSourceFactory

# The number of database connections to cache per ConnectionPool instance (specified per database)

torque.dsfactory.default.pool.defaultMaxConnections=10

torque.dsfactory.default.pool.maxExpiryTime=3600

torque.dsfactory.default.pool.connectionWaitTimeout=10

### MySQL

torque.dsfactory.default.connection.driver = org.gjt.mm.mysql.Driver

torque.dsfactory.default.connection.url = "">

torque.dsfactory.default.connection.user =  ****

torque.dsfactory.default.connection.password = ****

 

torque.dsfactory.trdb.factory=org.apache.torque.dsfactory.TorqueDataSourceFactory

# The number of database connections to cache per ConnectionPool instance (specified per database)

torque.dsfactory.trdb.pool.defaultMaxConnections=10

torque.dsfactory.trdb.pool.maxExpiryTime=3600

torque.dsfactory.trdb.pool.connectionWaitTimeout=10

### Oracle

torque.dsfactory.trdb.connection.driver=oracle.jdbc.driver.OracleDriver

torque.dsfactory.trdb.connection.url="">

torque.dsfactory.trdb.connection.username=****

torque.dsfactory.trdb.connection.password=****

 

 

When I try and get a connection to trdb from my portlet, I get the following error :

 

There was no DataSourceFactory configured for the connection trdb

java.lang.NullPointerException: There was no DataSourceFactory configured for the connection trdb

 

I cannot figure this out – any ideas?

 

Many thanks,

 

Richard.

 

This e-mail and any attachments hereto are: -strictly confidential and intended solely for the addressee. If you are not the intended addressee, you must not disclose, forward, copy, or take any action in reliance on this e-mail or attachments. If you have received this e-mail in error, please notify NHS Logistics sender as soon as possible. -not intended to create contractual relations or legal obligations binding on NHS Logistics and no action may be taken in reliance on this e-mail and any attachments hereto unless the contents are confirmed by letter. Addressees should check all attachments for viruses. NHS Logistics makes no representations as regards the absence of viruses in attachments to this e-mail.

Note: The information contained in this email and in any attachments is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. The recipient should check this email and any attachments for the presence of viruses. Sender accepts no liability for any damages caused by any virus transmitted by this email. If you have received this email in error, please notify us immediately by replying to the message and delete the email from your computer. This e-mail is and any response to it will be unencrypted and, therefore, potentially unsecure. Thank you. NOVA Information Systems, Inc.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to