db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Gray" <Dave_G...@versata.com>
Subject RE: Problem with configuration for DB2
Date Thu, 02 Dec 2004 20:56:20 GMT
Here is the output (with -debug) from the start of the jdbc task. Note that it does say the
"DB driver successfully instantiated".
Dave
------------
jdbc:
     [echo] +-----------------------------------------------+
     [echo] |                                               |
     [echo] | Generating XML from JDBC connection !         |
     [echo] |                                               |
     [echo] +-----------------------------------------------+
Class java.lang.String loaded from parent loader (parentFirst)
Class java.sql.DatabaseMetaData loaded from parent loader (parentFirst)
Class java.sql.SQLException loaded from parent loader (parentFirst)
Class java.util.Collection loaded from parent loader (parentFirst)
Property ${torque.sameJavaName} has not been set
[torque-jdbc-transform] Torque - JDBCToXMLSchema starting
[torque-jdbc-transform] Your DB settings are:
Class java.lang.StringBuffer loaded from parent loader (parentFirst)
[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
Class org.apache.xerces.dom.DocumentTypeImpl loaded from parent loader (parentFi
rst)
Class java.lang.Class loaded from parent loader (parentFirst)
Finding class COM.ibm.db2.jdbc.app.DB2Driver
Loaded from C:\torque-gen-3.1\lib\db2java.jar COM/ibm/db2/jdbc/app/DB2Driver.cla
ss
Class java.sql.Driver loaded from parent loader (parentFirst)
Class COM.ibm.db2.jdbc.app.DB2Driver loaded from ant loader (parentFirst)
Class java.util.Hashtable loaded from parent loader (parentFirst)
Class java.util.Properties loaded from parent loader (parentFirst)
Class java.sql.Connection loaded from parent loader (parentFirst)
Class java.lang.UnsatisfiedLinkError loaded from parent loader (parentFirst)
Class java.security.PrivilegedAction loaded from parent loader (parentFirst)
Class java.lang.Integer loaded from parent loader (parentFirst)
Finding class COM.ibm.db2.jdbc.app.DB2Driver$1
Loaded from C:\torque-gen-3.1\lib\db2java.jar COM/ibm/db2/jdbc/app/DB2Driver$1.c
lass
Class COM.ibm.db2.jdbc.app.DB2Driver$1 loaded from ant loader (parentFirst)
Class java.security.AccessController loaded from parent loader (parentFirst)
Class java.lang.System loaded from parent loader (parentFirst)
Finding class COM.ibm.db2.jdbc.app.DB2Driver$3
Loaded from C:\torque-gen-3.1\lib\db2java.jar COM/ibm/db2/jdbc/app/DB2Driver$3.c
lass
Class COM.ibm.db2.jdbc.app.DB2Driver$3 loaded from ant loader (parentFirst)
Finding class COM.ibm.db2.mri.DB2Messages
Loaded from C:\torque-gen-3.1\lib\db2java.jar COM/ibm/db2/mri/DB2Messages.class
Class COM.ibm.db2.mri.DB2Messages loaded from ant loader (parentFirst)
Class java.util.ResourceBundle loaded from parent loader (parentFirst)
Finding class COM.ibm.db2.mri.DB2ErrorMessages
Loaded from C:\torque-gen-3.1\lib\db2java.jar COM/ibm/db2/mri/DB2ErrorMessages.c
lass
Class java.util.ListResourceBundle loaded from parent loader (parentFirst)
Class COM.ibm.db2.mri.DB2ErrorMessages loaded from ant loader (parentFirst)
Finding class COM.ibm.db2.mri.DB2ErrorMessages_en
Couldn't load ResourceStream for COM/ibm/db2/mri/DB2ErrorMessages_en.properties
Finding class COM.ibm.db2.mri.DB2ErrorMessages_en_US
Couldn't load ResourceStream for COM/ibm/db2/mri/DB2ErrorMessages_en_US.properti
es
Class java.sql.DriverManager loaded from parent loader (parentFirst)
[torque-jdbc-transform] DB driver sucessfuly instantiated

BUILD FAILED
C:\torque-gen-3.1\build-torque.xml:340: java.sql.SQLException: No suitable drive
r
        at org.apache.torque.task.TorqueJDBCTransformTask.execute(TorqueJDBCTran
sformTask.java:211)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
        at org.apache.tools.ant.Main.runBuild(Main.java:673)
        at org.apache.tools.ant.Main.startAnt(Main.java:188)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
Caused by: 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.torque.task.TorqueJDBCTransformTask.generateXML(TorqueJDBC
TransformTask.java:228)
        at org.apache.torque.task.TorqueJDBCTransformTask.execute(TorqueJDBCTran
sformTask.java:201)
        ... 10 more
--- Nested Exception ---
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.torque.task.TorqueJDBCTransformTask.generateXML(TorqueJDBC
TransformTask.java:228)
        at org.apache.torque.task.TorqueJDBCTransformTask.execute(TorqueJDBCTran
sformTask.java:201)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
        at org.apache.tools.ant.Main.runBuild(Main.java:673)
        at org.apache.tools.ant.Main.startAnt(Main.java:188)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)

Total time: 1 second
C:\torque-gen-3.1>
-----------------------------------

-----Original Message-----
From: Stefan Clos [mailto:mail-sc@gmx.net] 
Sent: Thursday, December 02, 2004 4:40 PM
To: Apache Torque Users List
Subject: Re: Problem with configuration for DB2

i think torque canĀ“t find your jdbc Driver classes.

Check you classpath. If it not works please use a higher log level and
post more details of this exception.


Stefan


Dave Gray schrieb:

>I am using the type 2 driver: COM.ibm.db2.jdbc.app.DB2Driver
>and the url: jdbc:db2:SAMPLE
>
>-----Original Message-----
>From: Michael.Kashambuzi@bmwna.com [mailto:Michael.Kashambuzi@bmwna.com]
>
>Sent: Thursday, December 02, 2004 4:24 PM
>To: torque-user@db.apache.org
>Subject: RE: Problem with configuration for DB2
>
>Dave:
>
>Are you using the JDBC 2.0 driver?
>
>Michael
>
>-----Original Message-----
>From: Dave Gray [mailto:Dave_Gray@versata.com]
>Sent: Thursday, December 02, 2004 3:06 PM
>To: torque-user@db.apache.org
>Subject: Problem with configuration for DB2
>
>
>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: 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


Mime
View raw message