When i run my java program i am getting the Invalid column index error. But it looks the columns in the query and the code accessing the resultset data are proper. Please look into the below and provide your suggestions to nail down the issue,
SELECT DISTINCT a.customer,'*****' AS "ORDER_NUMBER",b.cust_po_num,b.cust_line_item,DECODE(b.mkt_part_num,'',b.cus_part_num),b.cr_qty,'$'||b.locunitprice,TO_CHAR(b.cr_date), 'PreGated' FROM XXCYP_OE_ORDER_EDI850_TMP a, XXCYP_OE_ORDER_EDI850_HIST b, XXCYP_OE_ORDER_EDI850_FALLOUT c WHERE a.cust_po_num=b.cust_po_num AND a.cust_po_num=c.cust_po_num AND b.cust_po_num=c.cust_po_num AND a.customer =? ORDER BY b.cust_po_num,b.cust_line_item
I haven't counted , but not all drivers support that you call the getXXX() twice for the same column.
Why don't you temporary put each call on a separate line, so that the error will show which call is bogus?