An error occurs while executing a request for getting the number of records.
Error querying database. Cause: java.sql.SQLException: Parameter index out of range (1> number of parameters, which is 0).
The error may involve dataAccess.PhoneRecordMapper.getCountOfRecords-Inline
Occurred while setting parameters
Cause: java.sql.SQLException: Parameter index out of range (1> number of parameters, which is 0).
The request itself, in which an error occurs (moreover, when the request is executed on the server, and not through the code, everything works fine)
<select id="getCountOfRecords" resultType="java.lang.Integer" parameterType="hashmap"> SELECT COUNT(*) FROM t_call LEFT JOIN t_event ON t_call.ID_CALL = t_event.CALL_ID </select> <resultMap type="phoneRecord" id="phoneRecordMap"> <id property="recordId" column="RECORD_ID"/> <result property="recordId" column="RECORD_ID"/> <result property="recordEventId" column="RECORD_EVENT_ID"/> <result property="recordDate" column="RECORD_DATE"/> <result property="caller" column="CALLER"/> <result property="reciever" column="RECIEVER"/> <result property="callId" column="CALL_ID"/> <result property="idCall" column="ID_CALL"/> </resultMap> interface method:
public int getCountOfRecords(HashMap<String, Object> param); If you just get all the records through the code, then everything is OK, and the records are obtained. Can someone suggest what could be the problem? Entries get in the Struts action.