Re: newbie getting 404's, 740's and 256's
Eivind Waaler <[email protected]>
| Newsgroups | gmane.comp.java.ejb.middlegen.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, You get the first because of tables with no primary key. This is a problem, as a cmp must have one.. If you use the latest cvs version you can specify a primary key with the "pkcolumnsoverride" attribute on the <table> elements: <table name="foo" pkcolumnsoverride="aa,bb"/> The second is because you don't have relationships in your db. You can still generate the code, but everything will be standalone classes without relationships. I'd recommend upgrading your db to one that has foreign keys, that's when you really see the beauty of Middlegen :-) To turn on logging, just make sure log4j.properties is in your classpath when you run Middlegen. .eivind On Fri, 19 Mar 2004, Ray Tayek wrote: > Hi, newbie to db's, naict, getting a bunch of 404's for almost all tables in > 3 reversed db's (please see the middlegen logs below). is this ok? Are the > 740's and 256's just the sort of normal stuff one finds in peoples db's? > (this is using a version of mysql that does not support foreighn keys). The > 404's don't show up here when I run from ant on the command line. But they > do show up when running ant from eclipse (eclispse must be turning on some > loging somehow, does anyone know how to turn this on when ant is run from > the command line?). > > > > > > middlegen: > [mkdir] Created dir: > /Z/Users/ray/projects/mg1/middlegen-2.0-vo/samples/build/gen-src > [middlegen] Database URL:jdbc:mysql://204.1.213.186/po_db > [middlegen] No <table> elements specified. Reading all tables. This might > take a while... > [middlegen] (middlegen.MiddlegenPopulator 740 ) WARNING: The JDBC > driver didn't report any primary key columns in po_item_shipped > [middlegen] (middlegen.MiddlegenPopulator 256 ) WARNING: Middlegen > couldn't find any relations between any tables. This may be intentional from > the design of the database, but it may also be because you have incorrectly > defined the relationships. It could also be because the JDBC driver you're > using doesn't correctly implement DatabaseMetaData. See the samples (for an > example on how to define relationships) and verify that your driver > correctly implements DatabaseMetaData. > [middlegen] Updated preferences in > /Z/Users/ray/projects/mg1/middlegen-2.0-vo/samples/src/po_db-prefs.propertie > s > > middlegen: > [mkdir] Created dir: > /Z/Users/ray/projects/mg1/middlegen-2.0-vo/samples/build/gen-src > [middlegen] Database URL:jdbc:mysql://204.1.213.186/menlo_rtayek > [middlegen] No <table> elements specified. Reading all tables. This might > take a while... > [middlegen] (middlegen.MiddlegenPopulator 740 ) WARNING: The JDBC > driver didn't report any primary key columns in has_permission > [middlegen] (middlegen.MiddlegenPopulator 740 ) WARNING: The JDBC > driver didn't report any primary key columns in location_type > [middlegen] (middlegen.MiddlegenPopulator 740 ) WARNING: The JDBC > driver didn't report any primary key columns in _charge_basis > [middlegen] (middlegen.MiddlegenPopulator 740 ) WARNING: The JDBC > driver didn't report any primary key columns in XTranslate > [middlegen] (middlegen.MiddlegenPopulator 740 ) WARNING: The JDBC > driver didn't report any primary key columns in _location_type > [middlegen] (middlegen.MiddlegenPopulator 256 ) WARNING: Middlegen > couldn't find any relations between any tables. This may be intentional from > the design of the database, but it may also be because you have incorrectly > defined the relationships. It could also be because the JDBC driver you're > using doesn't correctly implement DatabaseMetaData. See the samples (for an > example on how to define relationships) and verify that your driver > correctly implements DatabaseMetaData. > > middlegen: > [mkdir] Created dir: > /Z/Users/ray/projects/mg1/middlegen-2.0-vo/samples/build/gen-src > [middlegen] Database URL:jdbc:mysql://204.1.213.186/geo_rtayek > [middlegen] No <table> elements specified. Reading all tables. This might > take a while... > [middlegen] (middlegen.MiddlegenPopulator 740 ) WARNING: The JDBC > driver didn't report any primary key columns in has_permission > [middlegen] (middlegen.MiddlegenPopulator 740 ) WARNING: The JDBC > driver didn't report any primary key columns in is_preferred_carrier_of > [middlegen] (middlegen.MiddlegenPopulator 256 ) WARNING: Middlegen > couldn't find any relations between any tables. This may be intentional from > the design of the database, but it may also be because you have incorrectly > defined the relationships. It could also be because the JDBC driver you're > using doesn't correctly implement DatabaseMetaData. See the samples (for an > example on how to define relationships) and verify that your driver > c ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click