Derick,

If I try using that I get a java.lang.ClassNotFoundException: org.apache.torque.dsfactory.Jdbc2PoolDataSourceFactory. Could this hint at whats going on?

Branden Root
Senior Developer
Portent Interactive
On Nov 14, 2003, at 12:37 PM, Derick Fernando wrote:

Hi Again,

Have you tried this factory as well?
org.apache.torque.dsfactory.Jdbc2PoolDataSourceFactory

Derick

----- Original Message -----
From: "Branden Root" <[EMAIL PROTECTED]>
To: "Apache Torque Users List" <[EMAIL PROTECTED]>
Sent: Friday, November 14, 2003 12:27 PM
Subject: Re: Torque problems with Tomcat and Struts


Derick,

Still didn't do anything I'm afraid.

Branden Root
Senior Developer
Portent Interactive
On Nov 14, 2000, at 11:48 AM, Derick Fernando wrote:

Hello,

Not sure if this is this issue, but try:
torque.dsfactory.default.factory=org.apache.torque.dsfactory.TorqueDa ta
Sourc
eFactory


Derick

----- Original Message -----
From: "Branden Root" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 14, 2003 11:31 AM
Subject: Torque problems with Tomcat and Struts


Hello,



I've been trying to get Torque standalone to work with a Tomcat/Struts
webapp. When I follow the tutorial to create a standalone test, all
works
well, from OM generation to the actual database work. However, when I
copy
my
classes over to my webapp and try and do the same thing, I get errors.
I
created a small servlet to run
Torque.init("/path/to/Torque.properties") and
I watch the tomcat log to see the error. If anyone could let me know
what
I'm
doing wrong I'd greatly appreciate it.


Torque.properties:

log4j.rootCategory = DEBUG, default
log4j.appender.default = org.apache.log4j.FileAppender
log4j.appender.default.file = ./torque.log
log4j.appender.default.layout = org.apache.log4j.SimpleLayout

torque.database.default= gamehosting
torque.database.gamehosting.driver =
com.microsoft.jdbc.sqlserver.SQLServerDriver
torque.database.gamehosting.url = jdbc:microsoft:sqlserver://
dbserver:1433;DatabaseName=gamehosting;SelectMethod=cursor

torque.database.gamehosting.username = username
torque.database.gamehosting.password = password
torque.dsfactory.gamehosting.factory =
org.apache.torque.dsfactory.TorqueDataSourceFactory

torque.dsfactory.gamehosting.pool.defaultMaxConnections=10
torque.dsfactory.gamehosting.pool.maxExpiryTime=3600
torque.dsfactory.gamehosting.pool.connectionWaitTimeout=10
torque.dsfactory.gamehosting.connection.driver =
com.microsoft.jdbc.sqlserver.SQLServerDriver
torque.dsfactory.gamehosting.connection.url =
jdbc:microsoft:sqlserver://
dbserver:1433;DatabaseName=gamehosting;SelectMethod=cursor
torque.dsfactory.gamehosting.connection.user = username
torque.dsfactory.gamehosting.connection.password = password
torque.database.gamehosting.adapter = mssql
torque.gamehosting.connection.driver   =
com.microsoft.jdbc.sqlserver.SQLServerDriver

Here's the error message in catalina.out when i run the servlet that
contains
Torque.init(). Note, the servlet actually runs fine, even though the
log
says
ERROR. Its only when I try and actually do a database operation, like
myclass.save() that i get an actual exception.

[DEBUG] TorqueInstance - -initialize()
[DEBUG] TorqueInstance -
-setConfiguration(org.apache.commons.configuration.BaseConfiguration@ 12
57687
)
[DEBUG] TorqueInstance -
-initAdapters([EMAIL PROTECTED] 68
7)
[DEBUG] TorqueInstance - -Adding mssql -> gamehosting as Adapter
[DEBUG] TorqueInstance -
-initDataSourceFactories(org.apache.commons.configuration.BaseConfigu ra
tion@
1257687)
[DEBUG] TorqueInstance - -handle: gamehosting DataSourceFactory:
org.apache.torque.dsfactory.TorqueDataSourceFactory
[DEBUG] AbstractDataSourceFactory - -Starting initCPDS
[DEBUG] TorqueInstance - -getConfiguration() =
[EMAIL PROTECTED]
[DEBUG] AbstractDataSourceFactory - -applyConfiguration(null,
[EMAIL PROTECTED])
[DEBUG] AbstractDataSourceFactory -
-applyConfiguration(org.apache.commons.configuration.BaseConfiguratio n@
db38a
4,
[EMAIL PROTECTED])
[DEBUG] ConvertUtils - -Convert string 'mssql' to class
'java.lang.String'
[ERROR] AbstractDataSourceFactory - -Property: driver value:
com.microsoft.jdbc.sqlserver.SQLServerDriver is not supported by
DataSource:
org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS
[DEBUG] ConvertUtils - -Convert string
'jdbc:microsoft:sqlserver://192.168.1.15:1433;
DatabaseName=gamehosting;Selec
tMethod=cursor'
to class 'java.lang.String'
[DEBUG] AbstractDataSourceFactory -
-setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterC PD
[EMAIL PROTECTED]
319,
url,
jdbc:microsoft:sqlserver://192.168.1.15:1433; DatabaseName=gamehosting;
Select
Method=cursor)


And when i actually try and do a database operation i get:


java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:532)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at
org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS.getPooledConnec ti
on(Dr
iverAdapterCPDS.java:205)
at
org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS.getPooledConnec ti
on(Dr
iverAdapterCPDS.java:175)
at
org.apache.torque.pool.ConnectionPool.getNewConnection(ConnectionPool .j
ava:2
54)



No matter what I put for the torque.dsfactory.gamehosting.connection.driver, I seem to get the same error in the logs.


Any ideas?




--
Branden Root
Senior Developer
Portent Interactive

If you wish to learn more about the security features of
this email, and how it can help your business, please email
[EMAIL PROTECTED]


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


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



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



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



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



Reply via email to