Discussion:
[Middlegen-user] newbie getting 404's, 740's and 256's
Ray Tayek
2004-03-19 18:44:08 UTC
Permalink
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
correctly implements DatabaseMetaData.
[middlegen] Updated preferences in
/Z/Users/ray/projects/mg1/middlegen-2.0-vo/samples/src/geo_rtayek-prefs.prop
erties
Eivind Waaler
2004-03-22 06:26:03 UTC
Permalink
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
Post by Ray Tayek
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?).
/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
/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.
/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
Ray Tayek
2004-03-22 20:47:07 UTC
Permalink
-----Original Message-----
Of Eivind Waaler
Sent: Monday, March 22, 2004 12:25 AM
Subject: Re: [Middlegen-user] newbie getting 404's, 740's and 256's
... You get the first because of tables with no primary key.
Yes, it's a legacy database.
This is a problem, as a cmp must have one..
Not sure what cmp means (component or container managed persistence).
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"/>
ok, will do if needed.
The second is because you don't have relationships in your
db.
Right. We will have to add these by hand.
You can still generate the code, but everything will be
standalone classes without relationships.
Yes, but having the code and .hbm.xml to start with for free is still
wonderful.
I'd recommend upgrading your db to one that has foreign keys,
that's when you really see the beauty of Middlegen :-)
it's all legacy for now, but that will be something to look forward to.
To turn on logging, just make sure log4j.properties is in
your classpath when you run Middlegen.
got the logging working!

thanks for your assistance.
Hi, newbie to db's, naict, getting a bunch of 404's ...
is this ok? Are the 740's and 256's just the sort of normal stuff..
... does not support foreighn keys).
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] (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. ...
Loading...