{"className":"com.yixue.irsapi.listener.irsapi.IrsSessionConsumerListener","createTime":1572701454217,"errorMessage":"{'classSectionId':'1125199012547292','courseId':'1025199012535080','courseInstanceId':'1025199012535080_524_39393','createTime':1572699083408,'goalType':'STUDY','isDel':0,'isRepeat':0,'parentSessionId':'4650809785075712','requestId':'9f0ab797174d49638dde56ebae239717','rootSectionVersion':'21','rootSessionId':'4647892164294656','sectionId':'1125199012547297','sectionLevel':'4','sectionVersion':'7','sendTime':1572701450367,'sessionId':'4650829557740544','status':'INPROCESS','subject':'2','taskSectionId':'1125199012547293','type':0,'updateTime':1572701450366,'userId':'6860100837654689'}","errorReason":"nested exception is org.apache.ibatis.exceptions.PersistenceException: \n### Error querying database. Cause: java.lang.NullPointerException\n### The error may exist in URL [jar:file:/opt/app/irs-listener-1.0.0.jar!/BOOT-INF/lib/irs-db-1.0.0.jar!/mapper/irsapi/IrsSessionDao.xml]\n### The error may involve com.yixue.irsdb.dao.irsapi.IrsSessionDao.selectInfo-Inline\n### The error occurred while setting parameters\n### SQL: select session_id, update_time from irs_session where session_id = ? and subject = ? and user_id = ? limit 1\n### Cause: java.lang.NullPointerException","messageType":"irsListener","methodName":"sessionOnMessage","userId":""}

<select id="selectInfo" parameterType="com.yixue.irsdb.entity.irsapi.IrsSessionEntity" resultType="com.yixue.irsdb.entity.irsapi.IrsSessionEntity">
        select session_id, update_time from irs_session where
        `session_id` = #{sessionId,jdbcType=VARCHAR}
        <if test="subject != null">and `subject` = #{subject,jdbcType=VARCHAR}</if>
        <if test="userId != null">and `user_id` = #{userId,jdbcType=VARCHAR}</if>
        limit 1
    </select>

Comment From: kazuki43zoo

We cannot investigate cause by only your provided information. Could you provide more detail informations?

e.g.

  • full stack trace
  • small reproduce project (or occurrence conditions)
  • versions (mybatis, database, java, etc..)

Comment From: harawata

No reply.

I'm not 100% sure, but this does not seem like a MyBatis issue. Please post the information @kazuki43zoo requested if you disagree.