db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <tfisc...@apache.org>
Subject RE: HSQLDB not working with torque-gen
Date Thu, 08 Sep 2005 22:06:00 GMT
Hi,

if you cannot fix it via the schema, chances are that there is a bug in 
the hsqldb driver.

The code in the generator is

...
String[] types = {"TABLE", "VIEW"};
...
tableNames = dbMeta.getTables(null, dbSchema, "%", types);
...

where dbMeta is the DatabaseMetaData from the connection.

If you do not trust the generator, you can try if you get this working "by 
hand", i.e. get a connection, and play with getMetaData().getTables() and 
see if you can get it working. If it does not work, it is indeed a bug in 
the hsqldb driver; open a bug with them. If you get it working, please 
tell us how.

    Thomas



On Thu, 8 Sep 2005, Gary Baranzini wrote:

> Hi,
>
> Below is the output from running Torque-gen. The SELECT statement didn't
> change when I changed torque.database.schema to INFORMATION_SCHEMA.
>
>
> 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 : org.hsqldb.jdbcDriver
> [torque-jdbc-transform] URL : jdbc:hsqldb:hsql://localhost/pinyin
> [torque-jdbc-transform] user : sa
> [torque-jdbc-transform] schema : INFORMATION_SCHEMA
> [torque-jdbc-transform] DB driver sucessfuly instantiated
> [torque-jdbc-transform] DB connection established
> [torque-jdbc-transform] Getting table list...
>
> BUILD FAILED
> D:\JavaApps\torque-gen-3.2-rc1\build-torque.xml:339: java.sql.SQLException:
> Table not found in statement [SELECT * FROM SYSTEM_TABLES]
>
>
> Gary
>
> -----Original Message-----
> From: Thomas Fischer [mailto:tfischer@apache.org]
> Sent: Thursday, September 08, 2005 2:01 PM
> To: Apache Torque Users List
> Subject: Re: HSQLDB not working with torque-gen
>
> Hi,
>
> As far as I remember, torque-gen uses the metadata from a connection to find
> out the list of tables; it does not actually compose the statement.
> However, in my experience, the metadata is very picky about suppliying the
> right database schema. In oracle, it's even case sensitive.
> Try to set torque.database.schema to INFORMATION_SCHEMA in the generator
> options.
>
>     Thomas
>
> On Thu, 8 Sep 2005, Gary Baranzini wrote:
>
>> Hi,
>>
>> I'm trying to run torque-gen 3.2 rc1 against HSQLDB 1.8.
>>
>> I can get the DB driver successfully instantiated and DB connection
>> established.
>>
>> But when torque-gen tries to get the table list it fails on the
>> [SELECT * FROM SYSTEM_TABLES] statement.
>>
>> HSQLDB 1.8 appears to require [SELECT * FROM
>> INFORMATION_SCHEMA.SYSTEM_TABLES]
>>
>> Any suggestion on how to get this to work?
>>
>> Thanks,
>>
>> gary
>>
>>
>>  _____
>>
>>
>> Gary W. Baranzini
>> conanjb@comcast.net
>>
>>
>> Cyber and Sons
>> Computer Solution Specialists
>> 925.998.4768
>>
>>
>>
>
> ---------------------------------------------------------------------
> 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