This might be duplicate of this but did not get proper solution over there. I am using named query to fetch some details as below and returning as list of string,
<sql-query name="getContactIds">
<return-scalar column="id" type="string" />
<![CDATA[Select c.id as id from CRM.dbo.contact c where is_deleted=0]]>
</sql-query>
But when calling this query, I am getting java.lang.RuntimeException: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Map
SearchTemplate searchTemplate = new SearchTemplate();
searchTemplate.setNamedQuery("getContactIds");
searchTemplate.setNamedQueryResultType(String.class);
salesforceContactIds=contactDao.getSfContactIds(searchTemplate);
Appreciate any help in this regard.