开发者

boxing unboxing, cglib, spring and NoSuchMethodError mystery

I use Spring and GWt in my project. In few cases开发者_如何学编程 I've got a NoSuchMethodError thrown by CGLIB when I invoke a method of a spring bean proxy.

If I look at the error, It shows me that it tries to find a method with Integer object instead basic int fields.

For example, I've got a method which is defined like that in my spring bean

public void saveObject(int value)
{
// some stuff
}

When I call this method an error is thrown : NoSuchMethodError which indicates it tries to find method saveObject with a field java.lang.Integer and not a basic int field (with I key)

What's the problem ? is there boxing/unboxing problems ? I precise that I call this method with a basic int and not an Integer.


Are you using cglib-nodep? That has worked for me in the past. Also check the version of cglib that you are using and try to use the latest one.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜