Wednesday, April 4, 2012

NumberFormatException : hibernrate fingByNamedQuery

HIBERNATE : Unable to Iterate through a list and leading to NumberFormatException in JSTL.
oops was struggling for an hour....finally got resolved
Debug Steps
1.Checked the DAOImpl ..
batchList = this.hibernateTemplate.findByNamedQuery("getMspBatchMstrList");
it was getting the object,but the was not the type of what I need."i.e"
2. Tried to iterate in DAOImpl this time got the exception."ClassCastException."
Realized it is somthing to do in the mapping file.

it did the trick...

SELECT client as CLIENT,lk.msp_transaction as TRANS_ID,msp.msp_batch_number as MSP_BATCH_NUMBER, msp.batch_seq_num as BATCH_SEQ_NUM, msp.status as STATUS
FROM TRACKER.msp_batch_mstr msp, TRACKER.transaction_lkup lk
WHERE msp.trans_id=lk.trans_id

No comments:

Post a Comment