Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 15590 invoked from network); 14 Nov 2003 20:28:01 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 14 Nov 2003 20:28:01 -0000 Received: (qmail 15217 invoked by uid 500); 14 Nov 2003 20:27:48 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 15202 invoked by uid 500); 14 Nov 2003 20:27:47 -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 15189 invoked from network); 14 Nov 2003 20:27:47 -0000 Received: from unknown (HELO helios.portentinteractive.com) (66.135.149.204) by daedalus.apache.org with SMTP; 14 Nov 2003 20:27:47 -0000 Received: from [192.168.1.55] (pulsar [66.135.149.200]) by helios.portentinteractive.com (Postfix) with ESMTP id 7E57364 for ; Fri, 14 Nov 2003 12:27:52 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v606) In-Reply-To: <006001c04e73$e5e8f8f0$bc5be6d8@gui> References: <200311141131.58016.branden@portentinteractive.com> <006001c04e73$e5e8f8f0$bc5be6d8@gui> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <05C1FE3B-16E1-11D8-9986-000393640EBA@portentinteractive.com> Content-Transfer-Encoding: 7bit From: Branden Root Subject: Re: Torque problems with Tomcat and Struts Date: Fri, 14 Nov 2003 12:27:52 -0800 To: "Apache Torque Users List" X-Mailer: Apple Mail (2.606) 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 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.TorqueData > Sourc > eFactory > > Derick > > ----- Original Message ----- > From: "Branden Root" > To: > 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(org.apache.commons.configuration.BaseConfiguration@125768 > 7) > [DEBUG] TorqueInstance - -Adding mssql -> gamehosting as Adapter > [DEBUG] TorqueInstance - > -initDataSourceFactories(org.apache.commons.configuration.BaseConfigura > tion@ > 1257687) > [DEBUG] TorqueInstance - -handle: gamehosting DataSourceFactory: > org.apache.torque.dsfactory.TorqueDataSourceFactory > [DEBUG] AbstractDataSourceFactory - -Starting initCPDS > [DEBUG] TorqueInstance - -getConfiguration() = > org.apache.commons.configuration.BaseConfiguration@1257687 > [DEBUG] AbstractDataSourceFactory - -applyConfiguration(null, > org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@88d319) > [DEBUG] AbstractDataSourceFactory - > -applyConfiguration(org.apache.commons.configuration.BaseConfiguration@ > db38a > 4, > org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@88d319) > [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.DriverAdapterCPD > S@88d > 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.getPooledConnecti > on(Dr > iverAdapterCPDS.java:205) > at > org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS.getPooledConnecti > 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 > branden@portentinteractive.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 > --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org