Skip to content
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
Assignees
Labels
bug on dependency library Indicates a bug on dependency library
Milestone

Comments

@vlastimil-dolejs
Copy link
Contributor

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
Copy link
Member

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.

@kazuki43zoo
Copy link
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
Copy link
Member

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

@harawata harawata reopened this Feb 28, 2017
@kazuki43zoo kazuki43zoo added the bug on dependency library Indicates a bug on dependency library label Feb 28, 2017
@kazuki43zoo
Copy link
Member

kazuki43zoo commented Feb 28, 2017

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

@kazuki43zoo
Copy link
Member

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

@nusan
Copy link

nusan commented Mar 22, 2017

when will fix this bug, waiting。

@wushp
Copy link

wushp commented Apr 10, 2017

waiting +1;

@mybatis mybatis locked and limited conversation to collaborators Apr 10, 2017
@harawata
Copy link
Member

😔
orphan-oss/ognl#35 Please wait there.

@harawata
Copy link
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.

@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
Copy link

What's the ETA for 3.4.6 release?

@harawata harawata changed the title Ognl reports errors after upgrade from 3.4.1 to 3.4.2 Invalid error message 'Two methods with same method sigunature but not providing classes assignable?' in System.err Mar 9, 2018
pulllock pushed a commit to pulllock/mybatis-3 that referenced this issue Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug on dependency library Indicates a bug on dependency library
Projects
None yet
Development

No branches or pull requests

6 participants