I had a problem similar to this (with MS SQL Server 2000). Note that it is
outputting your "schema" property as the unsubstituted variable
"${databaseSchema}" -- What I did to overcome this was add a property
"databaseSchema" in my build.properties with a value of "dbo". This did the
trick on SQL Server, it may require something else for DB2. Note that the
databaseSchema property is really only intended for Oracle support (if you
check out the Torque documentation).Hope this helps, and best of luck. Justin Campbell Project Technical Lead Profile Systems, Inc. -----Original Message----- From: David E Noel [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 5:42 PM To: [EMAIL PROTECTED] Subject: DB2 7.1 problems 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(SQLExceptionGe nerator.java:264) [torque-jdbc-transform] at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGe nerator.java:207) [torque-jdbc-transform] at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(SQLExceptionGen erator.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(TorqueJDBCTrans formTask.java:392) [torque-jdbc-transform] at org.apache.torque.task.TorqueJDBCTransformTask.generateXML(TorqueJDBCTransfo rmTask.java:231) [torque-jdbc-transform] at org.apache.torque.task.TorqueJDBCTransformTask.execute(TorqueJDBCTransformTa sk.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 -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
