db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wei He <...@ldeo.columbia.edu>
Subject Re: Error in Torque Generated Java Code
Date Tue, 13 May 2003 00:00:28 GMT

Hi Eric,

I had the same problem today. Now I have solved the problem with some 
in several places.  The short storay is that the version of maven torque 
plugin in maven
must be consistent and make sure that the torque version in project.xml 
files in consistent
with the maven-torque-plugin and its jar.  I did just what I wanted to 
do. I hope this is of
some help.

Here is the long story. I did a clean build from CVS HEAD from maven 
(B10-SNAPSHOT) this morning.
I also built a version of TORQUE from cvs -r TORQUE_3_0_BRANCH. And then 
the maven plugin. After that, I co the TURBINE-2 HEAD, and I had the 
same problems as you did.

It turned out that there was a maven-torque-plugin-3.1 already built 
during building maven
from bootstrap.  And the maven plugin I built out of torque has mixed 
version.  The version number on torque itself is 3.0.1-dev, and the 
maven plugin of the torque was also versioned 3.0.1-dev, but in its 
project.xml (in src/maven-plugin) depends on torque 3.0. So it 
downloaded and installed torque-3.0.jar in the repository. I did not 
find the torque-3.0.1-dev.jar I built in the repository at all.  And 
yet, Turbine Head depends on another version of Torque (I do not remeber 

Since I want to use torque-3.0.1-dev I just built, I did some clean-up:

rm ${MAVEN_HOME}/plugins/maven-torque-plugin-3.1.jar
rm ${MAVEN_HOME}/repository/maven/jars/maven-torque-plugin-3.1.jar
rm ${MAVEN_HOME}/repository/torque/jars/*

I modified the dependency in project.xml in db-torque/src/maven-plugin 
from 3.0 to 3.0.1-dev.  And reinstalled torque plugin. Since there is no 
torque-3.0.1-dev on the remote
repo, I had to manually copy the jar I just built to 

I then changed the torque dependency in project.xml in jakarta-turbine-2 
to 3.0.1-dev as well.

 > cd jakarta-turbine-2
 > maven

After several minutes of compiling and testing, I got these in the 
target directory:

drwxr-xr-x    6 wei      seisres      4096 May 12 18:42 .
drwxr-xr-x   12 wei      seisres      4096 May 12 18:42 ..
drwxr-xr-x    3 wei      seisres      4096 May 12 18:39 classes
-rw-r--r--    1 wei      seisres      2014 May 12 18:37 scheduler-schema.xml
drwxr-xr-x    3 wei      seisres      4096 May 12 18:38 src
drwxr-xr-x    3 wei      seisres      4096 May 12 18:39 test-classes
drwxr-xr-x    2 wei      seisres      4096 May 12 18:42 test-reports
-rw-r--r--    1 wei      seisres      4328 May 12 18:38 
-rw-r--r--    1 wei      seisres    744967 May 12 18:42 turbine-2.3-dev.jar

I had MEVEN-B9 worked by rebuilding torque 3.0.1-dev in the past without 
the above problems.   I think the maven-torque-plugin-3.1 might just 
work as well in a similar way.

It took a good part of the day,  I do not think I will play this game again.



EPugh@upstate.com wrote:

>Not sure what error you are getting, but I am attempting to build Turbine
>CVS head with Maven CVS Head.   I found one issue that I fixed by passing in
>the basePrefix as a variable in the plugin.  Otherwise my Base* objects came
>out at $basePrefixMyObject.
>Now however, the new save(javax.sql.Connection) method is not being created
>in the generated code.  I get errors like this:
>om.TurbineUserGroupRole should be declared abstract; it does not define
>a.sql.Connection) in org.apache.torque.om.BaseObject
>public  class TurbineUserGroupRole
>        ^
>Even though the jar has an Object.vm that supposedly deines the method!  Is
>this what you are getting?
>Eric Pugh
>-----Original Message-----
>From: Eric Emminger [mailto:eric@ericemminger.com]
>Sent: Monday, May 12, 2003 5:46 PM
>To: Turbine Torque Users List
>Cc: rafimf@yahoo.com.au
>Subject: Re: Error in Torque Generated Java Code
>The attachment didn't work. Could you send it inline or try again?
>Rafi Mohamed wrote:
>>This is my first email. Apologies if I have sent this
>>email to the wrong list. If so, please let me know the
>>right Email ID to send to.
>>Problem Description :
>>I generated java code for a mysql schema (which was 
>>generated by the ANT JDBC task from a mysql database).
>>I decided to compile the generated code without
>>modification using 'ant compile' and got a few errors.
>>I have attached to this email. Could someone help.
>>Rafi Mohamed.
>>http://mobile.yahoo.com.au - Yahoo! Mobile
>>- Check & compose your email via SMS on your Telstra or Vodafone mobile.
>>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

View raw message