mybatis调用存储过程报空指针是什么情况?

错误信息
**### Error querying database. Cause: java.lang.NullPointerException

The error may exist in file [D:ideaprojectcqptnewbuildlibsexplodedcqptnew-1.0-SNAPSHOT.warWEB-INFclassessqlmapMenu.xml]

The error may involve cqsoft.serviceimpl.UserServiceImple.get_auth_menu-Inline

The error occurred while setting parameters

SQL: {call pr_menuauth(?, ?, ?)

Cause: java.lang.NullPointerException] with root cause

java.lang.NullPointerException*

java 代码 :*

    user.put("miperson",1);
    user.put("mimenup",1);
    user.put("v_cursor", new ArrayList());
    this.iUserService.getMenuByPersonAndImenup(user);

xml 代码:

<resultMap type="java.util.HashMap" id="cursorMap">
    <result column="iid" property="iid" jdbcType="INTEGER"/>
    <result column="ipid" property="ipid" jdbcType="INTEGER"/>
    <result column="ccode" property="ccode" jdbcType="VARCHAR"/>
    <result column="cname" property="cname" jdbcType="VARCHAR"/>
    <result column="ifuncregedit" property="ifuncregedit" jdbcType="INTEGER"/>

</resultMap>

<select id="get_auth_menu" parameterType="map" statementType="CALLABLE">
    {call pr_menuauth(#{miperson, jdbcType=INTEGER, mode=IN},
    #{mimenup, jdbcType=INTEGER, mode=IN},
    #{v_cursor, mode=OUT, jdbcType=CURSOR, resultMap=cursorMap})

</select>
阅读 4.3k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
宣传栏