Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 11075 invoked from network); 4 Feb 2004 14:23:12 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 4 Feb 2004 14:23:12 -0000 Received: (qmail 88448 invoked by uid 500); 4 Feb 2004 14:21:32 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 88389 invoked by uid 500); 4 Feb 2004 14:21:31 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Apache Torque Users List" Reply-To: "Apache Torque Users List" Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 88296 invoked from network); 4 Feb 2004 14:21:30 -0000 Received: from unknown (HELO satltrd02.novainfo.com) (198.203.191.254) by daedalus.apache.org with SMTP; 4 Feb 2004 14:21:30 -0000 Received: from 172.16.64.100 by satltrd02.novainfo.com (InterScan E-Mail VirusWall NT); Wed, 04 Feb 2004 09:21:16 -0500 Received: from satlexh02.novainfo.com [172.16.64.75] by satlxwl01.novainfo.com with XWall v3.28 ; Wed, 4 Feb 2004 09:21:15 -0500 Received: by satlexh02.novainfo.com with Internet Mail Service (5.5.2657.72) id ; Wed, 4 Feb 2004 09:21:14 -0500 Message-ID: <074CBB342C7BD311971B00508B6F7FD4192C25E1@spc-mail.novainfo.com> From: Travis.Prescott@novainfo.com To: torque-user@db.apache.org Subject: java.sql.SQLException: invalid arguments in call when running exa mple Date: Wed, 4 Feb 2004 09:21:13 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: multipart/mixed; boundary="----=_NextPartTM-000-8485b397-efe8-460e-9e80-79ccfefdc7b9" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------=_NextPartTM-000-8485b397-efe8-460e-9e80-79ccfefdc7b9 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C3EB2A.24C6FBC0" ------_=_NextPart_001_01C3EB2A.24C6FBC0 Content-Type: text/plain; charset="iso-8859-1" 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.TorqueDataSourceFac tory 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=jdbc:oracle:thin:@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.(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(Dr iverAdapterCPDS.java:205) at org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS.getPooledConnection(Dr iverAdapterCPDS.java:175) at org.apache.torque.pool.ConnectionPool.getNewConnection(ConnectionPool.java:2 54) at org.apache.torque.pool.ConnectionPool.getConnection(ConnectionPool.java:223) at org.apache.torque.pool.TorqueClassicDataSource.getConnection(TorqueClassicDa taSource.java:488) at org.apache.torque.pool.TorqueClassicDataSource.getConnection(TorqueClassicDa taSource.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:Richard.Moore@logistics.nhs.uk] Sent: Wednesday, February 04, 2004 6:59 AM To: torque-user@db.apache.org 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 = jdbc:hsqldb:${webappRoot}/WEB-INF/db/jetspeed ### torque.dsfactory.default.connection.user = sa ### torque.dsfactory.default.connection.password = torque.dsfactory.default.factory=org.apache.torque.dsfactory.TorqueDataSourc eFactory # 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 = jdbc:mysql://localhost:3306/turbine torque.dsfactory.default.connection.user = **** torque.dsfactory.default.connection.password = **** torque.dsfactory.trdb.factory=org.apache.torque.dsfactory.TorqueDataSourceFa ctory # 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=jdbc:oracle:thin:@194.155.160.252:1521: TRDB 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. ------_=_NextPart_001_01C3EB2A.24C6FBC0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I am=20 connecting to an Oracle db but I get the following exception.  = What I don't=20 understand is that I am able to build the Torque objects and = dynamically=20 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=3Demt
torque.dsfactory.emt.adapter=3D= oracle
torque.dsfactory.emt.factory=3Dorg.apache.torque.dsfactory.Tor= queDataSourceFactory
torque.dsfactory.emt.pool.defaultMaxConnections=3D= 10
torque.dsfactory.emt.pool.maxExpiryTime=3D3600
torque.dsfactory= .emt.pool.connectionWaitTimeout=3D10
torque.dsfactory.emt.connection= .driver=3Doracle.jdbc.driver.OracleDriver
torque.dsfactory.emt.conne= ction.url=3Djdbc:oracle:thin:@myserver.com:1521:RD01
torque.dsfac= tory.emt.connection.username=3D*********
torque.dsfactory.emt.conn= ection.password=3D*********
 
 
java.sql.SQLException: invalid arguments in=20 call
        at=20 oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
&nbs= p;      =20 at=20 oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
&nbs= p;      =20 at=20 oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1160)
 &nb= sp;     =20 at=20 oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:184)
 &nbs= p;     =20 at=20 oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:3= 60)
       =20 at=20 oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:= 521)
       =20 at=20 oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:325)
 =       =20 at=20 java.sql.DriverManager.getConnection(DriverManager.java:512)
 &n= bsp;     =20 at=20 java.sql.DriverManager.getConnection(DriverManager.java:171)
 &n= bsp;     =20 at=20 org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS.getPooledConnectio= n(DriverAdapterCPDS.java:205)
      &nb= sp;=20 at=20 org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS.getPooledConnectio= n(DriverAdapterCPDS.java:175)
      &nb= sp;=20 at=20 org.apache.torque.pool.ConnectionPool.getNewConnection(ConnectionPool.ja= va:254)
       =20 at=20 org.apache.torque.pool.ConnectionPool.getConnection(ConnectionPool.java:= 223)
       =20 at=20 org.apache.torque.pool.TorqueClassicDataSource.getConnection(TorqueClass= icDataSource.java:488)
       =20 at=20 org.apache.torque.pool.TorqueClassicDataSource.getConnection(TorqueClass= icDataSource.java:458)
       =20 at=20 org.apache.torque.TorqueInstance.getConnection(TorqueInstance.java:743)<= BR>       =20 at=20 org.apache.torque.Torque.getConnection(Torque.java:306)
  &= nbsp;    =20 at=20 org.apache.torque.util.Transaction.beginOptional(Transaction.java:118)       =20 at=20 org.apache.torque.util.Transaction.begin(Transaction.java:100)
 =       =20 at=20 com.novainfo.emt.dao.BasePublisher.save(BasePublisher.java:490)
 = ;      =20 at=20 com.novainfo.emt.dao.BasePublisher.save(BasePublisher.java:471)
 = ;      =20 at=20 com.novainfo.emt.test.TestTorque.go(TestTorque.java:31)
  &= nbsp;    =20 at = com.novainfo.emt.test.TestTorque.main(TestTorque.java:13)
<= /DIV>
 
 
-----Original Message-----
From: Moore, Richard=20 [mailto:Richard.Moore@logistics.nhs.uk]
Sent: Wednesday, = February=20 04, 2004 6:59 AM
To: = torque-user@db.apache.org
Subject:=20 cannot use 2 connections

Hello,

 

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

 

torque.database.default=3Ddefault

###=20 = torque.database.default.adapter=3Dhypersonic

torque.database.default.adapter=3Dmysql<= /P>

torque.database.trdb.adapter=3Doracle

###=20 torque.database.default.adapter=3Dmssql

 

##

## Using torque's old=20 pool

##

###=20 torque.dsfactory.default.connection.driver =3D=20 org.hsqldb.jdbcDriver

###=20 torque.dsfactory.default.connection.url =3D=20 = jdbc:hsqldb:${webappRoot}/WEB-INF/db/jetspeed

###=20 torque.dsfactory.default.connection.user =3D sa =

###=20 torque.dsfactory.default.connection.password =3D =

 

torque.dsfactory.default.factory=3Dorg.apache.torque.dsfactory.To= rqueDataSourceFactory

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

torque.dsfactory.default.pool.defaultMaxConnections=3D10

torque.dsfactory.default.pool.maxExpiryTime=3D3600

torque.dsfactory.default.pool.connectionWaitTimeout=3D10

###=20 MySQL

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

torque.dsfactory.default.connection.url=20 =3D jdbc:mysql://localhost:3306/turbine

torque.dsfactory.default.connection.user=20 =3D  ****

torque.dsfactory.default.connection.password=20 =3D ****

 

torque.dsfactory.trdb.factory=3Dorg.apache.torque.dsfactory.Torqu= eDataSourceFactory

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

torque.dsfactory.trdb.pool.defaultMaxConnections=3D10<= /SPAN>

torque.dsfactory.trdb.pool.maxExpiryTime=3D3600=

torque.dsfactory.trdb.pool.connectionWaitTimeout=3D10<= /SPAN>

###=20 Oracle

torque.dsfactory.trdb.connection.driver=3Doracle.jdbc.driver.Orac= leDriver

torque.dsfactory.trdb.connection.url=3Djdbc:oracle:thin:@194.155.= 160.252:1521:TRDB

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

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

 

 

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

 

There was no = DataSourceFactory=20 configured for the connection trdb

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

 

I cannot figure this = out – any=20 ideas?

 

Many=20 thanks,

 

Richard.

 

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

------_=_NextPart_001_01C3EB2A.24C6FBC0-- ------=_NextPartTM-000-8485b397-efe8-460e-9e80-79ccfefdc7b9 Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org ------=_NextPartTM-000-8485b397-efe8-460e-9e80-79ccfefdc7b9--