Discussion:
unknown
1970-01-01 00:00:00 UTC
Permalink
I run ant hsqldb-gui. I connect to database airlines on my mysql server.
3 tables with persons populated.

I run ant.

There is a warning suggesting I set fkcmp to false (as suggested in
the mail archives)

Ignoring this fkcmp suggestion, I press Generate.

When generate un-greys, I close the gui tool.

There is much activity as xdoclets runs...Build successful

Try to deploy the airlines.ear...I get documented "SQL Error
Duplicate Column name."



So...

I go back to the build.xml, set fkcmp="false"

run ant. There are several warnings as follows:



[middlegen] (entitybean.CMP20Plugin ? ) WARNING: When
fkcmp="fals
e", you will not be able to use compound primary keys where some of the
columns
are also foreign keys. This is because all columns of a primary key must
be CMP
fields. See EJB 2.0. spec section 10.8.2
[middlegen] No <table> elements specified. Reading all tables. This
might take a
while...
[middlegen] (entitybean.Server ? ) WARNING (cmp20):
The tabl
e reservations has a primary key where the following columns also are
foreign ke
ys: person_id_fk,flight_id_fk. Having set fkcmp="false" this will most
likely ca
use problems at run time because those columns will not be persisted,
and theref
ore new instances will not set the key fields that correspond to foreign
keys. T
he database might choke on this.
[middlegen] (entitybean.Server ? ) WARNING (cmp20):
The tabl
e reservations has a primary key where the following columns also are
foreign ke
ys: person_id_fk,flight_id_fk. Having set fkcmp="false" this will most
likely ca
use problems at run time because those columns will not be persisted,
and theref
ore new instances will not set the key fields that correspond to foreign
keys. T
he database might choke on this.
[middlegen] (entitybean.Entity20Column ? ) WARNING: The
cmp20 is con
figured with readonly="true", but the prefs settings for the column
reservations
.flight_id_fk indicates that a local setter for this column should be
generated.
Middlegen will use the prefs setting, so the generated
airline.interfaces.Reser
vationLocal's setFlightIdFk method will exist, causing the bean NOT to
be read o
nly.
[middlegen] (entitybean.Entity20Column ? ) WARNING: The
cmp20 is con

figured with readonly="true", but the prefs settings for the column
reservations
.reservation_id indicates that a local setter for this column should be
generate
d. Middlegen will use the prefs setting, so the generated
airline.interfaces.Res
ervationLocal's setReservationId method will exist, causing the bean NOT
to be r
ead only.
[middlegen] (entitybean.Entity20Column ? ) WARNING: The
cmp20 is con
figured with readonly="true", but the prefs settings for the column
reservations
.person_id_fk indicates that a local setter for this column should be
generated.
Middlegen will use the prefs setting, so the generated
airline.interfaces.Reser
vationLocal's setPersonIdFk method will exist, causing the bean NOT to
be read o
nly.
[middlegen] ********************************************************
[middlegen] * CTRL-Click relations to modify their cardinality *
[middlegen] * SHIFT-Click relations to modify their directionality *
[middlegen] ********************************************************



Again press generate.



Now I get Build FAILURE with the following javac errors:



compile-web:
[javac] Compiling 28 source files to
C:\DEVELO~1\MIDDLE~1\samples\build\clas
ses
[javac]
C:\DEVELO~1\MIDDLE~1\samples\build\gen-src\airline\web\struts\Delete
ReservationAction.java:62: cannot resolve symbol
[javac] symbol : constructor ReservationPK
(java.lang.Integer,java.lang.Int
eger,java.lang.Integer)
[javac] location: class airline.interfaces.ReservationPK
[javac] airline.interfaces.ReservationPK reservation_PK = new
airline.
interfaces.ReservationPK(reservationId, personIdFk, flightIdFk);
[javac] ^
[javac]
C:\DEVELO~1\MIDDLE~1\samples\build\gen-src\airline\web\struts\EditRe
servationAction.java:65: cannot resolve symbol
[javac] symbol : constructor ReservationPK
(java.lang.Integer,java.lang.Int
eger,java.lang.Integer)
[javac] location: class airline.interfaces.ReservationPK
[javac] airline.interfaces.ReservationPK reservation_PK = new
airline.
interfaces.ReservationPK(reservationId, personIdFk, flightIdFk);
[javac] ^
[javac]
C:\DEVELO~1\MIDDLE~1\samples\build\gen-src\airline\web\struts\Reserv
ationForm.java:156: cannot resolve symbol
[javac] symbol : method getPersonIdFk ()
[javac] location: interface airline.interfaces.ReservationLocal
[javac] setPersonIdFk(reservation.getPersonIdFk());
[javac] ^

...and so on...



I have tried "ant clean" between steps, even re-downloading from cvs
(today:2003-03-11).



Did I miss something in the instructions or the mail archive? Either I
cannot deploy or I cannot compile. Any direction would be very much
appreciated.



Steve


------_=_NextPart_001_01C2E987.EACB77A8
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">


<meta name=Generator content="Microsoft Word 10 (filtered)">

<style>
<!--
/* Font Definitions */
@font-face
{font-family:PMingLiU;
panose-1:2 2 3 0 0 0 0 0 0 0;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:"\@PMingLiU";
panose-1:2 2 3 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
p.MsoHeader, li.MsoHeader, div.MsoHeader
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
p.MsoFooter, li.MsoFooter, div.MsoFooter
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
p
{margin-right:0in;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman";}
span.EmailStyle20
{font-family:Arial;
color:navy;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>

</head>

<body bgcolor=white lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Steve,</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I had a similar problem. Try deleting airline-prefs.properties,
in samples/src before going running middlegen again. That should help.</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><br>
Y.</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'>-----Original Message-----<br>
<b><span style='font-weight:bold'>From:</span></b> Steve
[mailto:***@browsermedia.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> </span></font><font size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>Tuesday, March
11, 2003</span></font><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'> </span></font><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'>1:41 PM</span></font><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'><br>
<b><span style='font-weight:bold'>To:</span></b> </span></font><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>middlegen-***@lists.sourceforge.net</span></font><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'><br>
<b><span style='font-weight:bold'>Subject:</span></b> [Middlegen-user] Sample
App on Jboss 3.0 and MySQL</span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>&nbsp;</span></font></p>

<div>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>Hello all:</span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>&nbsp;</span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>I have seen my question posted
earlier in the archive, but I cannot seem to resolve this issue.</span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>&nbsp;</span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>Following the excellent instructions
on the website, I setup middlegen to use mysql on my local machine. I also
created a build.properties pointing jboss.home to my jboss 3.0 directory. jboss
3.0 has been configured to use mysql as its default datasource.</span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>&nbsp;</span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>

Loading...