Discussion:
[Middlegen-user] Re: Oracle problems
Adrian Hallam
2002-10-01 03:19:02 UTC
Permalink
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
Aslak Hellesøy
2002-10-01 05:18:02 UTC
Permalink
Thanks Adrian.

This schema stuff has been bogging us for a while. We'll throw in your patch
ASAP. If you have more patches, please post them at SF. That way there is no
risk that they get lost in our swamped mailboxes.

http://sourceforge.net/tracker/?group_id=36044

Cheers,
Aslak
-----Original Message-----
Hallam
Sent: 1. oktober 2002 07:18
Subject: [Middlegen-user] Re: Oracle problems
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
"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
schema="${database.schema}"
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();
").append(_schema).append("\n");
").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
-------------------------------------------------------
This sf.net email is sponsored by: DEDICATED SERVERS only $89!
Linux or FreeBSD, FREE setup, FAST network. Get your own server
today at http://www.ServePath.com/indexfm.htm
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Loading...