2 huixinjinkongxin huixinjinkongxin 于 2016.09.13 11:57 提问

org.apache.ibatis.ognl.OgnlException:怎么解决

Caused by: org.apache.ibatis.ognl.OgnlException: source is null for getProperty(null, "mainPic")
at org.apache.ibatis.ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1652) ~[mybatis-3.2.2-3.2.2.jar:3.2.2]
at org.apache.ibatis.ognl.ASTProperty.getValueBody(ASTProperty.java:92) ~[mybatis-3.2.2-3.2.2.jar:3.2.2]
at org.apache.ibatis.ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170) ~[mybatis-3.2.2-3.2.2.jar:3.2.2]
at org.apache.ibatis.ognl.SimpleNode.getValue(SimpleNode.java:210) ~[mybatis-3.2.2-3.2.2.jar:3.2.2]
at org.apache.ibatis.ognl.ASTChain.getValueBody(ASTChain.java:109) ~[mybatis-3.2.2-3.2.2.jar:3.2.2]
at org.apache.ibatis.ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170) ~[mybatis-3.2.2-3.2.2.jar:3.2.2]
at org.apache.ibatis.ognl.SimpleNode.getValue(SimpleNode.java:210) ~[mybatis-3.2.2-3.2.2.jar:3.2.2]
at org.apache.ibatis.ognl.ASTNotEq.getValueBody(ASTNotEq.java:49) ~[mybatis-3.2.2-3.2.2.jar:3.2.2]
at org.apache.ibatis.ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170) ~[mybatis-3.2.2-3.2.2.jar:3.2.2]
at org.apache.ibatis.ognl.SimpleNode.getValue(SimpleNode.java:210) ~[mybatis-3.2.2-3.2.2.jar:3.2.2]
at org.apache.ibatis.ognl.ASTAnd.getValueBody(ASTAnd.java:56) ~[mybatis-3.2.2-3.2.2.jar:3.2.2]
at org.apache.ibatis.ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170) ~[mybatis-3.2.2-3.2.2.jar:3.2.2]
at org.apache.ibatis.ognl.SimpleNode.getValue(SimpleNode.java:210) ~[mybatis-3.2.2-3.2.2.jar:3.2.2]
at org.apache.ibatis.ognl.Ognl.getValue(Ognl.java:333) ~[mybatis-3.2.2-3.2.2.jar:3.2.2]
at org.apache.ibatis.ognl.Ognl.getValue(Ognl.java:413) ~[mybatis-3.2.2-3.2.2.jar:3.2.2]
at org.apache.ibatis.ognl.Ognl.getValue(Ognl.java:395) ~[mybatis-3.2.2-3.2.2.jar:3.2.2]
at org.apache.ibatis.scripting.xmltags.OgnlCache.getValue(OgnlCache.java:45) ~[mybatis-3.2.2-3.2.2.jar:3.2.2]
... 106 common frames omitted

2个回答

huixinjinkongxin
huixinjinkongxin   2016.09.14 14:03
已采纳

已解决,Dao方法的闯入参数少了个注解

qq_33376866
qq_33376866   2017.03.08 09:55

我也碰到了这个问题,但是我的dao层是逆向工程生成的,不应该会少注解,怎么处理

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!
其他相关推荐
Caused by: org.apache.ibatis.ognl.OgnlException: source is null for getProperty(null, "id")
我的实体类(引入了user对象): 我的配置文件: 此时回报标题中的错误,意思就是user对象为空,无法取出他的id值。修改成下面的即可:
org.apache.ibatis.ognl.OgnlException: source is null for getProperty(null, "mil_id")
org.apache.ibatis.ognl.OgnlException: source is null for getProperty(null, "mil_id") 今天遇到这个问题,  经过一番探索,  发现是mybatis 查询语句的问题  ,其中我有个条件查询语句  动态写参数, (由于一些原因copy部分代码 ) 其中equipmentCode是关联表中的字段,所有我用energy
root cause org.apache.ibatis.ognl.OgnlException: source is null for getProperty(null, “xxx”)
    OgnlException这个Mybatis的错误其实就是包装了Java的NullPointException异常。所以显而易见,就是你的这个属性是空的。但是前几天我在用Mybatis时,出现了这个错误,却没有查出原因。于是我查找了csdn里面的一篇博客才发现其实问题很简单。博客地址:https://blog.csdn.net/qq_32331073/article/details/762...
解决异常ognl.OgnlException: source is null for getProperty(null, "token")
解决异常ognl.OgnlException: source is null for getProperty(null, "token")
root cause org.apache.ibatis.ognl.OgnlException: source is null for getProperty(null, "XXX")
[java] view plain copy org.apache.catalina.core.StandardWrapperValve invoke   threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException:
Caused by: org.apache.ibatis.ognl.OgnlException: source is null for getProperty(null, "list")
1、错误描述2017-10-08 23:58:06,672 ERROR [core.interceptor.ExceptionResolverCustom] (http-apr-8686-exec-4:) nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression 'pd.l
ognl.OgnlException: source is null for getProperty(null, "0")
Java Web错误 ognl.OgnlException: source is null for getProperty(null, “0”)错误
MyBatis报OgnlException: source is null for getProperty(null, "id")异常
MyBatis报OgnlException: source is null for getProperty(null, “id”)异常 代码如下 <sql id="where"> <if test="requestStudent.id!=null and requestStudent.id!=''"> ...
精华php-redis的安装解决内带有phpredis安装包
Linux下php-redis的怎么安装怎么解决解决,内带有phpredis安装包
关于word如何上传
word上传方式,该怎么解决呢,该怎么解决呢