副问题[/!--empirenews.page--]

来历:http://h5ip.cn/aJgJ
Mybatis是一个开源的轻量级半自动化ORM框架,使得面向工具应用措施与相关数据库的映射变得越发轻易。MyBatis行使xml描写符或注解将工具与存储进程或SQL语句相团结。Mybatis最大利益是应用措施与Sql举办解耦,sql语句是写在Xml Mapper文件中。OGNL表达式在Mybatis傍边应用很是普及,其表达式的机动性使得动态Sql成果的很是强盛。OGNL是Object-Graph Navigation Language的缩写,代表工具图导航说话。OGNL是一种EL表达式说话,用于配置和获取Java工具的属性,而且可以对列表举办投影选择以及执行lambda表达式。Ognl类提供了很多轻盈要领用于执行表达式的。Struts2宣布的每个版本城市呈现的新的高危可执行裂痕也是由于它行使了机动的OGNL表达式。公司后端回收Mybatis作为数据会见层,所行使版本为3.2.3。线上情形营业体系在运行进程中呈现了一个令人狐疑的非常, 该非常时而呈现时而不呈现,结构各类OGNL表达式为空等非凡环境均不会重现该非常。详细非常仓库信息如下:
- ### Error querying database. Cause: org.apache.ibatis.builder.BuilderException: Error evaluating expression 'list != null and list.size() > 0'. Cause: org.apache.ibatis.ognl.MethodFailedException: Method "size" failed for object [1] [java.lang.IllegalAccessException: Class org.apache.ibatis.ognl.OgnlRuntime can not access a member of class java.util.Collections$SingletonList with modifiers "public"]
- ### Cause: org.apache.ibatis.builder.BuilderException: Error evaluating expression 'list != null and list.size() > 0'. Cause: org.apache.ibatis.ognl.MethodFailedException: Method "size" failed for object [1] [java.lang.IllegalAccessException: Class org.apache.ibatis.ognl.OgnlRuntime can not access a member of class java.util.Collections$SingletonList with modifiers "public"]
- at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23) org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:107)
- at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:98)
- at cn.com.shaobingmm.MybatisBugTest$2.run(MybatisBugTest.java:88)
- at java.lang.Thread.run(Thread.java:745)
- Caused by: org.apache.ibatis.builder.BuilderException: Error evaluating expression 'list != null and list.size() > 0'. Cause: org.apache.ibatis.ognl.MethodFailedException: Method "size" failed for object [1] [java.lang.IllegalAccessException: Class org.apache.ibatis.ognl.OgnlRuntime can not access a member of class java.util.Collections$SingletonList with modifiers "public"]
- at org.apache.ibatis.scripting.xmltags.OgnlCache.getValue(OgnlCache.java
- at:47)
- at org.apache.ibatis.scripting.xmltags.ExpressionEvaluator.evaluateBoolean(ExpressionEvaluator.java:29)
- at org.apache.ibatis.scripting.xmltags.IfSqlNode.apply(IfSqlNode.java:30)
- at org.apache.ibatis.scripting.xmltags.MixedSqlNode.apply(MixedSqlNode.java:29)
- at org.apache.ibatis.scripting.xmltags.TrimSqlNode.apply(TrimSqlNode.java:51)
- at org.apache.ibatis.scripting.xmltags.MixedSqlNode.apply(MixedSqlNode.java:29)
- at org.apache.ibatis.scripting.xmltags.DynamicSqlSource.getBoundSql(DynamicSqlSource.java:37)
- at org.apache.ibatis.mapping.MappedStatement.getBoundSql(MappedStatement.java:275)
- at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:79)
- at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:104)
- ... 3 more
- Caused by: org.apache.ibatis.ognl.MethodFailedException: Method "size" failed for object [1] [java.lang.IllegalAccessException: Class org.apache.ibatis.ognl.OgnlRuntime can not access a member of class java.util.Collections$SingletonList with modifiers "public"]
- at org.apache.ibatis.ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:837)
- at org.apache.ibatis.ognl.ObjectMethodAccessor.callMethod(ObjectMethodAccessor.java:61)
- at org.apache.ibatis.ognl.OgnlRuntime.callMethod(OgnlRuntime.java:860)
- at org.apache.ibatis.ognl.ASTMethod.getValueBody(ASTMethod.java:73)
- at org.apache.ibatis.ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
- at org.apache.ibatis.ognl.SimpleNode.getValue(SimpleNode.java:210)
- at org.apache.ibatis.ognl.ASTChain.getValueBody(ASTChain.java:109)
- at org.apache.ibatis.ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
- at org.apache.ibatis.ognl.SimpleNode.getValue(SimpleNode.java:210)
- at org.apache.ibatis.ognl.ASTGreater.getValueBody(ASTGreater.java:49)
- at org.apache.ibatis.ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
- at org.apache.ibatis.ognl.SimpleNode.getValue(SimpleNode.java:210)
- at org.apache.ibatis.ognl.ASTAnd.getValueBody(ASTAnd.java:56)
- at org.apache.ibatis.ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
- at org.apache.ibatis.ognl.SimpleNode.getValue(SimpleNode.java:210)
- at org.apache.ibatis.ognl.Ognl.getValue(Ognl.java:333)
- at org.apache.ibatis.ognl.Ognl.getValue(Ognl.java:413)
- at org.apache.ibatis.ognl.Ognl.getValue(Ognl.java:395)
- at org.apache.ibatis.scripting.xmltags.OgnlCache.getValue(OgnlCache.java:45)
- ... 12 more
(编辑:湖南网)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|