RE: Question for Java developers on Hibernate

From: Mercadante, Thomas F (LABOR) <"Mercadante,>
Date: Thu, 28 Jul 2011 10:52:48 -0400
Message-ID: <AD4532B304E00C4F9AEFA0D338DF7DD1011DED3ADA_at_excnysm95banp.nysemail.nyenet>



Alan,

When this happens here, I trace the session and capture the sql in the log file. Probably the quickest way to discover what's missing if you do not have a log of database changes that were made.

Hope this helps.

Tom

From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Guillermo Alan Bort Sent: Thursday, July 28, 2011 10:47 AM
To: oracle-l-freelists
Subject: Question for Java developers on Hibernate

So... I'm very annoyed today with one of out beloved developers...

Due to some "security" measures (in fact it was a political issue) we had to do a database refresh and upgrade all in one step using expdp. It's not all that bad, but the dev team that is supposed to use the new database is having a lot of trouble with the new DB (everything from synonyms to grants had to be reviewed, thank god for TOAD's "compare database" feature).

The problem is that the database was refreshed from the production DB and the old dev DB had a few modifications, so basically now they are having trouble with the dev version of the app (missing columns/tables?).

The app is a java monster that uses hibernate to connect to Oracle (did I ever mention my aversion to frameworks?) and when I asked exactly WHAT table was missing the dev team didn't seem to have an answer, all they are getting is ORA-942... so I asked for the SQL Query and the reply was that they are using hibernate and that it doesn't allow them to see the queries.

I honestly know very little about java and even less about hibernate, but there must be a way to see this (other that tracing the session)... so my question to those of you who know hibernate or work with hibernate is how do you see what query the framework is executing?

and if hibernate doesn't actually have a way to easily log what its doing... well I'm amazed that anyone would choose it for production use.

thanks :-)
Alan.-

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Jul 28 2011 - 09:52:48 CDT

Original text of this message