db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Pratt <rpr...@wordandsound.com>
Subject ConvertUtils Not Invoked? (Was: SQLException in Tutorial Runtime)
Date Thu, 01 Jan 2004 21:24:49 GMT
Hello.

In troubleshooting an error running the Torque tutorial demo, I have  
found a strange Torque behavior. On one of my test machines (which I'll  
call Server A), the bookstore demo runtime throws a SQLException error  
because of a null connection object. On a second test machine (Server  
B), the bookstore demo runs fine. From examining the debugger output, I  
think that the error is caused by AbstractDataSourceFactory somehow not  
invoking ConvertUtils before attempting to set properties on  
DriverAdapterCPDS. Can anyone tell me why this is happening or at least  
give me pointers on troubleshooting the problem?

My first impression was to verify the versions on all the Torque jar  
dependencies. I verified that the problem occurs on Server A even when  
it has identical jars to Server B. Server A has Tomcat4 and Resin 4.0  
installed on it while Server B does not, however. Is there a  
possibility that there's a stray jar somewhere on Server A that's  
causing the error? What jar might be causing the problem?

A lot of questions, I know, but I'm really stumped on this one since  
I'm just learning Torque.

Pasted below is relevant excerpts from the debugger output from runs of  
the bookstore on Server A and Server B.

<Server A (system that has Torque errors) debugger output>
[DEBUG] AbstractDataSourceFactory -  
- 
applyConfiguration(org.apache.commons.configuration.BaseConfiguration@84 
a3a70, org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@82a83c0)
[ERROR] AbstractDataSourceFactory - -Property: driver value:  
com.mysql.jdbc.Driver is not supported by DataSource:  
org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS
[ERROR] AbstractDataSourceFactory - -Property: url value:  
jdbc:mysql://127.0.0.1:3306/bookstore is not supported by DataSource:  
org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS
[ERROR] AbstractDataSourceFactory - -Property: user value: robertmpratt  
is not supported by DataSource:  
org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS
[ERROR] AbstractDataSourceFactory - -Property: password value: b737-700  
is not supported by DataSource:  
org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS
[DEBUG] SharedPoolDataSourceFactory - -Starting initJdbc2Pool
[DEBUG] TorqueInstance - -getConfiguration() =  
org.apache.commons.configuration.BaseConfiguration@8485b70
[DEBUG] AbstractDataSourceFactory - -applyConfiguration(null,  
org.apache.commons.dbcp.datasources.SharedPoolDataSource@84bc2a0)
[DEBUG] AbstractDataSourceFactory -  
- 
applyConfiguration(org.apache.commons.configuration.BaseConfiguration@83 
3ef10, org.apache.commons.dbcp.datasources.SharedPoolDataSource@84bc2a0)
[ERROR] AbstractDataSourceFactory - -Property: defaultMaxActive value:  
30 is not supported by DataSource:  
org.apache.commons.dbcp.datasources.SharedPoolDataSource
[DEBUG] ConvertUtils - -Convert string 'true' to class 'boolean'
[ERROR] AbstractDataSourceFactory - -Property: testOnBorrow value: true  
is not supported by DataSource:  
org.apache.commons.dbcp.datasources.SharedPoolDataSource
[DEBUG] ConvertUtils - -Convert string 'SELECT 1' to class  
'java.lang.String'
[ERROR] AbstractDataSourceFactory - -Property: validationQuery value:  
SELECT 1 is not supported by DataSource:  
org.apache.commons.dbcp.datasources.SharedPoolDataSource
[DEBUG] TorqueInstance - -Adding a dummy entry for default, mapped onto  
bookstore
[DEBUG] TorqueInstance - -getConfiguration() =  
org.apache.commons.configuration.BaseConfiguration@8485b70
</Server A debugger output>

<Server B  (system that does not have Torque errors) debugger output>
[DEBUG] AbstractDataSourceFactory -  
- 
applyConfiguration(org.apache.commons.configuration.BaseConfiguration@1e 
0be38, org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@c9ba38)
[DEBUG] ConvertUtils - -Convert string 'com.mysql.jdbc.Driver' to class  
'java.lang.String'
[DEBUG] AbstractDataSourceFactory -  
- 
setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@ 
c9ba38, driver, com.mysql.jdbc.Driver)
[DEBUG] ConvertUtils - -Convert string  
'jdbc:mysql://127.0.0.1:3306/bookstore' to class 'java.lang.String'
[DEBUG] AbstractDataSourceFactory -  
- 
setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@ 
c9ba38, url, jdbc:mysql://127.0.0.1:3306/bookstore)
[DEBUG] ConvertUtils - -Convert string 'robertmpratt' to class  
'java.lang.String'
[DEBUG] AbstractDataSourceFactory -  
- 
setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@ 
c9ba38, user, robertmpratt)
[DEBUG] ConvertUtils - -Convert string 'b737-700' to class  
'java.lang.String'
[DEBUG] AbstractDataSourceFactory -  
- 
setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@ 
c9ba38, password, b737-700)
[DEBUG] SharedPoolDataSourceFactory - -Starting initJdbc2Pool
[DEBUG] TorqueInstance - -getConfiguration() =  
org.apache.commons.configuration.BaseConfiguration@19efb05
[DEBUG] AbstractDataSourceFactory - -applyConfiguration(null,  
org.apache.commons.dbcp.datasources.SharedPoolDataSource@503429)
[DEBUG] AbstractDataSourceFactory -  
- 
applyConfiguration(org.apache.commons.configuration.BaseConfiguration@19 
08ca1, org.apache.commons.dbcp.datasources.SharedPoolDataSource@503429)
[ERROR] AbstractDataSourceFactory - -Property: defaultMaxActive value:  
30 is not supported by DataSource:  
org.apache.commons.dbcp.datasources.SharedPoolDataSource
[DEBUG] ConvertUtils - -Convert string 'true' to class 'boolean'
[ERROR] AbstractDataSourceFactory - -Property: testOnBorrow value: true  
is not supported by DataSource:  
org.apache.commons.dbcp.datasources.SharedPoolDataSource
[DEBUG] ConvertUtils - -Convert string 'SELECT 1' to class  
'java.lang.String'
[ERROR] AbstractDataSourceFactory - -Property: validationQuery value:  
SELECT 1 is not supported by DataSource:  
org.apache.commons.dbcp.datasources.SharedPoolDataSource
[DEBUG] TorqueInstance - -Adding a dummy entry for default, mapped onto  
bookstore
[DEBUG] TorqueInstance - -getConfiguration() =  
org.apache.commons.configuration.BaseConfiguration@19efb05
</Server B debugger output>

Notice that Server B invokes ConvertUtils (which I have found is from  
the commons-beanutils package) before AbstractDataSourceFactory sets  
properties while Server A does not.

Any feedback to this help request would be greatly appreciated.


Sincerely,
Rob Pratt
rpratt@wordandsound.com


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