#class java.lang.String cannot be cast to class java.lang.Integer

3 messages · Page 1 of 1 (latest)

errant tapir
#

Hello, I'm dev PHP but my boss put me on Java project so i'm not in my environnement ^^
I have this error on the title, but I don't understand why.

The debugger stop here :

List olist = null;
olist = oDistribtionCentersLinksQuerry.setCacheable(true).list();

The function complete :

 public List listDcLinks(String sId) throws HibernateException {

        String sQuery1 = S_FIND_DCL;
        String sQuery2 = new String();
        int j = 0;
        int index = 0;
        Session s = _RootDAO.createSession();

        if (sId != null && !sId.equals("")) {

            sQuery2 += S_FIND_DCL_PARAM1;
            sQuery2 += S_ORDER_BY;
        }

        Query oDistribtionCentersLinksQuerry = s.createQuery(sQuery1 + " where 1 = 1 " + sQuery2);

        if (sId != null && !sId.equals("")) {
            oDistribtionCentersLinksQuerry = oDistribtionCentersLinksQuerry.setParameter(j++, sId);
            oDistribtionCentersLinksQuerry = oDistribtionCentersLinksQuerry.setParameter(j++, sId);
        }

        S_LOG.debug(oDistribtionCentersLinksQuerry.getQueryString());

        List olist = null;
        olist = oDistribtionCentersLinksQuerry.setCacheable(true).list();


        S_LOG.debug(olist.size() + " enregistrements trouves");
        s.close();
        return olist;
    }
crisp gorgeBOT
#

Hey, @errant tapir!
Please remember to /close this post once your question has been answered!