Mybatis-3: Invalid error message 'Two methods with same method sigunature but not providing classes assignable?' in System.err

Created on 28 Feb 2017  Â·  10Comments  Â·  Source: mybatis/mybatis-3

OgnlRuntime writes this error to system.err:

Two methods with same method signature but not providing classes assignable? "public abstract boolean java.util.List.isEmpty()" and "public boolean java.util.AbstractCollection.isEmpty()" please report!

This condition in my mapper causes the problem:
<if test="conditions != null &amp;&amp; !conditions.isEmpty()">

conditions variable is an java.util.Collections.singletonList(). When I change this variable to ArrayList, error disapears.

bug on dependency library

Most helpful comment

The waiting is over!
This issue has been resolved in OGNL 3.1.16 which will be included in MyBatis 3.4.6.
Please try the latest 3.4.6-SNAPSHOT and verify the fix before the final release.

All 10 comments

Hi,

It's OGNL that outputs the message.
I could reproduce it with the following code that does not depend on MyBatis.

  @Test
  public void testEmptyCheck2() throws Exception {
    String expressiosn = "list.isEmpty()";
    Object expr = Ognl.parseExpression(expressiosn);
    OgnlContext ctx = new OgnlContext();
    List<String> list = Collections.singletonList("string");
    ctx.put("list", list);
    Object value = Ognl.getValue(expr, ctx);
  }

I did a manual bisect on OGNL and it seems to be your PR that
triggered this issue. :)
You should report this to OGNL.

Hi @harawata

A cause of this issue is OGNL implementation. However the MyBatis use repackaging classes. Therefore I think better this issue is keeping a open status until apply a bug fix OGNL.
What do you think ?

Okay. But I will lock the thread if we start getting 'me too' comments like the last one ;)

I've added new label(bug on dependency library).

Hi @vlastimil-dolejs, Could you report this issue to OGNL ?

when will fix this bug, waiting。

waiting +1;

😔
https://github.com/jkuhnert/ognl/issues/35 Please wait there.

The waiting is over!
This issue has been resolved in OGNL 3.1.16 which will be included in MyBatis 3.4.6.
Please try the latest 3.4.6-SNAPSHOT and verify the fix before the final release.

What's the ETA for 3.4.6 release?

Was this page helpful?
0 / 5 - 0 ratings