db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David E Noel <den...@us.ibm.com>
Subject DB2 7.1 problems
Date Thu, 23 Jan 2003 22:42:13 GMT
Hi.  I'm new to torque but have had success reverse engineering existing
mysql databases (ant jdbc target) and then building oms from the Torque XML
schema.

I am trying to do the same thing with a DB2 version 7.1 database on AIX.  I
am using the DB2 application jdbc driver

I am using the prebuilt version of torque 3.0 that was released in
December.

when I execute 'ant -f build-torque.xml jdbc'  I get the following


$ ant -f build-torque.xml jdbc
Buildfile: build-torque.xml

jdbc:
     [echo] +-----------------------------------------------+
     [echo] |                                               |
     [echo] | Generating XML from JDBC connection !         |
     [echo] | Woo hoo!                                      |
     [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:MYDB
[torque-jdbc-transform] user : joeblow
[torque-jdbc-transform] schema : ${databaseSchema}
[torque-jdbc-transform] DB driver sucessfuly instantiated
[torque-jdbc-transform] DB connection established
[torque-jdbc-transform] Getting table list...
[torque-jdbc-transform] COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI
Driver][DB2/6000] SQL0104N  An unexpected token "when 'SQLLBD01' then 1
 when 'SQLL9D07' then" was found following "BEGIN-OF-STATEMENT".  Expected
tokens may include:  "<space>".  SQLSTATE=42601
[torque-jdbc-transform] COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI
Driver][DB2/6000] SQL0104N  An unexpected token "when 'SQLLBD01' then 1
 when 'SQLL9D07' then" was found following "BEGIN-OF-STATEMENT".  Expected
tokens may include:  "<space>".  SQLSTATE=42601

[torque-jdbc-transform]         at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGenerator.java:264)
[torque-jdbc-transform]         at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGenerator.java:207)
[torque-jdbc-transform]         at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(SQLExceptionGenerator.java:446)
[torque-jdbc-transform]         at
COM.ibm.db2.jdbc.app.DB2DatabaseMetaData.getTables(DB2DatabaseMetaData.java:1779)
[torque-jdbc-transform]         at
org.apache.torque.task.TorqueJDBCTransformTask.getTableNames(TorqueJDBCTransformTask.java:392)
[torque-jdbc-transform]         at
org.apache.torque.task.TorqueJDBCTransformTask.generateXML(TorqueJDBCTransformTask.java:231)
[torque-jdbc-transform]         at
org.apache.torque.task.TorqueJDBCTransformTask.execute(TorqueJDBCTransformTask.java:194)
[torque-jdbc-transform]         at
org.apache.tools.ant.Task.perform(Task.java:319)
[torque-jdbc-transform]         at
org.apache.tools.ant.Target.execute(Target.java:309)
[torque-jdbc-transform]         at
org.apache.tools.ant.Target.performTasks(Target.java:336)
[torque-jdbc-transform]         at
org.apache.tools.ant.Project.executeTarget(Project.java:1306)
[torque-jdbc-transform]         at
org.apache.tools.ant.Project.executeTargets(Project.java:1250)
[torque-jdbc-transform]         at
org.apache.tools.ant.Main.runBuild(Main.java:610)
[torque-jdbc-transform]         at
org.apache.tools.ant.Main.start(Main.java:196)
[torque-jdbc-transform]         at
org.apache.tools.ant.Main.main(Main.java:235)
[torque-jdbc-transform]
[torque-jdbc-transform] Torque - JDBCToXMLSchema finished

BUILD SUCCESSFUL
Total time: 8 seconds


To me it looks like Torque is building and executing incorrect syntax to
get a list of table names, etc from the DB.  Has anyone else seen this or
better yet gotten around this?

Thanks

Dave



Mime
View raw message