Hi eivindw,

Thanks for the response. I ran it on debugging mode and downloaded the source and added some more debugging statements. As you suggested the issue is in MiddlegenPopulator -- in the method markFksToUnwantedTables(). Each call to DatabaseMetaData.getExportedKeys() takes over a minute. This must be some problem with internal database indexes or something, which I'll ask DBAs about. I don't think it is Oracle-specific problem though.

Also, I noticed in that method, that it loops for each table returned and gets a new DatabaseMetaData object (and opens new Connection) each time. I made it share the metadata object and I think that improved it.

And since I only listed 2 tables in the build file, why would it check for exported keys for all the tables in the schema? It seems like it should only check within those 2 tables.

Thanks,
David

On 6/27/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi David!

It's been a long time since i worked with Oracle, but there are quite a
few quirks in Middlegen to get it working. If you search for oracle in the
MiddlegenPopulator, you'll see several places where special handling is
done for Oracle:
http://middlegen.cvs.sourceforge.net/middlegen/middlegen/src/java/middlegen/MiddlegenPopulator.java?revision=1.65&view=markup

I remember several problems related to Oracle earlier. Maybe some of the
fixes put in for older Oracle versions don't apply to the latest versions?

You could also try turning on debug logging while running Middlegen.
Should produce some more output. Maybe that could help pinpoint where it's
hanging.

.eivindw

> Hi Everyone,
>
> I am a new middlegen user trying to integrate Hibernate with an existing
> database schema. When I run my MiddleTask in the buildfile it is able to
> connect to the Oracle 10g database correctly, but the GUI never appears.
> When I run against another similar database, the GUI does appear and seems
> to work properly.
>
> My first guess was that the first database (my dev environment) is just a
> lot slower than the other. However, even after 30-40 minutes of hanging
> after the connection step, it never proceeded to the next step of
> displaying
> the GUI, whereas with the other database it only took about 5 minutes.
> Both
> databases are large, with hundreds of tables, however the schema I am
> referencing in the buildfile only has about 12 tables.
>
> Does anyone know what commands Middlegen uses to gather all the metadata
> for
> oracle? Maybe there is some internal restriction in this dev database that
> is causing this process to hang... If anyone has any suggestions, info, or
> speculation, it would be much appreciated.
>
> Thanks,
> David
>
> middlegen 2.1
> ant 1.6.5
> java 1.4.2
> oracle driver 10.2.01
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> middlegen-user mailing list
> middlegen-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/middlegen-user
>



Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
middlegen-user mailing list
middlegen-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/middlegen-user

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
middlegen-user mailing list
middlegen-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/middlegen-user

Reply via email to