Note that there are some explanatory texts on larger screens.

plurals
  1. POThere is no READABLE property named 'first_name' in class 'Employee'
    primarykey
    data
    text
    <p>I am new to ibatis,</p> <p>i have written a small program in ibatis.</p> <p>But i'm getting the below error. I tried in all way. I'm unaware of that how to resolve.</p> <p>Could anyone tell me why this is occurring and whats the way to avoid this error?</p> <pre><code>Exception in thread "main" com.ibatis.common.exception.NestedRuntimeException: Error occurred. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath '/sqlMap/update'. Cause: com.ibatis.common.beans.ProbeException: There is no READABLE property named 'first_name' in class 'Employee' Caused by: com.ibatis.common.beans.ProbeException: There is no READABLE property named 'first_name' in class 'Employee' Caused by: com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath '/sqlMap/update'. Cause: com.ibatis.common.beans.ProbeException: There is no READABLE property named 'first_name' in class 'Employee' Caused by: com.ibatis.common.beans.ProbeException: There is no READABLE property named 'first_name' in class 'Employee' Caused by: com.ibatis.common.beans.ProbeException: There is no READABLE property named 'first_name' in class 'Employee' </code></pre> <p>Code: Employee.java it contains getter and setter methods for first_name,last_name,id,salary</p> <p>employeedao.java</p> <pre><code>public static void main() { Reader rd=Resources.getResourceAsReader("sql-maps-config.xml"); SqlMapClient smc = SqlMapClientBuilder.buildSqlMapClient(rd); System.out.println("Going to read records....."); rec.setId(1); rec.setFirstName("Roma"); smc.update("UserTEO.update", rec ); System.out.println("Record updated Successfully "); System.out.println("Going to read records....."); List &lt;employeedao&gt; ems = (List&lt;employeedao&gt;) smc.queryForList("UserTEO.getAll", null); employeedao em = null; for (employedao e : ems) { System.out.print(" " + e.getId()); // System.out.print(" " + e.getFirstName()); // System.out.print(" " + e.getLastName()); System.out.print(" " + e.getSalary()); em = e; System.out.println(""); } System.out.println("Records Read Successfully "); } </code></pre> <p>employee.xml </p> <pre><code> &lt;select id="getAll" resultClass="Employee"&gt; SELECT * FROM EMPLOYEE &lt;/select&gt; &lt;update id="update" parameterClass="Employee"&gt; UPDATE EMPLOYEE SET first_name = #first_name# WHERE id = #id# &lt;/update&gt; &lt;/sqlMap&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload