Maybe your database URL in not correct .

If you use a JDBC Type 2 Driver the syntax is

torque.database.url = jdbc:db2:sample
torque.database.driver = COM.ibm.db2.jdbc.app.DB2Driver


If you use a JDBC Type 4 Driver use a syntax like this

torque.database.url = jdbc:db2://localhost:50000/sample
torque.database.driver = com.ibm.db2.jcc.DB2Driver


i think you have a Type 4 Driver (newer one i think) and so you must use the second syntax


cheers,
Stefan


Dave Gray schrieb:

I have been using Torque with MSSQL. We need to support multiple
database types so I am testing our apps with other databases. When I try
to run against DB2 8.2 I get the following output:
----------------------------------------------------------------
C:\torque-gen-3.1>ant -f=build-torque.xml jdbc
Buildfile: build-torque.xml

jdbc:
    [echo] +-----------------------------------------------+
    [echo] |                                               |
    [echo] | Generating XML from JDBC connection !         |
    [echo] |                                               |
    [echo] +-----------------------------------------------+
[torque-jdbc-transform] Torque - JDBCToXMLSchema starting
[torque-jdbc-transform] Your DB settings are:
[torque-jdbc-transform] driver : COM.ibm.db2.jdbc.app.DB2Driver
[torque-jdbc-transform] URL : jdbc:db2:SAMPLE
[torque-jdbc-transform] user : dgray
[torque-jdbc-transform] schema : dgray
[torque-jdbc-transform] DB driver sucessfuly instantiated

BUILD FAILED
C:\torque-gen-3.1\build-torque.xml:340: java.sql.SQLException: No
suitable driver
-----------------------------------------
My build.properties file look like:
-----------------------------------------

torque.project = DB2Test

torque.database = db2
torque.database.schema = dgray
torque.schema.dir = db2schema

torque.database.buildUrl = jdbc:db2:SAMPLE
torque.database.url = jdbc:db2:SAMPLE
torque.database.driver = COM.ibm.db2.jdbc.app.DB2Driver
torque.database.user = dgray
torque.database.password = xxxxxxxxxxxxxx
torque.database.host = xxxxxxxxxxxxxxxx
--------------------------------------
Any suggestions on what the problem is?
Thanks,
Dave

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