You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by David Hainlin <dh...@comcast.net> on 2003/11/12 13:29:01 UTC

Re: Torque - Oracle

Merwin,
I have recenlty used the following to connect to oracle. HTH

torque.database.default=orcl
torque.database.orcl.adapter=oracle
torque.dsfactory.orcl.factory=org.apache.torque.dsfactory.TorqueDataSourceFactory
torque.dsfactory.orcl.pool.defaultMaxConnections=5
torque.dsfactory.orcl.pool.maxExpiryTime=3600
torque.dsfactory.orcl.pool.connectionWaitTimeout=10
torque.dsfactory.orcl.connection.driver = oracle.jdbc.driver.OracleDriver
torque.dsfactory.orcl.connection.url = jdbc:oracle:thin:<server>:1521:<sid>
torque.dsfactory.orcl.connection.user = <user>
torque.dsfactory.orcl.connection.password = <pass>

I did not have any other torque.database.* entries...

Merwin Yap wrote:

>Im trying to use Oracle as our database for torque. We've successfully implemented torque using hsql and mysql but no luck with oracle. 
>
>As written in the guide, I've edited torque.properties
>
>torque.database.default=PFS
>torque.database.PFS.adapter=oracle
>torque.database.PFS.url=jdbc:oracle:thin:@<servername>:1521:<sid>
>torque.database.PFS.driver=oracle.jdbc.driver.OracleDriver
>torque.database.PFS.user=<username>
>torque.database.PFS.password=<password>
>
>torque.dsfactory.PFS.factory=org.apache.torque.dsfactory.TorqueDataSourceFactory
>torque.dsfactory.PFS.pool.defaultMaxConnections=10
>torque.dsfactory.PFS.pool.maxExpiryTime=3600
>torque.dsfactory.PFS.pool.connectionWaitTimeout=10
>
>torque.database.PFS.connection.driver=oracle.jdbc.driver.OracleDriver
>torque.database.PFS.connection.url=jdbc:oracle:thin:@<servername>:1521:<sid>
>torque.database.PFS.connection.user=<username>
>torque.database.PFS.connection.password=<password>
>
>And I'm getting this in my log file:
>
>[2003-11-12 15:35:12,873 DEBUG] Torque:initAdapters- Starting initAdapters
>[2003-11-12 15:35:12,964 DEBUG] Torque:initDataSourceFactories- Starting initDSF
>[2003-11-12 15:35:12,964 DEBUG] Torque:initDataSourceFactories- handle: PFS DataSourceFactory: org.apache.torque.dsfactory.TorqueDataSourceFactory
>[2003-11-12 15:35:12,984 DEBUG] TorqueDataSourceFactory:initCPDS- Starting initCPDS
>[2003-11-12 15:35:13,014 ERROR] TorqueDataSourceFactory:initCPDS- 
>java.lang.NullPointerException
> at org.apache.torque.dsfactory.TorqueDataSourceFactory.initCPDS(TorqueDataSourceFactory.java:129)
> at org.apache.torque.dsfactory.TorqueDataSourceFactory.initialize(TorqueDataSourceFactory.java:108)
> at org.apache.torque.Torque.initDataSourceFactories(Torque.java:323)
> at org.apache.torque.Torque.initialize(Torque.java:237)
> at org.apache.stratum.component.ComponentLoader.loadComponent(ComponentLoader.java:220)
> at org.apache.stratum.component.ComponentLoader.load(ComponentLoader.java:179)
> at org.apache.turbine.services.component.TurbineComponentService.init(TurbineComponentService.java:163)
>
>I'm sure that my servername, username, password are valid. I also have the jar (class12) for oracle in my project lib.
>
>Thank you very much.
>
>
>  
>




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


RE: Torque - Oracle

Posted by Ramesh Sabeti <rs...@reazon.com>.
> Thanks... I've check from Oracle regarding class12.jar as the jdbc
driver
> for oracle 9i.
> I'm a new user to oracle by the way.

Class12.jar is only for jdk1.2 and 1.3.  If you use other JDK versions
download the correct JDBC from Oracle.

> Would you consider 'sid' to be the database name?

Yes.

> still getting the same error with TorqueDataSourceFactory.
> 
> 
> 
> ----- Original Message -----
> From: "Ramesh Sabeti" <rs...@reazon.com>
> To: "'Apache Torque Users List'" <to...@db.apache.org>
> Sent: Wednesday, November 12, 2003 11:31 PM
> Subject: RE: Torque - Oracle
> 
> 
> > A few notes:
> >
> > - I'm not 100% sure, but at some point, Torque was case sensitive
about
> > username.
> >
> > - Make sure you have the correct Oracle JDBC driver for your JDK
version
> > (class12 is for JDK 1.2, 1.3).
> >
> > - Do a search/replace on all BasexxxPeer.java and change
> > BasePeer.doSelect to BasePeer.doPSSelect, or Oracle will run out of
> > share pool quickly.  This has nothing to do with your configuration
> > though.
> >
> > - Here's my entire configuration including logs and other stuff...
it's
> > working with 3.0 version.  Hope it helps:
> >
> >
> > torque.applicationRoot = .
> >
> >
> > log4j.rootCategory = DEBUG, default
> >
> > log4j.category.default=WARN, default
> > log4j.category.testbed=DEBUG, default
> > log4j.appender.default=org.apache.log4j.ConsoleAppender
> >
> > log4j.appender.default.layout=org.apache.log4j.PatternLayout
> > log4j.appender.default.layout.ConversionPattern=%-4r [%t] %-5p %c %x
-
> > %m%n
> >
> > log4j.category.org.apache.torque = WARN, org.apache.torque
> > log4j.appender.org.apache.torque = org.apache.log4j.FileAppender
> > log4j.appender.org.apache.torque.file =
> > ${torque.applicationRoot}/logs/torque.log
> > log4j.appender.org.apache.torque.layout =
org.apache.log4j.PatternLayout
> > log4j.appender.org.apache.torque.layout.conversionPattern = %d [%t]
%-5p
> > %c - %m%n
> > log4j.appender.org.apache.torque.append = false
> >
> > 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:sid
> > torque.dsfactory.default.connection.user = username <-- may be case
> > sensitive
> > torque.dsfactory.default.connection.password = password <-- case
> > sensitive
> >
> >
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
> >
> >
> > Ramesh.
> >
> > > -----Original Message-----
> > > From: Merwin Yap [mailto:myap@gluecode.com]
> > > Sent: Thursday, November 13, 2003 3:05 PM
> > > To: Apache Torque Users List; david.hainlin@icjava.com
> > > Subject: Re: Torque - Oracle
> > >
> > > Hi David. First of all thanks for replying.
> > >
> > > I can't seem to find any fault with the properties. A lot of
people
> > say
> > > that
> > > errors are probably due to the property file.
> > >
> > > I'm using torque 3.0 for Turbine.
> > > Do I need to recompile OM classes of Turbine?
> > >
> > > I've also tried Jdbc2Pool, but getting the same result.
> > >
> > > I do have the class12.jar of oracle in my lib.  I'm sure that the
db
> > in
> > > oracle is running fine as I have accessed it via sql*plus.
> > >
> > > What else do I need to do or can do?
> > >
> > > Thanks!
> > >
> > >
> > >
> > > ----- Original Message -----
> > > From: "David Hainlin" <dh...@comcast.net>
> > > To: "Apache Torque Users List" <to...@db.apache.org>
> > > Sent: Wednesday, November 12, 2003 4:29 AM
> > > Subject: Re: Torque - Oracle
> > >
> > >
> > > > Merwin,
> > > > I have recenlty used the following to connect to oracle. HTH
> > > >
> > > > torque.database.default=orcl
> > > > torque.database.orcl.adapter=oracle
> > > >
> > >
> >
torque.dsfactory.orcl.factory=org.apache.torque.dsfactory.TorqueDataSour
> > ce
> > > Fa
> > > ctory
> > > > torque.dsfactory.orcl.pool.defaultMaxConnections=5
> > > > torque.dsfactory.orcl.pool.maxExpiryTime=3600
> > > > torque.dsfactory.orcl.pool.connectionWaitTimeout=10
> > > > torque.dsfactory.orcl.connection.driver =
> > > oracle.jdbc.driver.OracleDriver
> > > > torque.dsfactory.orcl.connection.url =
> > > jdbc:oracle:thin:<server>:1521:<sid>
> > > > torque.dsfactory.orcl.connection.user = <user>
> > > > torque.dsfactory.orcl.connection.password = <pass>
> > > >
> > > > I did not have any other torque.database.* entries...
> > > >
> > > > Merwin Yap wrote:
> > > >
> > > > >Im trying to use Oracle as our database for torque. We've
> > successfully
> > > implemented torque using hsql and mysql but no luck with oracle.
> > > > >
> > > > >As written in the guide, I've edited torque.properties
> > > > >
> > > > >torque.database.default=PFS
> > > > >torque.database.PFS.adapter=oracle
> > > >
>torque.database.PFS.url=jdbc:oracle:thin:@<servername>:1521:<sid>
> > > > >torque.database.PFS.driver=oracle.jdbc.driver.OracleDriver
> > > > >torque.database.PFS.user=<username>
> > > > >torque.database.PFS.password=<password>
> > > > >
> > > >
> > >
> >
>torque.dsfactory.PFS.factory=org.apache.torque.dsfactory.TorqueDataSour
> > ce
> > > Factory
> > > > >torque.dsfactory.PFS.pool.defaultMaxConnections=10
> > > > >torque.dsfactory.PFS.pool.maxExpiryTime=3600
> > > > >torque.dsfactory.PFS.pool.connectionWaitTimeout=10
> > > > >
> > > >
> >
>torque.database.PFS.connection.driver=oracle.jdbc.driver.OracleDriver
> > > >
> > >
> >
>torque.database.PFS.connection.url=jdbc:oracle:thin:@<servername>:1521:
> > <s
> > > id
> > > >
> > > > >torque.database.PFS.connection.user=<username>
> > > > >torque.database.PFS.connection.password=<password>
> > > > >
> > > > >And I'm getting this in my log file:
> > > > >
> > > > >[2003-11-12 15:35:12,873 DEBUG] Torque:initAdapters- Starting
> > > initAdapters
> > > > >[2003-11-12 15:35:12,964 DEBUG] Torque:initDataSourceFactories-
> > > Starting
> > > initDSF
> > > > >[2003-11-12 15:35:12,964 DEBUG] Torque:initDataSourceFactories-
> > handle:
> > > PFS DataSourceFactory:
> > org.apache.torque.dsfactory.TorqueDataSourceFactory
> > > > >[2003-11-12 15:35:12,984 DEBUG]
TorqueDataSourceFactory:initCPDS-
> > > Starting initCPDS
> > > > >[2003-11-12 15:35:13,014 ERROR]
TorqueDataSourceFactory:initCPDS-
> > > > >java.lang.NullPointerException
> > > > > at
> > >
> >
org.apache.torque.dsfactory.TorqueDataSourceFactory.initCPDS(TorqueDataS
> > ou
> > > rc
> > > eFactory.java:129)
> > > > > 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.stratum.component.ComponentLoader.loadComponent(ComponentLoad
> > er
> > > .j
> > > ava:220)
> > > > > at
> > >
> >
org.apache.stratum.component.ComponentLoader.load(ComponentLoader.java:1
> > 79
> > > )
> > > > > at
> > >
> >
org.apache.turbine.services.component.TurbineComponentService.init(Turbi
> > ne
> > > Co
> > > mponentService.java:163)
> > > > >
> > > > >I'm sure that my servername, username, password are valid. I
also
> > have
> > > the jar (class12) for oracle in my project lib.
> > > > >
> > > > >Thank you very much.
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> >
---------------------------------------------------------------------
> > > > 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
> >
> >
> >
> >
---------------------------------------------------------------------
> > 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



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


Re: Torque - Oracle

Posted by Merwin Yap <my...@gluecode.com>.
Thanks... I've check from Oracle regarding class12.jar as the jdbc driver
for oracle 9i.
I'm a new user to oracle by the way.

Would you consider 'sid' to be the database name?

still getting the same error with TorqueDataSourceFactory.






----- Original Message ----- 
From: "Ramesh Sabeti" <rs...@reazon.com>
To: "'Apache Torque Users List'" <to...@db.apache.org>
Sent: Wednesday, November 12, 2003 11:31 PM
Subject: RE: Torque - Oracle


> A few notes:
>
> - I'm not 100% sure, but at some point, Torque was case sensitive about
> username.
>
> - Make sure you have the correct Oracle JDBC driver for your JDK version
> (class12 is for JDK 1.2, 1.3).
>
> - Do a search/replace on all BasexxxPeer.java and change
> BasePeer.doSelect to BasePeer.doPSSelect, or Oracle will run out of
> share pool quickly.  This has nothing to do with your configuration
> though.
>
> - Here's my entire configuration including logs and other stuff... it's
> working with 3.0 version.  Hope it helps:
>
>
> torque.applicationRoot = .
>
>
> log4j.rootCategory = DEBUG, default
>
> log4j.category.default=WARN, default
> log4j.category.testbed=DEBUG, default
> log4j.appender.default=org.apache.log4j.ConsoleAppender
>
> log4j.appender.default.layout=org.apache.log4j.PatternLayout
> log4j.appender.default.layout.ConversionPattern=%-4r [%t] %-5p %c %x -
> %m%n
>
> log4j.category.org.apache.torque = WARN, org.apache.torque
> log4j.appender.org.apache.torque = org.apache.log4j.FileAppender
> log4j.appender.org.apache.torque.file =
> ${torque.applicationRoot}/logs/torque.log
> log4j.appender.org.apache.torque.layout = org.apache.log4j.PatternLayout
> log4j.appender.org.apache.torque.layout.conversionPattern = %d [%t] %-5p
> %c - %m%n
> log4j.appender.org.apache.torque.append = false
>
> 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:sid
> torque.dsfactory.default.connection.user = username <-- may be case
> sensitive
> torque.dsfactory.default.connection.password = password <-- case
> sensitive
>
> 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
>
>
> Ramesh.
>
> > -----Original Message-----
> > From: Merwin Yap [mailto:myap@gluecode.com]
> > Sent: Thursday, November 13, 2003 3:05 PM
> > To: Apache Torque Users List; david.hainlin@icjava.com
> > Subject: Re: Torque - Oracle
> >
> > Hi David. First of all thanks for replying.
> >
> > I can't seem to find any fault with the properties. A lot of people
> say
> > that
> > errors are probably due to the property file.
> >
> > I'm using torque 3.0 for Turbine.
> > Do I need to recompile OM classes of Turbine?
> >
> > I've also tried Jdbc2Pool, but getting the same result.
> >
> > I do have the class12.jar of oracle in my lib.  I'm sure that the db
> in
> > oracle is running fine as I have accessed it via sql*plus.
> >
> > What else do I need to do or can do?
> >
> > Thanks!
> >
> >
> >
> > ----- Original Message -----
> > From: "David Hainlin" <dh...@comcast.net>
> > To: "Apache Torque Users List" <to...@db.apache.org>
> > Sent: Wednesday, November 12, 2003 4:29 AM
> > Subject: Re: Torque - Oracle
> >
> >
> > > Merwin,
> > > I have recenlty used the following to connect to oracle. HTH
> > >
> > > torque.database.default=orcl
> > > torque.database.orcl.adapter=oracle
> > >
> >
> torque.dsfactory.orcl.factory=org.apache.torque.dsfactory.TorqueDataSour
> ce
> > Fa
> > ctory
> > > torque.dsfactory.orcl.pool.defaultMaxConnections=5
> > > torque.dsfactory.orcl.pool.maxExpiryTime=3600
> > > torque.dsfactory.orcl.pool.connectionWaitTimeout=10
> > > torque.dsfactory.orcl.connection.driver =
> > oracle.jdbc.driver.OracleDriver
> > > torque.dsfactory.orcl.connection.url =
> > jdbc:oracle:thin:<server>:1521:<sid>
> > > torque.dsfactory.orcl.connection.user = <user>
> > > torque.dsfactory.orcl.connection.password = <pass>
> > >
> > > I did not have any other torque.database.* entries...
> > >
> > > Merwin Yap wrote:
> > >
> > > >Im trying to use Oracle as our database for torque. We've
> successfully
> > implemented torque using hsql and mysql but no luck with oracle.
> > > >
> > > >As written in the guide, I've edited torque.properties
> > > >
> > > >torque.database.default=PFS
> > > >torque.database.PFS.adapter=oracle
> > > >torque.database.PFS.url=jdbc:oracle:thin:@<servername>:1521:<sid>
> > > >torque.database.PFS.driver=oracle.jdbc.driver.OracleDriver
> > > >torque.database.PFS.user=<username>
> > > >torque.database.PFS.password=<password>
> > > >
> > >
> >
> >torque.dsfactory.PFS.factory=org.apache.torque.dsfactory.TorqueDataSour
> ce
> > Factory
> > > >torque.dsfactory.PFS.pool.defaultMaxConnections=10
> > > >torque.dsfactory.PFS.pool.maxExpiryTime=3600
> > > >torque.dsfactory.PFS.pool.connectionWaitTimeout=10
> > > >
> > >
> >torque.database.PFS.connection.driver=oracle.jdbc.driver.OracleDriver
> > >
> >
> >torque.database.PFS.connection.url=jdbc:oracle:thin:@<servername>:1521:
> <s
> > id
> > >
> > > >torque.database.PFS.connection.user=<username>
> > > >torque.database.PFS.connection.password=<password>
> > > >
> > > >And I'm getting this in my log file:
> > > >
> > > >[2003-11-12 15:35:12,873 DEBUG] Torque:initAdapters- Starting
> > initAdapters
> > > >[2003-11-12 15:35:12,964 DEBUG] Torque:initDataSourceFactories-
> > Starting
> > initDSF
> > > >[2003-11-12 15:35:12,964 DEBUG] Torque:initDataSourceFactories-
> handle:
> > PFS DataSourceFactory:
> org.apache.torque.dsfactory.TorqueDataSourceFactory
> > > >[2003-11-12 15:35:12,984 DEBUG] TorqueDataSourceFactory:initCPDS-
> > Starting initCPDS
> > > >[2003-11-12 15:35:13,014 ERROR] TorqueDataSourceFactory:initCPDS-
> > > >java.lang.NullPointerException
> > > > at
> >
> org.apache.torque.dsfactory.TorqueDataSourceFactory.initCPDS(TorqueDataS
> ou
> > rc
> > eFactory.java:129)
> > > > 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.stratum.component.ComponentLoader.loadComponent(ComponentLoad
> er
> > .j
> > ava:220)
> > > > at
> >
> org.apache.stratum.component.ComponentLoader.load(ComponentLoader.java:1
> 79
> > )
> > > > at
> >
> org.apache.turbine.services.component.TurbineComponentService.init(Turbi
> ne
> > Co
> > mponentService.java:163)
> > > >
> > > >I'm sure that my servername, username, password are valid. I also
> have
> > the jar (class12) for oracle in my project lib.
> > > >
> > > >Thank you very much.
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > 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
>
>
>
> ---------------------------------------------------------------------
> 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


RE: Torque - Oracle

Posted by Ramesh Sabeti <rs...@reazon.com>.
A few notes:

- I'm not 100% sure, but at some point, Torque was case sensitive about
username.

- Make sure you have the correct Oracle JDBC driver for your JDK version
(class12 is for JDK 1.2, 1.3).  

- Do a search/replace on all BasexxxPeer.java and change
BasePeer.doSelect to BasePeer.doPSSelect, or Oracle will run out of
share pool quickly.  This has nothing to do with your configuration
though.  

- Here's my entire configuration including logs and other stuff... it's
working with 3.0 version.  Hope it helps:


torque.applicationRoot = .


log4j.rootCategory = DEBUG, default

log4j.category.default=WARN, default
log4j.category.testbed=DEBUG, default
log4j.appender.default=org.apache.log4j.ConsoleAppender

log4j.appender.default.layout=org.apache.log4j.PatternLayout
log4j.appender.default.layout.ConversionPattern=%-4r [%t] %-5p %c %x -
%m%n

log4j.category.org.apache.torque = WARN, org.apache.torque
log4j.appender.org.apache.torque = org.apache.log4j.FileAppender
log4j.appender.org.apache.torque.file =
${torque.applicationRoot}/logs/torque.log
log4j.appender.org.apache.torque.layout = org.apache.log4j.PatternLayout
log4j.appender.org.apache.torque.layout.conversionPattern = %d [%t] %-5p
%c - %m%n
log4j.appender.org.apache.torque.append = false

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:sid
torque.dsfactory.default.connection.user = username <-- may be case
sensitive
torque.dsfactory.default.connection.password = password <-- case
sensitive

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


Ramesh.

> -----Original Message-----
> From: Merwin Yap [mailto:myap@gluecode.com]
> Sent: Thursday, November 13, 2003 3:05 PM
> To: Apache Torque Users List; david.hainlin@icjava.com
> Subject: Re: Torque - Oracle
> 
> Hi David. First of all thanks for replying.
> 
> I can't seem to find any fault with the properties. A lot of people
say
> that
> errors are probably due to the property file.
> 
> I'm using torque 3.0 for Turbine.
> Do I need to recompile OM classes of Turbine?
> 
> I've also tried Jdbc2Pool, but getting the same result.
> 
> I do have the class12.jar of oracle in my lib.  I'm sure that the db
in
> oracle is running fine as I have accessed it via sql*plus.
> 
> What else do I need to do or can do?
> 
> Thanks!
> 
> 
> 
> ----- Original Message -----
> From: "David Hainlin" <dh...@comcast.net>
> To: "Apache Torque Users List" <to...@db.apache.org>
> Sent: Wednesday, November 12, 2003 4:29 AM
> Subject: Re: Torque - Oracle
> 
> 
> > Merwin,
> > I have recenlty used the following to connect to oracle. HTH
> >
> > torque.database.default=orcl
> > torque.database.orcl.adapter=oracle
> >
>
torque.dsfactory.orcl.factory=org.apache.torque.dsfactory.TorqueDataSour
ce
> Fa
> ctory
> > torque.dsfactory.orcl.pool.defaultMaxConnections=5
> > torque.dsfactory.orcl.pool.maxExpiryTime=3600
> > torque.dsfactory.orcl.pool.connectionWaitTimeout=10
> > torque.dsfactory.orcl.connection.driver =
> oracle.jdbc.driver.OracleDriver
> > torque.dsfactory.orcl.connection.url =
> jdbc:oracle:thin:<server>:1521:<sid>
> > torque.dsfactory.orcl.connection.user = <user>
> > torque.dsfactory.orcl.connection.password = <pass>
> >
> > I did not have any other torque.database.* entries...
> >
> > Merwin Yap wrote:
> >
> > >Im trying to use Oracle as our database for torque. We've
successfully
> implemented torque using hsql and mysql but no luck with oracle.
> > >
> > >As written in the guide, I've edited torque.properties
> > >
> > >torque.database.default=PFS
> > >torque.database.PFS.adapter=oracle
> > >torque.database.PFS.url=jdbc:oracle:thin:@<servername>:1521:<sid>
> > >torque.database.PFS.driver=oracle.jdbc.driver.OracleDriver
> > >torque.database.PFS.user=<username>
> > >torque.database.PFS.password=<password>
> > >
> >
>
>torque.dsfactory.PFS.factory=org.apache.torque.dsfactory.TorqueDataSour
ce
> Factory
> > >torque.dsfactory.PFS.pool.defaultMaxConnections=10
> > >torque.dsfactory.PFS.pool.maxExpiryTime=3600
> > >torque.dsfactory.PFS.pool.connectionWaitTimeout=10
> > >
> >
>torque.database.PFS.connection.driver=oracle.jdbc.driver.OracleDriver
> >
>
>torque.database.PFS.connection.url=jdbc:oracle:thin:@<servername>:1521:
<s
> id
> >
> > >torque.database.PFS.connection.user=<username>
> > >torque.database.PFS.connection.password=<password>
> > >
> > >And I'm getting this in my log file:
> > >
> > >[2003-11-12 15:35:12,873 DEBUG] Torque:initAdapters- Starting
> initAdapters
> > >[2003-11-12 15:35:12,964 DEBUG] Torque:initDataSourceFactories-
> Starting
> initDSF
> > >[2003-11-12 15:35:12,964 DEBUG] Torque:initDataSourceFactories-
handle:
> PFS DataSourceFactory:
org.apache.torque.dsfactory.TorqueDataSourceFactory
> > >[2003-11-12 15:35:12,984 DEBUG] TorqueDataSourceFactory:initCPDS-
> Starting initCPDS
> > >[2003-11-12 15:35:13,014 ERROR] TorqueDataSourceFactory:initCPDS-
> > >java.lang.NullPointerException
> > > at
>
org.apache.torque.dsfactory.TorqueDataSourceFactory.initCPDS(TorqueDataS
ou
> rc
> eFactory.java:129)
> > > 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.stratum.component.ComponentLoader.loadComponent(ComponentLoad
er
> .j
> ava:220)
> > > at
>
org.apache.stratum.component.ComponentLoader.load(ComponentLoader.java:1
79
> )
> > > at
>
org.apache.turbine.services.component.TurbineComponentService.init(Turbi
ne
> Co
> mponentService.java:163)
> > >
> > >I'm sure that my servername, username, password are valid. I also
have
> the jar (class12) for oracle in my project lib.
> > >
> > >Thank you very much.
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> >
---------------------------------------------------------------------
> > 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



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


Re: Torque - Oracle

Posted by Merwin Yap <my...@gluecode.com>.
Hi David. First of all thanks for replying.

I can't seem to find any fault with the properties. A lot of people say that
errors are probably due to the property file.

I'm using torque 3.0 for Turbine.
Do I need to recompile OM classes of Turbine?

I've also tried Jdbc2Pool, but getting the same result.

I do have the class12.jar of oracle in my lib.  I'm sure that the db in
oracle is running fine as I have accessed it via sql*plus.

What else do I need to do or can do?

Thanks!



----- Original Message ----- 
From: "David Hainlin" <dh...@comcast.net>
To: "Apache Torque Users List" <to...@db.apache.org>
Sent: Wednesday, November 12, 2003 4:29 AM
Subject: Re: Torque - Oracle


> Merwin,
> I have recenlty used the following to connect to oracle. HTH
>
> torque.database.default=orcl
> torque.database.orcl.adapter=oracle
>
torque.dsfactory.orcl.factory=org.apache.torque.dsfactory.TorqueDataSourceFa
ctory
> torque.dsfactory.orcl.pool.defaultMaxConnections=5
> torque.dsfactory.orcl.pool.maxExpiryTime=3600
> torque.dsfactory.orcl.pool.connectionWaitTimeout=10
> torque.dsfactory.orcl.connection.driver = oracle.jdbc.driver.OracleDriver
> torque.dsfactory.orcl.connection.url =
jdbc:oracle:thin:<server>:1521:<sid>
> torque.dsfactory.orcl.connection.user = <user>
> torque.dsfactory.orcl.connection.password = <pass>
>
> I did not have any other torque.database.* entries...
>
> Merwin Yap wrote:
>
> >Im trying to use Oracle as our database for torque. We've successfully
implemented torque using hsql and mysql but no luck with oracle.
> >
> >As written in the guide, I've edited torque.properties
> >
> >torque.database.default=PFS
> >torque.database.PFS.adapter=oracle
> >torque.database.PFS.url=jdbc:oracle:thin:@<servername>:1521:<sid>
> >torque.database.PFS.driver=oracle.jdbc.driver.OracleDriver
> >torque.database.PFS.user=<username>
> >torque.database.PFS.password=<password>
> >
> >torque.dsfactory.PFS.factory=org.apache.torque.dsfactory.TorqueDataSource
Factory
> >torque.dsfactory.PFS.pool.defaultMaxConnections=10
> >torque.dsfactory.PFS.pool.maxExpiryTime=3600
> >torque.dsfactory.PFS.pool.connectionWaitTimeout=10
> >
> >torque.database.PFS.connection.driver=oracle.jdbc.driver.OracleDriver
>
>torque.database.PFS.connection.url=jdbc:oracle:thin:@<servername>:1521:<sid
>
> >torque.database.PFS.connection.user=<username>
> >torque.database.PFS.connection.password=<password>
> >
> >And I'm getting this in my log file:
> >
> >[2003-11-12 15:35:12,873 DEBUG] Torque:initAdapters- Starting
initAdapters
> >[2003-11-12 15:35:12,964 DEBUG] Torque:initDataSourceFactories- Starting
initDSF
> >[2003-11-12 15:35:12,964 DEBUG] Torque:initDataSourceFactories- handle:
PFS DataSourceFactory: org.apache.torque.dsfactory.TorqueDataSourceFactory
> >[2003-11-12 15:35:12,984 DEBUG] TorqueDataSourceFactory:initCPDS-
Starting initCPDS
> >[2003-11-12 15:35:13,014 ERROR] TorqueDataSourceFactory:initCPDS-
> >java.lang.NullPointerException
> > at
org.apache.torque.dsfactory.TorqueDataSourceFactory.initCPDS(TorqueDataSourc
eFactory.java:129)
> > 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.stratum.component.ComponentLoader.loadComponent(ComponentLoader.j
ava:220)
> > at
org.apache.stratum.component.ComponentLoader.load(ComponentLoader.java:179)
> > at
org.apache.turbine.services.component.TurbineComponentService.init(TurbineCo
mponentService.java:163)
> >
> >I'm sure that my servername, username, password are valid. I also have
the jar (class12) for oracle in my project lib.
> >
> >Thank you very much.
> >
> >
> >
> >
>
>
>
>
> ---------------------------------------------------------------------
> 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