I have a similar problem. I wrote a sql file, and used it to generate the tables in the PostgreSQL database. And now I want to generate a project-schema.xml with the exiting .sql file, but it failed.
In the build-torque.xml I have the following code:
<target name="sql2xml" description="==> creates an xml schema from an sql schema">
<torque-sql-transform
inputFile="${torque.schema.dir}/schema.sql"
outputFile="${torque.schema.dir}/schema.xml"
/>
</target>and I tried ant -f build-torque.xml sql2xml , but there was alway a problem:
C:\SEP\gogol\components\cnt>ant -f build-torque.xml sql2xml Buildfile: build-torque.xml
sql2xml:
[torque-sql-transform] Parsing SQL Schema
[torque-sql-transform] log4j:ERROR Could not find value for key log4j.appender.o
rg.apache.torque.engine
[torque-sql-transform] log4j:ERROR Could not instantiate appender named "org.apa
che.torque.engine".
After that the programm stopped. What is wrong here?
Thanks!
Guo
And good day to you. :)
"- jdbc generates an XML schema of an existing database from JDBC metadata" -- From: http://db.apache.org/torque/generator/index.html
It's relatively easy to do but not very documented. A sample usage is show in: http://www.mail-archive.com/[EMAIL PROTECTED]/msg01293.html.
This question really belongs in the torque-user mailing list but hopefully the info above is sufficient to get you going.
Cheers,
David.
On Tue, 2004-03-02 at 11:19, Juan Uys wrote:
Good day,
I would like to know if one can create an XXX-schema.xml from an existing DB? I couldn't find anything - I just scanned all the docs.
I would like to help develop such a feature. It would use the standard JDBC API (ResultSetMetaData, etc). The utility would create the bulk of the XXX-schema.xml file, and surely the user must go afterwards and edit the necessary bits.
Let me know if you have any ideas/guidelines.
Thanks,
Juan
--------------------------------------------------------------------- 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]
