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
上传中...
上传图片
插入图片