0 Replies Latest reply on Sep 27, 2011 9:57 PM by onesleo

    could not locate named parameter

    onesleo

      hi guys i have an issue about could not located named parameter ["SomeParameter"]

       

      and this is what i got

       

      root cause

       

      java.lang.IllegalArgumentException: org.hibernate.QueryParameterException: could not locate named parameter [namapemohon]

          org.hibernate.ejb.QueryImpl.setParameter(QueryImpl.java:206)

          id.co.compnet.api.keu.ctl.PendapatanJpaController.getPendapatanByNamaPemohon(PendapatanJpaController.java:209)

          id.co.compnet.cetak.CetakKwitansiDendaMBean.searchByName(CetakKwitansiDendaMBean.java:105)

       

       

      and this is the line which on PendapatanController.java

      line 209 is  q.setParameter("namapemohon", namaPemohon); and this related to my query

      and this query will invoke value from Database

      and this is the query "lower(p.NamaPemohon) like lower('%:namapemohon%') "

       

      and :namapemohon above is my Parameter, did you think guys there is something wrong in my code??

      so where exactly should i fix the error??

       

      need your help

      thanks in advance