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

java.lang.IllegalArgumentException: wrong number of arguments #89

Closed
bwzhang2011 opened this issue Apr 27, 2016 · 5 comments
Closed

java.lang.IllegalArgumentException: wrong number of arguments #89

bwzhang2011 opened this issue Apr 27, 2016 · 5 comments
Assignees
Labels
Milestone

Comments

@bwzhang2011
Copy link

@knightliao, 升级disconf到2.6.32时发现一个问题,异常堆栈为:
20160427 10:18:34.688 ERROR com.baidu.disconf.client.store.processor.impl.DisconfStoreFileProcessorImpl. main inject2Instance [fileName,fileItem]:[basicproxyrouter.properties,proxy.routerRateEnable] java.lang.IllegalArgumentException: wrong number of arguments
java.lang.IllegalArgumentException: wrong number of arguments
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_80]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_80]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_80]
at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_80]
at com.baidu.disconf.client.common.model.DisconfCenterFile$FileItemValue.setValue4FileItem(DisconfCenterFile.java:216) ~[classes/:?]
at com.baidu.disconf.client.store.processor.impl.DisconfStoreFileProcessorImpl.inject2Instance(DisconfStoreFileProcessorImpl.java:148) ~[classes/:?]
at com.baidu.disconf.client.core.processor.impl.DisconfFileCoreProcessorImpl.inject2OneConf(DisconfFileCoreProcessorImpl.java:237) ~[classes/:?]
at com.baidu.disconf.client.core.processor.impl.DisconfFileCoreProcessorImpl.inject2Conf(DisconfFileCoreProcessorImpl.java:257) ~[classes/:?]
at com.baidu.disconf.client.core.impl.DisconfCoreMgrImpl.inject2DisconfInstance(DisconfCoreMgrImpl.java:95) ~[classes/:?]
at com.baidu.disconf.client.DisconfMgr.secondScan(DisconfMgr.java:139) ~[classes/:?]
at com.baidu.disconf.client.DisconfMgrBeanSecond.init(DisconfMgrBeanSecond.java:13) ~[classes/:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_80]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_80]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_80]
at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_80]

说明:

  1. 略微改了一下源码DisconfStoreFileProcessorImpl中inject2Instance捕获到异常的打印(把fileItem)
    加进来

  2. 配置及其对应说明
    2.1 配置文件中的proxy.routerRateEnable为布尔值(proxy.routerRateEnable=true)
    对应的配置bean的属性为routerRateLimitEnable,相当于
    private boolean routerRateLimitEnable;

    @DisconfFileItem(name = "proxy.routerRateEnable", associateField = "routerRateLimitEnable")
    

    @OverRide
    public boolean isRouterRateLimitEnable() {
    return routerRateLimitEnable;
    }

    2.2 我测试了2.6.31和2.6.32,——即将enable.remote.conf=false使用前面一个版本(2.6.31)则没有报错(可以正常将本地的配置与配置BEAN完成映射),但2.6.32则报错了

    2.3 经追溯源码DisconfCenterFile中setValue4FileItem方法中setMethod.invoke(object, value) 这个处理报错了(反射),但不清楚是什么原因——貌似对一些boolean属性的存在问题(非boolean则OK)

@knightliao, 有时间确定后可否回复。

@bwzhang2011
Copy link
Author

@knightliao, any update with such issue ?

@knightliao
Copy link
Owner

已收到,待我检查看看,如果有问题,会在近期修复

@bwzhang2011
Copy link
Author

@knightliao, 感谢跟进,我打包测试2.6.33问题还是一样,希望能跟进FIX(若确认后)

@knightliao knightliao added the bug label May 28, 2016
@knightliao knightliao added this to the 2.6.34 milestone May 28, 2016
@knightliao knightliao self-assigned this May 28, 2016
@edagarli
Copy link

请问这个bug修复没有,2.6.34 好像还有

@knightliao
Copy link
Owner

https://github.com/knightliao/disconf/wiki/updates 应该是在2.6.34中修复了 你还有遇到?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants