Adrian Hallam
2002-10-01 03:19:02 UTC
Hello,
I noticed someone mentioned that had difficulty seeing
the tables in their Oracle database (Middlegen with
Oracle 9i). I also had this trouble as I was getting
the error message:
"Middlegen successfully connected to the database, but
couldn't find any tables. Perhaps the specified schema
or catalog is wrong? -Or maybe there aren't any tables
in the database at all?"
If you are using the sample and modifying the values
for your project you need to go to line 138 of the
build.xml file. This line should look like:
schema="${database.schema}"
In the release it is:
schema=""
so the schema information is never passed through to
the application. I presume this will also cause some
problems with people on different databases as well...
As another note to the developers. I think it would be
handy to add some information to the error message
supplied. If the following code is added to
MiddlegenPopulator.java then more information will be
given for the user to diagnose what is going on
quicker.
This code would go into the exception handler at the
bottom of the addRegularTableElements function.
===
StringBuffer sb = new StringBuffer();
ResultSet schemaRs = getMetaData().getSchemas();
sb.append("Configured schema:
").append(_schema).append("\n");
sb.append("Configured catalog:
").append(_catalog).append("\n");
sb.append("Available Schemas:\n");
while (schemaRs.next()) {
sb.append(schemaRs.getString(1)).append("\n");
}
sb.append("Available Catalogs\n");
ResultSet catalogRs = getMetaData().getCatalogs();
while (catalogRs.next()) {
sb.append(catalogRs.getString(1)).append("\n");
}
// Then add sb.toString() to the MiddlegenException
===
And a final note to the developers: this is a great
project!
cheers,
Adrian
http://mobile.yahoo.com.au - Yahoo! Messenger for SMS
- Always be connected to your Messenger Friends
I noticed someone mentioned that had difficulty seeing
the tables in their Oracle database (Middlegen with
Oracle 9i). I also had this trouble as I was getting
the error message:
"Middlegen successfully connected to the database, but
couldn't find any tables. Perhaps the specified schema
or catalog is wrong? -Or maybe there aren't any tables
in the database at all?"
If you are using the sample and modifying the values
for your project you need to go to line 138 of the
build.xml file. This line should look like:
schema="${database.schema}"
In the release it is:
schema=""
so the schema information is never passed through to
the application. I presume this will also cause some
problems with people on different databases as well...
As another note to the developers. I think it would be
handy to add some information to the error message
supplied. If the following code is added to
MiddlegenPopulator.java then more information will be
given for the user to diagnose what is going on
quicker.
This code would go into the exception handler at the
bottom of the addRegularTableElements function.
===
StringBuffer sb = new StringBuffer();
ResultSet schemaRs = getMetaData().getSchemas();
sb.append("Configured schema:
").append(_schema).append("\n");
sb.append("Configured catalog:
").append(_catalog).append("\n");
sb.append("Available Schemas:\n");
while (schemaRs.next()) {
sb.append(schemaRs.getString(1)).append("\n");
}
sb.append("Available Catalogs\n");
ResultSet catalogRs = getMetaData().getCatalogs();
while (catalogRs.next()) {
sb.append(catalogRs.getString(1)).append("\n");
}
// Then add sb.toString() to the MiddlegenException
===
And a final note to the developers: this is a great
project!
cheers,
Adrian
http://mobile.yahoo.com.au - Yahoo! Messenger for SMS
- Always be connected to your Messenger Friends