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 Jim O'Quinn <oq...@dev-null.com> on 2002/12/19 19:53:11 UTC
ant -f build-torque.xml om
I'm so close! I'm trying to generate my class files from the database,
but I seem to be missing something. When I run 'ant -f build-torque.xml
*om*' it grinds away for a few seconds then generates a zero lengh
'.om.generation' file.
I have a build.properties file in my directory and it seems to find some
properties.
The velocity.log file says: [error] RHS of #set statement is null.
Context will not be modified. om/Control.vm [line 4, column 1]
The line in om/Control.vm is #set ( $dbprops =
$properties.load("sql/base/$targetDatabase/db.props") )
The db.props file is in 'templates/base/postgresql'.
Any idea what is missing or what I'm doing wrong?
Thanks,
Jim
[oquinn@chato torque-3.0]$ ant -f build-torque.xml om
Buildfile: build-torque.xml
check-use-classpath:
check-run-only-on-schema-change:
om-check:
om:
[echo] +------------------------------------------+
[echo] | |
[echo] | Generating Peer-based Object Model for |
[echo] | YOUR Torque project! Woo hoo! |
[echo] | |
[echo] +------------------------------------------+
om-classpath:
om-template:
[torque-data-model] Using contextProperties file:
/home/oquinn/cns/java/torque-3.0/build.properties
[torque-data-model] *Cannot get default properties!*
[torque-data-model] Generating to file
/home/oquinn/cns/java/torque-3.0/src/java/report.cns_test.om.generation
BUILD SUCCESSFUL
Total time: 8 seconds
Re: ant -f build-torque.xml om
Posted by Jim O'Quinn <oq...@dev-null.com>.
Thanks! That did it. I must have missed that little detail somewhere.
Thanks!
Jim
>If you have an existing db, and don't have a project schema file
>in the schema folder, firt run 'ant -f build-torque.xml jdbc'.
>Make sure that build.properties has db connection set up correctly.
>This will create a schema file for your db. Rename it to
>'projectname'-schema.xml, then run 'ant -f build-torque.xml om'.
>This time make sure that db connection properties in
>Torque.properties are configured correctly.
>
>You also can edit build-torque.xml to get the file name right.
>I wonder if this can be done in CVS so people don't have to
>do this.
>
>Ev
>
>----- Original Message -----
>From: "Jim O'Quinn" <oq...@dev-null.com>
>To: <tu...@jakarta.apache.org>
>Sent: Thursday, December 19, 2002 12:53 PM
>Subject: ant -f build-torque.xml om
>
>
>
>
>>I'm so close! I'm trying to generate my class files from the database,
>>but I seem to be missing something. When I run 'ant -f build-torque.xml
>>*om*' it grinds away for a few seconds then generates a zero lengh
>>'.om.generation' file.
>>
>>I have a build.properties file in my directory and it seems to find some
>>properties.
>>
>>The velocity.log file says: [error] RHS of #set statement is null.
>>Context will not be modified. om/Control.vm [line 4, column 1]
>>
>>The line in om/Control.vm is #set ( $dbprops =
>>$properties.load("sql/base/$targetDatabase/db.props") )
>>
>>The db.props file is in 'templates/base/postgresql'.
>>
>>Any idea what is missing or what I'm doing wrong?
>>
>>Thanks,
>>
>>Jim
>>
>>
>>[oquinn@chato torque-3.0]$ ant -f build-torque.xml om
>>Buildfile: build-torque.xml
>>
>>check-use-classpath:
>>
>>check-run-only-on-schema-change:
>>
>>om-check:
>>
>>om:
>> [echo] +------------------------------------------+
>> [echo] | |
>> [echo] | Generating Peer-based Object Model for |
>> [echo] | YOUR Torque project! Woo hoo! |
>> [echo] | |
>> [echo] +------------------------------------------+
>>
>>om-classpath:
>>
>>om-template:
>>[torque-data-model] Using contextProperties file:
>>/home/oquinn/cns/java/torque-3.0/build.properties
>>[torque-data-model] *Cannot get default properties!*
>>[torque-data-model] Generating to file
>>/home/oquinn/cns/java/torque-3.0/src/java/report.cns_test.om.generation
>>
>>BUILD SUCCESSFUL
>>Total time: 8 seconds
>>
>>
>>
>>
>
>--
>To unsubscribe, e-mail: <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>
>
>
Re: ant -f build-torque.xml om
Posted by Evguenia Krylova <ev...@doit.wisc.edu>.
If you have an existing db, and don't have a project schema file
in the schema folder, firt run 'ant -f build-torque.xml jdbc'.
Make sure that build.properties has db connection set up correctly.
This will create a schema file for your db. Rename it to
'projectname'-schema.xml, then run 'ant -f build-torque.xml om'.
This time make sure that db connection properties in
Torque.properties are configured correctly.
You also can edit build-torque.xml to get the file name right.
I wonder if this can be done in CVS so people don't have to
do this.
Ev
----- Original Message -----
From: "Jim O'Quinn" <oq...@dev-null.com>
To: <tu...@jakarta.apache.org>
Sent: Thursday, December 19, 2002 12:53 PM
Subject: ant -f build-torque.xml om
> I'm so close! I'm trying to generate my class files from the database,
> but I seem to be missing something. When I run 'ant -f build-torque.xml
> *om*' it grinds away for a few seconds then generates a zero lengh
> '.om.generation' file.
>
> I have a build.properties file in my directory and it seems to find some
> properties.
>
> The velocity.log file says: [error] RHS of #set statement is null.
> Context will not be modified. om/Control.vm [line 4, column 1]
>
> The line in om/Control.vm is #set ( $dbprops =
> $properties.load("sql/base/$targetDatabase/db.props") )
>
> The db.props file is in 'templates/base/postgresql'.
>
> Any idea what is missing or what I'm doing wrong?
>
> Thanks,
>
> Jim
>
>
> [oquinn@chato torque-3.0]$ ant -f build-torque.xml om
> Buildfile: build-torque.xml
>
> check-use-classpath:
>
> check-run-only-on-schema-change:
>
> om-check:
>
> om:
> [echo] +------------------------------------------+
> [echo] | |
> [echo] | Generating Peer-based Object Model for |
> [echo] | YOUR Torque project! Woo hoo! |
> [echo] | |
> [echo] +------------------------------------------+
>
> om-classpath:
>
> om-template:
> [torque-data-model] Using contextProperties file:
> /home/oquinn/cns/java/torque-3.0/build.properties
> [torque-data-model] *Cannot get default properties!*
> [torque-data-model] Generating to file
> /home/oquinn/cns/java/torque-3.0/src/java/report.cns_test.om.generation
>
> BUILD SUCCESSFUL
> Total time: 8 seconds
>
>