mvn clean test问题

来源:10-3 项目引入缓存的抽象实现

再坚持坚持一下

2024-09-17

报错问题:


[ERROR] exitSuccess  Time elapsed: 0.006 s  <<< ERROR!

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression 'ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere'. Cause: org.apache.ibatis.ognl.OgnlException: sqlSegment [java.lang.NullPointerException]

        at com.imooc.pan.server.modules.user.UserTest.exitSuccess(UserTest.java:108)

Caused by: org.apache.ibatis.builder.BuilderException: Error evaluating expression 'ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere'. Cause: org.apache.ibatis.ognl.OgnlException: sqlSegment [java.lang.NullPointerException]

        at com.imooc.pan.server.modules.user.UserTest.exitSuccess(UserTest.java:108)

Caused by: org.apache.ibatis.ognl.OgnlException: sqlSegment

        at com.imooc.pan.server.modules.user.UserTest.exitSuccess(UserTest.java:108)

Caused by: java.lang.NullPointerException

https://img1.sycdn.imooc.com/szimg/66e9873809b224bf18680590.jpg

[ERROR] wrongUsername  Time elapsed: 0.007 s  <<< ERROR!

java.lang.Exception: Unexpected exception, expected<com.imooc.pan.core.exception.RPanBusinessException> but was<org.mybatis.spring.MyBatisSystemException>

        at com.imooc.pan.server.modules.user.UserTest.wrongUsername(UserTest.java:78)

Caused by: org.apache.ibatis.builder.BuilderException: Error evaluating expression 'ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere'. Cause: org.apache.ibatis.ognl.OgnlException: sqlSegment [java.lang.NullPointerException]

        at com.imooc.pan.server.modules.user.UserTest.wrongUsername(UserTest.java:78)

Caused by: org.apache.ibatis.ognl.OgnlException: sqlSegment

        at com.imooc.pan.server.modules.user.UserTest.wrongUsername(UserTest.java:78)

Caused by: java.lang.NullPointerException


[ERROR] loginSuccess  Time elapsed: 0.007 s  <<< ERROR!

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression 'ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere'. Cause: org.apache.ibatis.ognl.OgnlException: sqlSegment [java.lang.NullPointerException]

        at com.imooc.pan.server.modules.user.UserTest.loginSuccess(UserTest.java:62)

Caused by: org.apache.ibatis.builder.BuilderException: Error evaluating expression 'ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere'. Cause: org.apache.ibatis.ognl.OgnlException: sqlSegment [java.lang.NullPointerException]

        at com.imooc.pan.server.modules.user.UserTest.loginSuccess(UserTest.java:62)

Caused by: org.apache.ibatis.ognl.OgnlException: sqlSegment

        at com.imooc.pan.server.modules.user.UserTest.loginSuccess(UserTest.java:62)

Caused by: java.lang.NullPointerException




执行单元测试是通过的,为啥执行mvn clean test 报错了?

写回答

1回答

RubinChu

2024-09-17

看一下空指针的代码是哪里,完了debug一下哈同学

0
0

SpringBoot+Vue3+Element Plus打造私人分布式存储系统

SpringBoot+Vue3+Element Plus 仿百度网盘实战

274 学习 · 347 问题

查看课程