You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a class Ognl in default (root) package with a public static method public static boolean test(Object o) { return true; }
then use it in an OGNL expression in an mapper like <if test="@Ognl@test(myParam)">...</if>
Expected result
Application should not fail
Actual result
Application crashes with stack trace:
...
Caused by: java.lang.ClassNotFoundException: Cannot find class: java.lang.Ognl
at org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:200)
at org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:89)
at org.apache.ibatis.io.Resources.classForName(Resources.java:261)
at org.apache.ibatis.scripting.xmltags.OgnlClassResolver.toClassForName(OgnlClassResolver.java:34)
at org.apache.ibatis.ognl.DefaultClassResolver.classForName(DefaultClassResolver.java:58)
at org.apache.ibatis.ognl.OgnlRuntime.classForName(OgnlRuntime.java:1167)
at org.apache.ibatis.ognl.OgnlRuntime.callStaticMethod(OgnlRuntime.java:1545)
See org.apache.ibatis.ognl.DefaultClassResolver
Any class that is searched and its className is without '.' is always prefixed with 'java.lang.'. This behavior was not in MyBatis 3.4.6.
The text was updated successfully, but these errors were encountered:
MyBatis version
3.5.3
Steps to reproduce
Create a class
Ognl
in default (root) package with a public static methodpublic static boolean test(Object o) { return true; }
then use it in an OGNL expression in an mapper like
<if test="@Ognl@test(myParam)">...</if>
Expected result
Application should not fail
Actual result
Application crashes with stack trace:
See
org.apache.ibatis.ognl.DefaultClassResolver
Any class that is searched and its className is without '.' is always prefixed with 'java.lang.'. This behavior was not in MyBatis 3.4.6.
The text was updated successfully, but these errors were encountered: