Hi,
i am new to Hibernate query language. Actually we are migrating an Hibernate+ DB2 application to Hibernate + Oracle application.
In one of my java class we have following code.
try {
outages = (List) session.find(
" from Outage as o where o.warningBegin < CURRENT TIMESTAMP " +
" and o.outageEnd > CURRENT TIMESTAMP and o.application = 'ALL' " +
" or o.application = ?", appName, Hibernate.STRING);
System.out.println("Outage findNextByApplication outages size" + outages.size());
} catch( HibernateException e ) {
log.error("Exception thrown while searching for outages.");
log.info("Exception:", e);
}
The above code is working fine with DB2 database but I am hitting " Exception thrown while searching for outages" exception when I tried with Oracle database.
Could any one please help me out. Do i need to change my query to get it work in oracle. any suggestions please.
Thanks and regards.
nadipalli
|