SEVERE: Servlet.service() for servlet [SpringMVC] in context with path [] threw exception ........


 

 运行项目项目后,因为前端用了layui框架,所以页面显示接口异常,

 

 查看tomcat日志,发现报了这个错误,关键是我犯了不止一次这个错误。所以记下来。

Feb 28, 2019 5:18:39 PM org.apache.catalina.core.ApplicationContext log
SEVERE: Servlet.service() for servlet [SpringMVC] in context with path [] threw exception 
[Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException:
nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression ''.
Cause: org.apache.ibatis.ognl.ExpressionSyntaxException: Malformed OGNL expression:
[org.apache.ibatis.ognl.ParseException: Encountered "<EOF>" at line 1, column 0. Was expecting one of: ":" ... "not" ... "+" ... "-" ... "~" ... "!" ... "(" ... "true" ... "false" ... "null" ... "#this" ... "#root" ... "#" ... "[" ... "{" ... "@" ... "new" ... <IDENT> ... <DYNAMIC_SUBSCRIPT> ... "\'" ... "`" ... "\"" ... <INT_LITERAL> ... <FLT_LITERAL> ... ]] with root cause org.apache.ibatis.ognl.ParseException: Encountered "<EOF>" at line 1, column 0.

 

原因是Mapper.xml文件中if判断条件没有写

          <if test="">// test="aaa!=null" 不写报错
              AND LOCATE(#{Parameter},字段)>0
      </if>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

---恢复内容结束---


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



猜您在找 Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception 异常 Servlet.service() for servlet [appServlet] in context with path [/item] threw exception [Request processing failed 报错:严重: Servlet.service() for servlet [springmvc] in context with path [ ] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause ------>Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause 错误:Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed;springboot无法注入,注入后无效 错误:严重: Servlet.service() for servlet [appServlet] in context with path [] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is Servlet.service() for servlet [gCmsFront] in context with path [/cms] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause java.lang.NullPoi Servlet.service() for servlet [dispatcherServlet] in context with path [/heima_ssm_web] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM