Discussion:
unknown
1970-01-01 00:00:00 UTC
Permalink
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_000_002F_01C2E7EC.FF087E40
Content-Type: text/html;
charset="iso-8859-1"
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=iso-8859-1">
<META content="MSHTML 6.00.2723.2500" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hello all:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I have seen my question posted earlier in the
archive, but I cannot seem to resolve this issue.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>

Loading...