莫名的java.lang.VerifyError错误!

测试例子:
[code]
public class DaoAgent extends BaseDaoAgent{
public DaoAgent(){
this.initialize(TestDAO.class);
}

public static void main(String[] args){
DaoAgent agent=new DaoAgent();
}
[/code]
initialize是通过Reflect获得指定类所需方法存储到Hashtable
实现如下
[code]
protected void initialize(Class clazz) {
try {
if (ComDAO.class.isAssignableFrom(clazz)) {
Object instance = ReflectUtils.objectInstance(clazz);
Method[] methods = instance.getClass().getMethods();
for (int i = 0; i < methods.length; i++) {
if(ComOutput.class.isAssignableFrom(methods[i].getReturnType())){
daoMapping.put(methods[i].getName(), instance);
}
}
} else {
throw new SystemException("初始化异常,类{0}必须继承于ComDAO!",new String[]{clazz.getName()});
}
} catch (Exception e) {
throw new SystemException("初始化异常",e);
}

}
[/code]

TestDAO类
[code]
public class TestDAO extends ComDAO {
...
public ComOutput getShowNum() throws Exception{
....
}
...
[/code]
以上代码在Eclipse写的工具类,测试没问题,但在Jbuilder2006用该工具类测试有以下怪现状:
1)在Jbuilder开发环境测试出现java.lang.VerifyError
//Exception in thread "main" java.lang.VerifyError: (class: example/TestDAO, method: getShowNum signature: ()Lcom//util/ComOutput;) Incompatible object argument for function call
2)当getShowNum()方法直接return null;测试通过
2)自己在Eclipse测试的时候完全没问题
3)JDK版本也一致
郁闷,这个问题折腾了我一下午...
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值