Re: middlegen-oracle connection problem
"Ðavîd Låndïs" <[email protected]> Wed, 28 Jun 2006 10:35:36 -0400
| Newsgroups | gmane.comp.java.ejb.middlegen.user |
|---|---|
| Message-ID | <[email protected]> |
--===============1602795340== Content-Type: multipart/alternative; boundary="----=_Part_998_19991757.1151505336378" ------=_Part_998_19991757.1151505336378 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 > > [email protected] > > 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 > [email protected] > https://lists.sourceforge.net/lists/listinfo/middlegen-user > ------=_Part_998_19991757.1151505336378 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi eivindw,<br><br>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.<br><br>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. <br><br>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.<br><br>Thanks,<br>David<br><br><div> <span class="gmail_quote">On 6/27/06, <b class="gmail_sendername"><a href="mailto:[email protected]">[email protected]</a></b> <<a href="mailto:[email protected]">[email protected]</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Hi David!<br><br>It's been a long time since i worked with Oracle, but there are quite a<br>few quirks in Middlegen to get it working. If you search for oracle in the<br>MiddlegenPopulator, you'll see several places where special handling is <br>done for Oracle:<br><a href="http://middlegen.cvs.sourceforge.net/middlegen/middlegen/src/java/middlegen/MiddlegenPopulator.java?revision=1.65&view=markup">http://middlegen.cvs.sourceforge.net/middlegen/middlegen/src/java/middlegen/MiddlegenPopulator.java?revision=1.65&view=markup </a><br><br>I remember several problems related to Oracle earlier. Maybe some of the<br>fixes put in for older Oracle versions don't apply to the latest versions?<br><br>You could also try turning on debug logging while running Middlegen. <br>Should produce some more output. Maybe that could help pinpoint where it's<br>hanging.<br><br>.eivindw<br><br>> Hi Everyone,<br>><br>> I am a new middlegen user trying to integrate Hibernate with an existing<br> > database schema. When I run my MiddleTask in the buildfile it is able to<br>> connect to the Oracle 10g database correctly, but the GUI never appears.<br>> When I run against another similar database, the GUI does appear and seems <br>> to work properly.<br>><br>> My first guess was that the first database (my dev environment) is just a<br>> lot slower than the other. However, even after 30-40 minutes of hanging<br>> after the connection step, it never proceeded to the next step of <br>> displaying<br>> the GUI, whereas with the other database it only took about 5 minutes.<br>> Both<br>> databases are large, with hundreds of tables, however the schema I am<br>> referencing in the buildfile only has about 12 tables. <br>><br>> Does anyone know what commands Middlegen uses to gather all the metadata<br>> for<br>> oracle? Maybe there is some internal restriction in this dev database that<br>> is causing this process to hang... If anyone has any suggestions, info, or <br>> speculation, it would be much appreciated.<br>><br>> Thanks,<br>> David<br>><br>> middlegen 2.1<br>> ant 1.6.5<br>> java 1.4.2<br>> oracle driver 10.2.01<br>> Using Tomcat but need to do more? Need to support web services, security? <br>> Get stuff done quickly with pre-integrated technology to make your job<br>> easier<br>> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo<br>> <a href="http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642"> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642</a><br>> _______________________________________________<br>> middlegen-user mailing list<br>> <a href="mailto:[email protected]"> [email protected]</a><br>> <a href="https://lists.sourceforge.net/lists/listinfo/middlegen-user">https://lists.sourceforge.net/lists/listinfo/middlegen-user</a><br>><br><br><br><br>Using Tomcat but need to do more? Need to support web services, security? <br>Get stuff done quickly with pre-integrated technology to make your job easier<br>Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo<br><a href="http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642"> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642</a><br>_______________________________________________<br>middlegen-user mailing list<br><a href="mailto:[email protected]"> [email protected]</a><br><a href="https://lists.sourceforge.net/lists/listinfo/middlegen-user">https://lists.sourceforge.net/lists/listinfo/middlegen-user</a><br></blockquote></div><br> ------=_Part_998_19991757.1151505336378-- --===============1602795340== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 --===============1602795340== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ middlegen-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/middlegen-user --===============1602795340==--