New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid error message 'Two methods with same method sigunature but not providing classes assignable?' in System.err #929

Closed
vlastimil-dolejs opened this Issue Feb 28, 2017 · 10 comments

Comments

Projects
None yet
6 participants
@vlastimil-dolejs
Contributor

vlastimil-dolejs commented Feb 28, 2017

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.

@harawata

This comment has been minimized.

Member

harawata commented Feb 28, 2017

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.

@harawata harawata closed this Feb 28, 2017

@kazuki43zoo

This comment has been minimized.

Member

kazuki43zoo commented Feb 28, 2017

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 ?

@harawata

This comment has been minimized.

Member

harawata commented Feb 28, 2017

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

@kazuki43zoo

This comment has been minimized.

Member

kazuki43zoo commented Feb 28, 2017

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

@kazuki43zoo

This comment has been minimized.

Member

kazuki43zoo commented Mar 1, 2017

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

@nusan

This comment has been minimized.

nusan commented Mar 22, 2017

when will fix this bug, waiting。

@wushp

This comment has been minimized.

wushp commented Apr 10, 2017

waiting +1;

@mybatis mybatis locked and limited conversation to collaborators Apr 10, 2017

@harawata

This comment has been minimized.

Member

harawata commented Apr 11, 2017

😔
jkuhnert/ognl#35 Please wait there.

@harawata

This comment has been minimized.

Member

harawata commented Nov 16, 2017

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.

@harawata harawata closed this Nov 16, 2017

@mybatis mybatis unlocked this conversation Nov 16, 2017

@harawata harawata added this to the 3.4.6 milestone Nov 16, 2017

@harawata harawata self-assigned this Nov 16, 2017

jon-bell pushed a commit to FlakyTestDetection/mybatis-3 that referenced this issue Nov 16, 2017

@adrianboimvaser

This comment has been minimized.

adrianboimvaser commented Mar 6, 2018

What's the ETA for 3.4.6 release?

@harawata harawata changed the title from Ognl reports errors after upgrade from 3.4.1 to 3.4.2 to Invalid error message 'Two methods with same method sigunature but not providing classes assignable?' in System.err Mar 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment