db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Irazabal, Alex" <Alex.Iraza...@aig.com>
Subject RE: Oracle config
Date Mon, 07 Jul 2003 13:23:10 GMT
Thanks Mark. On to the next bug...which is:
281 [main] DEBUG dsfactory.TorqueDataSourceFactory  - Setting datasource
property: url
297 [main] DEBUG dsfactory.TorqueDataSourceFactory  - Setting datasource
property: user
297 [main] DEBUG dsfactory.TorqueDataSourceFactory  - Setting datasource
property: password
297 [main] DEBUG dsfactory.TorqueDataSourceFactory  - Starting
initTorqueClassic
297 [main] DEBUG dsfactory.TorqueDataSourceFactory  - Setting datasource
property: defaultMaxConnections
328 [main] DEBUG dsfactory.TorqueDataSourceFactory  - Setting datasource
property: maxExpiryTime
328 [main] DEBUG dsfactory.TorqueDataSourceFactory  - Setting datasource
property: connectionWaitTimeout
328 [main] DEBUG torque.Torque  - Adding a dummy entry for default, mapped
onto CPMSDEV
484 [main] WARN oid.IDBroker  - IDBroker is being used with db 'cpmsdev',
which does not support transactions. IDBroker attempts to use transactions
to limit the possibility of duplicate key generation.  Without transactions,
duplicate key generation is possible if multiple JVMs are used or other
means are used to write to the database.
Estimate list:

java.lang.NullPointerException: Connection object was null. This could be
due to a misconfiguration of the DataSourceFactory. Check the logs and
Torque.properties to better determine the cause.
	at org.apache.torque.util.Transaction.rollback(Transaction.java:179)
	at org.apache.torque.util.BasePeer.doSelect(BasePeer.java:1333)
	at
com.ai.torque.om.BasePmClaimEstimatePeer.doSelectVillageRecords(BasePmClaimE
stimatePeer.java:1009)
	at
com.ai.torque.om.BasePmClaimEstimatePeer.doSelectVillageRecords(BasePmClaimE
stimatePeer.java:977)
	at
com.ai.torque.om.BasePmClaimEstimatePeer.doSelect(BasePmClaimEstimatePeer.ja
va:945)
	at
com.ai.torque.om.PmClaimEstimatePeer.doSelectAll(PmClaimEstimatePeer.java:21
)
	at com.ai.torque.om.cpmsdevTest.main(cpmsdevTest.java:24)
516 [Thread-1] DEBUG oid.IDBroker  - IDBroker thread was started.

Any ideas as to why the Connection object was null? Here is what I used to
initialize Torque:
public static void main(String[] args)
  {
    try
    {
      /*
       * Initializing Torque
       */
      Torque.init("Torque.properties");
//      /*
//       * Selecting all books from the database and
//       * printing the results to stdout using our
//       * helper method defined in BookPeer
//       * (doSelectAll).
//       */
	  PmClaimEstimate estobj = new PmClaimEstimate();
	  
      System.out.println("Estimate list:\n");
      List estlist = PmClaimEstimatePeer.doSelectAll();
 
>From Torque.properties:
torque.database.default=CPMSDEV
torque.database.CPMSDEV.adapter=oracle

## Using torque's old pool
torque.dsfactory.CPMSDEV.factory=org.apache.torque.dsfactory.TorqueDataSourc
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 = XXXX
torque.dsfactory.CPMSDEV.connection.password = XXXX

-----Original Message-----
From: Marc BEGUIGNEAU [mailto:marc_beguigneau@yahoo.fr]
Sent: Friday, July 04, 2003 2:50 AM
To: Turbine Torque Users List
Subject: Re: Oracle config


Hi,

I have used Oracle 9i with Torque 3.0 without any
problem.

Here is a cut of a Torque.properties file(for Oracle):

------------------------------------------------------
torque.database.default=your_db_name (in capital)
torque.database.bookstore.adapter=oracle


torque.dsfactory.SI.factory=org.apache.torque.dsfactory.TorqueDataSourceFact
ory
torque.dsfactory.SI.pool.defaultMaxConnections=10
torque.dsfactory.SI.pool.maxExpiryTime=3600
torque.dsfactory.SI.pool.connectionWaitTimeout=10
torque.dsfactory.SI.connection.driver =
oracle.jdbc.driver.OracleDriver
torque.dsfactory.SI.connection.url =
jdbc:oracle:thin:@your_db_server_ip:1521:your_db_name
torque.dsfactory.SI.connection.user = your_unsername
torque.dsfactory.SI.connection.password =
your_password
------------------------------------------------------
This was the file in general, and for my personnal
parameter the file look like this:

------------------------------------------------------
torque.database.default=SI
torque.database.bookstore.adapter=oracle

## Using torque's old pool
torque.dsfactory.SI.factory=org.apache.torque.dsfactory.TorqueDataSourceFact
ory
torque.dsfactory.SI.pool.defaultMaxConnections=10
torque.dsfactory.SI.pool.maxExpiryTime=3600
torque.dsfactory.SI.pool.connectionWaitTimeout=10
torque.dsfactory.SI.connection.driver =
oracle.jdbc.driver.OracleDriver
torque.dsfactory.SI.connection.url =
jdbc:oracle:thin:@172.20.82.216:1521:SI
torque.dsfactory.SI.connection.user = xxxxxx
torque.dsfactory.SI.connection.password = xxxxx
------------------------------------------------------


Hope this help.

Regards

Marc


 --- "Irazabal, Alex" <Alex.Irazabal@aig.com> a
écrit : > 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.TorqueDataSourc
> 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.java:39
> )
> 
> at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> .java:25)
> 
> at java.lang.reflect.Method.invoke(Method.java:324)
> 
> at
>
org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.j
> ava:1650)
> 
> at
>
org.apache.torque.dsfactory.AbstractDataSourceFactory.setProperty(AbstractDa
> taSourceFactory.java:121)
> 
> at
>
org.apache.torque.dsfactory.TorqueDataSourceFactory.initCPDS(TorqueDataSourc
> eFactory.java:134)
> 
> at
>
org.apache.torque.dsfactory.TorqueDataSourceFactory.initialize(TorqueDataSou
> 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(DriverAdapte
> 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 

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

---------------------------------------------------------------------
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