Query is returning a value but the controller is not entering into resultset
<pre><code>public Map fetchSharedValues1(String servItemCode) throws AppException{
    Connection conn = null;
    String successFlag="";
    PreparedStatement pstmt = null;
    String sharedServId = null;
    Map map = new HashMap(); 
    ResultSet rs = null;
    String feasibilityId = null;

    String objQuery="select fi1.item_code from fsb_item fi, fsb_item fi1" +
    " where fi.item_code = ? " +
    " and fi.linkage = fi1.item_seq_id ";

    String feasibilityIdQuery = "select fi.feasibility_id from fsb_item fi where fi.item_code = ?";
    try {
        conn = getConnection(Constants.CORP_POS_DATASOURCE);

        conn.setAutoCommit(false);
        pstmt = conn.prepareStatement(objQuery);
        pstmt.setString(1, servItemCode);
        System.out.println("objQuery from dao is::::"+objQuery);
        System.out.println("servItemCode from dao is::::"+servItemCode);

        rs = pstmt.executeQuery();
        while (rs.next()) {
            sharedServId = rs.getString(1); 
            System.out.println("valueis::"+sharedServId);

        }
        pstmt = conn.prepareStatement(feasibilityIdQuery);
        pstmt.setString(1, servItemCode);
        System.out.println("item is::"+servItemCode);
        rs = pstmt.executeQuery();
        while (rs.next()) {
            feasibilityId = rs.getString(1);    
            System.out.println("fi is::"+feasibilityId);
        }
        if (sharedServId != null &amp;&amp; feasibilityId!= null) {
            map.put("sharedServId", sharedServId);
            map.put("feasibilityId", feasibilityId);
            System.out.println("ssid is::"+sharedServId);
            System.out.println("ffid is ::"+feasibilityId);
        }
        else
        {
            throw new AppException("No  Shared Details available for the Service Id :"+servItemCode);
        }   
        logger.info(" successFlag = "+successFlag);
        conn.commit();
    } catch (SQLException se) {
        ExceptionHandler.handleException("Database Exception while updating DataChanged Values ", se);
    } finally {
        cleanUp(conn, pstmt);

    }

    return map;

}
</code></pre>
