Hi All I encountered the same problem too. JDBC target requires various parameters to be passed out of which schema is the one that was the root cause of my problem. TorqueJDBCTransformTask class internally looks for the table list based on the DataBaseMetaData. The class calls tableNames = dbMeta.getTables(null, dbSchema, "%", types);
Here dbschema (passed as a parameter) is the schemaPattern schemaPattern - a schema name pattern; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search If schema is not passed as a parameter in the jdbc target thereby passing schemapattern as null solves the problem. Dont pass schema in the target and your problem should be solved. Thanks Megha Audichya ----- Original Message ----- From: "Saravana Krishnan Kannan" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, August 05, 2004 12:49 AM Subject: Re: Generating XML from JDBC connection > Thats the way it works. It's limited in what it converts to xml schema. You will > have to add a lot of additional properties/entities manually. > > -Sarav > > > -----Original Message----- > From: Derek Anderson <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Date: Wed, 04 Aug 2004 08:51:06 -0500 > Subject: Generating XML from JDBC connection > > Hey everyone, > > I'm trying to generate a schema off our existing oracle database using the > torque generator. The jdbc build target is completing successfully, yet the > schema file is woefully incomplete. Does anyone have a suggestion? > > Here is the ant output: > > C:\home\projects\EMS.torque\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 : oracle.jdbc.driver.OracleDriver > [torque-jdbc-transform] URL : jdbc:oracle:thin:@192.server.ip.1:1601:EMS920 > [torque-jdbc-transform] user : ems > [torque-jdbc-transform] schema : EMS920 > [torque-jdbc-transform] DB driver sucessfuly instantiated > [torque-jdbc-transform] DB connection established > [torque-jdbc-transform] Getting table list... > [torque-jdbc-transform] Building column/table map... > [torque-jdbc-transform] ./schema/schema.xml > [torque-jdbc-transform] Torque - JDBCToXMLSchema finished > > BUILD SUCCESSFUL > Total time: 2 seconds > > > And the resulting schema.xml: > > C:\home\projects\EMS.torque\torque-gen-3.1>cat schema\schema.xml > <?xml version="1.0"?> > <!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database_3_1.dtd"> > <!-- Autogenerated by JDBCToXMLSchema! --> > <database/> > > > Thanks, > -- > -- ----------------------------------------------- -- > ~ ____ ___ ___ Derek C. Anderson ~ > ~ | _ | _ \| __| Computer Scientist / Tech Lead ~ > ~ | | || __/|| Computer Sciences Corporation ~ > ~ | |_|| \ ||_-- http://kered.org/professional ~ > ~ (_)___|_|_\|___/ [EMAIL PROTECTED] ~ > -- ----------------------------------------------- -- > > > --------------------------------------------------------------------- > 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] > > >
