You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Damien SAUVAGEOT <ds...@omnikles.com> on 2004/03/05 14:34:00 UTC

sql2xml postgresql

Hi,

I'd like to generate the XML schema file from the .sql or jdbc connection to a postgresql database. 
When I try the jdbc torque action, I get an empty database :
see at the bottom.

When I try the sql2xml torque action, I get nothing and the action does not end. The cpu is at 100%. 
I get nothing except :
log4j:ERROR Could not find value for key log4j.appender.org.apache.torque.engine
log4j:ERROR Could not instantiate appender named "org.apache.torque.engine".


So my torque logs are also not working. They are working inside of tomcat but not using ant or maven
to run torque ant target. 
I tried to configure log4j.properties in different places but nothing worked. Does somebody has an easy configuration solution to get the logs working?

I'd like to get the xml schema, but due to all of these problems, I don't find any workaround, just to get that file.

Thanks for your help,
Damien



-------------
-  JDBC     -
-------------


<?xml version="1.0"?>
<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database_3_1.dtd">
<!-- Autogenerated by JDBCToXMLSchema! -->
<database/>


Buildfile: build.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 : org.postgresql.Driver
[torque-jdbc-transform] URL : jdbc:postgresql://postgresql.oks/customertest
[torque-jdbc-transform] user : pemp
[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] Building column/table map...
[torque-jdbc-transform] ./schema/schema.xml
[torque-jdbc-transform] Torque - JDBCToXMLSchema finished

BUILD SUCCESSFUL
Total time: 2 seconds


---------------
-  sql2xml    -
---------------
[DEBUG] Adding reference: maven-classpath ->
[DEBUG] Adding reference: maven.compile.src.set ->
[DEBUG] Adding reference: maven.test.compile.src.set ->
torque:init:
[DEBUG] Adding reference: torque-classpath ->
    [property] [VERBOSE] Loading C:\ProgramFiles\Maven 1.0-rc1\plugins\maven-torque-plugin-3.2-SNAPSHOT\plugin.properties
    [property] [VERBOSE] Unable to find property file: C:\ProgramFiles\Maven 1.0-rc1\plugins\maven-torque-plugin-3.2-SNAPSHOT\plug
in.properties
    [taskdef] [DEBUG] Class org.apache.torque.task.TorqueDataModelTask loaded from parent loader
    [taskdef] [DEBUG]  +User task: torque-data-model     org.apache.torque.task.TorqueDataModelTask
    [taskdef] [DEBUG] Class org.apache.torque.task.TorqueDataDumpTask loaded from parent loader
    [taskdef] [DEBUG]  +User task: torque-data-dump     org.apache.torque.task.TorqueDataDumpTask
    [taskdef] [DEBUG] Class org.apache.torque.task.TorqueDataSQLTask loaded from parent loader
    [taskdef] [DEBUG]  +User task: torque-data-sql     org.apache.torque.task.TorqueDataSQLTask
    [taskdef] [DEBUG] Class org.apache.torque.task.TorqueDocumentationTask loaded from parent loader
    [taskdef] [DEBUG]  +User task: torque-doc     org.apache.torque.task.TorqueDocumentationTask
    [taskdef] [DEBUG] Class org.apache.torque.task.TorqueJDBCTransformTask loaded from parent loader
    [taskdef] [DEBUG]  +User task: torque-jdbc-transform     org.apache.torque.task.TorqueJDBCTransformTask
    [taskdef] [DEBUG] Class org.apache.torque.task.PackageAsPathTask loaded from parent loader
    [taskdef] [DEBUG]  +User task: torque-package-to-path     org.apache.torque.task.PackageAsPathTask
    [taskdef] [DEBUG] Class org.apache.torque.task.TorqueSQLTask loaded from parent loader
    [taskdef] [DEBUG]  +User task: torque-sql     org.apache.torque.task.TorqueSQLTask
    [taskdef] [DEBUG] Class org.apache.torque.task.TorqueSQLExec loaded from parent loader
    [taskdef] [DEBUG]  +User task: torque-sql-exec     org.apache.torque.task.TorqueSQLExec
    [taskdef] [DEBUG] Class org.apache.torque.task.TorqueSQLTransformTask loaded from parent loader
    [taskdef] [DEBUG]  +User task: torque-sql-transform     org.apache.torque.task.TorqueSQLTransformTask

torque:sql2xml:
    [torque-sql-transform] Parsing SQL Schema
log4j:ERROR Could not find value for key log4j.appender.org.apache.torque.engine
log4j:ERROR Could not instantiate appender named "org.apache.torque.engine".

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Re: sql2xml postgresql

Posted by Andras Balogh <an...@reea.net>.
    Hello,

I think at jdbc target the problem is the schema:

"[torque-jdbc-transform] schema : ${databaseSchema}"

You should specify in build.properties:
torque.database.schema =
but i don't know what this vaules should be for postgres maybe the owner
of the tables?
 (i.e. the username who created them)

Hope it helps,
Andras.






---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org