db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vikas Phonsa <VPho...@suz.com>
Subject RE: Can't generate Java Source
Date Fri, 14 Nov 2003 17:30:20 GMT
Charles,
Thanks for your reply.


--You have to use "compile":
---ant -f build-torque.xml

That's exactly what I did and I get a "BUILD SUCCESFULL" message from ant
too. But no java code is generated.

--The class are in TORQUE_GEN$/bin/


All the tutorials and articles that I found abt torque say that there
Should be some java class code generated after the above step in the
Src\java directory under the the torque installation dir.

So I can't figure out what to do. I'm enclosing my database schema also if
that can help in finding out the problem.

I can generated the sql stuff and also use that to generate my database and
tables but no java source code is generated.

Here is the schema and I'm using mysql database


-----------------------------


<?xml version="1.0" encoding="ISO-8859-1" standalone="no" ?>
<!DOCTYPE database SYSTEM 
          "http://jakarta.apache.org/turbine/dtd/database_3_1.dtd">


<database name="pitchers" defaultIdMethod="native"> 

 <table name="PITCHER">
<column name="PITCHER_ID" required="true" autoIncrement="true"
primaryKey="true" type="INTEGER"/>
<column name="LAST_NAME" required="true" size="30" type="VARCHAR"/>
<column name="FIRST_NAME" required="true" size="30" type="VARCHAR"/>
<column name="TEAM_ID" required="true" type="INTEGER"/>
<foreign-key foreignTable="TEAM">
<reference local="TEAM_ID" foreign="TEAM_ID"/>
</foreign-key>
</table>

  <table name="TEAM" idMethod="none">
<column name="TEAM_ID" required="true" primaryKey="true"
        type="INTEGER"/>
<column name="TEAM_NAME" required="true" size="30" type="VARCHAR"/>
</table>



<table name="GAME" idMethod="none">
<column name="PITCHER_ID" required="true" type="INTEGER"/>
<column name="PLAYING_FOR" required="true" type="INTEGER"/>
<column name="AGAINST_TEAM" required="true" type="INTEGER"/>
<column name="OUTS_RECORDED" required="true" type="INTEGER"/>
<column name="HITS" type="INTEGER"/>
<column name="RUNS" type="INTEGER"/>
<column name="WALKS" type="INTEGER"/>
<column name="STRIKE_OUTS" type="INTEGER"/>
<foreign-key foreignTable="PITCHER">
<reference local="PITCHER_ID" foreign="PITCHER_ID"/>
</foreign-key>
<foreign-key foreignTable="TEAM">
<reference local="PLAYING_FOR" foreign="TEAM_ID"/>
</foreign-key>
<foreign-key foreignTable="TEAM">
<reference local="AGAINST_TEAM" foreign="TEAM_ID"/>
</foreign-key>
</table>



</database>


-------------------------------------------------------------





-----Original Message-----
From: Charles-Alexandre Sabourdin [mailto:kaneda@dedaletechnology.com] 
Sent: Thursday, November 13, 2003 11:38 PM
To: torque-user@db.apache.org
Subject: Re: Can't generate Java Source

Le Jeudi 13 Novembre 2003 23:33, Vikas Phonsa a écrit :
> Hi,
>
> I am able to run ant -f build-torque.xml
> And it says "BUILD SUCCESSFUL'
>
> It generates the stuff in the sql folder. But it doesn't generate any java
> source in the java folder under src. Under the java folder I only get an
> empty file name report.pitchers.om.generation.
>
> Also I'm able to create my mysql database by running ant -f
> build-torque.xml create-db.
>
> But I can't get the java classes in src\java .
> Any ideas ?
You have to use "compile":
ant -f build-torque.xml

The class are in TORQUE_GEN$/bin/

I personnaly use this script : (it separate every steps)

#!/bin/sh
#
# scripte de création des fichier
# sql, source, et classes à partie des
# Ficher *-schema.xml dans ./schema
#
#
echo "le fichier build.properties est bien configurer ?"&&
sleep 2 &&
echo "demarrage"&&
rm -rf scr/* &&
echo "create-db" &&
ant -f build-torque.xml create-db &&
echo "pause ctr-c pour arreter" &&
sleep 5 &&
echo "sql" &&
ant -f build-torque.xml sql &&
echo "pause ctr-c pour arreter" &&
sleep 5 &&
echo "id-table-init-sql" &&
ant -f build-torque.xml id-table-init-sql &&
echo "pause ctr-c pour arreter" &&
sleep 5 &&
echo "insert-sql" &&
ant -f build-torque.xml insert-sql &&
echo "pause ctr-c pour arreter" &&
sleep 5 &&
echo "om" &&
ant -f build-torque.xml om &&
echo "pause ctr-c pour arreter" &&
sleep 5 &&
echo "compile" &&
ant -f build-torque.xml compile;


-- 
Charles-Alexandre
SABOURDIN
-----------------


---------------------------------------------------------------------
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