title: MyBatis: Attempted to return null from a method with a primitive return type
body: <p>My DB connection is with mybatis, 
  I have DAO with this function:</p>
  
  <pre><code>public int getUpdateTaskStateStart(Task task);
  </code></pre>
  
  <p>And the implemention is located in XML file:</p>
  
  <pre><code>&lt;select id="getUpdateTaskStateStart" resultType="Integer" parameterType="com.ladpc.mobile.entities.Task"&gt;
  
          SELECT START_UPDATE
          FROM UPDATE_TASK_STATE
              WHERE 
          TASK_ID = #{taskId} AND RASHUT_ID=#{rashutId} 
  
      &lt;/select&gt;
  </code></pre>
  
  <p>In DB, I have table UPDATE_TASK_STATE, that include START_UPDATE filed.</p>
  
  <p>My problem is that when I run <code>getUpdateTaskStateStart(Task)</code> (and send task param that include rashutId="248" and taskId="2449" fileds inside), I get Error:</p>
  
  <pre><code>org.apache.ibatis.binding.BindingException: Mapper method 'com.ladpc.mobile.dao.AssesmentTasksDao.getUpdateTaskStateStart attempted to return null from a method with a primitive return type (int).
  </code></pre>
  
  <p>What is wrong with my function? 
  Thanks!</p>