`
zrweng
  • 浏览: 25640 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

莫名的java.lang.VerifyError错误!

阅读更多
测试例子:
public class DaoAgent extends BaseDaoAgent{
  public DaoAgent(){
    this.initialize(TestDAO.class);
  }

  public static void main(String[] args){
      DaoAgent agent=new DaoAgent();
  }

initialize是通过Reflect获得指定类所需方法存储到Hashtable
实现如下
	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);
		}

	}


TestDAO类
public class TestDAO extends ComDAO {
    ...
    public ComOutput getShowNum() throws Exception{
    ....
   }
   ...

以上代码在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版本也一致
郁闷,这个问题折腾了我一下午...
分享到:
评论
3 楼 wuhua 2007-05-16  
肯定是jdk版本不一致
比如你用1.5的编译出来,然后去1.4运行就可能出现这样的问题。
1.4编译出来的,到1.5上运行就不会有这样的问题
2 楼 zzzzzb 2007-05-16  
今天偶也来这个就。。就是不知道怎么办。晕倒。
1 楼 zrweng 2006-09-21  
可以确定的是应该是某个jar文件冲突引起的。

相关推荐

    java 异常总结

    java.lang.Error 错误。是所有错误的基类,用于标识严重的程序运行问题。这些问题通常描述一些不应被应用程序捕获的反常情况。 java.lang.ExceptionInInitializerError 初始化程序错误。当执行一个类的静态初始化...

    java编程常见问题

    39.java.lang.VerifyError 验证错误。当验证器检测到某个类文件中存在内部不兼容或者安全问题时抛出该错误。 40.java.lang.VirtualMachineError 虚拟机错误。用于指示虚拟机被破坏或者继续执行操作所需的资源不足的...

    IKAnalyzer2012FF_hf1.zip

    IKAnalyzer是一款中文分析器,应用于Solr搜索服务当中。

    IKAnalyzer2012_FF_hf1.jar

    解决Exception in thread "main" java.lang.VerifyError: class org.wltea.analyzer.lucene.IKAnalyzer overrides final method tokenStream.(Ljava/lang/String;Ljava/io/Reader;)Lorg/apache/lucene/analysis/...

    bcprov加密库

    org.bouncycastle.openssl.PEMException: problem parsing ENCRYPTED PRIVATE KEY: java.lang.SecurityException: JCE cannot authenticate the provider BC at org.bouncycastle.openssl.PEMReader$...

    org.jasig.cas.client.util.CommonUtils

    public boolean verify(String hostname, javax.net.ssl.SSLSession session) { return true; } }; // Install the all-trusting host verifier HttpsURLConnection.setDefaultHostnameVerifier...

    code-verify.rar_code verify.com_verify

    密码验证,密码在人类的日常生活中是及其重要的,它可以保护人类的隐私,私人财产不受侵害

    仿真器程序下载

    stm32 下载器的设置资料,可以帮助轻松的设置好 仿真器 文中步骤详细,清楚,有益于新手下载器上手,

    java licence生成例子

    (java.lang.Exception e) { System.out.println("生成密钥对失败"); e.printStackTrace(); } } public byte[] getPriKey() { return priKey; } public byte[] getPubKey() { return pubKey; } } ...

    澜起4.70【1M刷机工具】中文版

    Verify burning flash... Failed to get CMD response! Failed to get CMD response! Failed to get CMD response! Failed to get CMD response! Failed to get CMD response! Failed to get CMD response! Failed ...

    802.11n-BER.rar_802.11n_ieee 802.11n_verify

    The main goal of this project is to design and simulate a wireless communication system base on ...numerical result such as bit error rate plots and verify the functionality of each block in the design.

    apksigner.jar

    Original error: Cannot verify the signature of 'C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.21.1.apk'....

    otp_verify_java.rar_OTP_OTPVerify_TOTP_otp算法_一次性 口令

    OPT一次性动态口令验证算法。根据动态支持TOTP和HOTP验证。

    msvcp90_http:90you.com/_verify_dfs_

    You are new to our forum or modify your registration Email address to use this We need to verify the validity of your email address to avoid spam or other abuse actions.To activate your email account ...

    verify公共函数(陈攀).js

    verify公共函数(陈攀).js。verify公共函数(陈攀).js。verify公共函数(陈攀).js。verify公共函数(陈攀).js。

    hello_world.vhdl.zip_verify

    A "Hello world" program is a computer program that outputs "Hello, world" on a display device. Because it is typically one ... It is also used to verify that a language or system is operating correctly.

    HTTP请求库java-requests.zip

    Java的世界里,HttpClient 是一个功能强大的Http请求库,然而接口非常复杂,设计上遵从正交性,简单的请求也需要写比较多的代码,更不要说隐藏在各种细节里面的高级用法了。Requests, 是一个模仿python requests ...

    AssetStudio.v0.15.22_verify_123123_AssetStudiov0.15.x_AssetStudi

    Needed to verify my account because of this stupid site's policy so have a random SXL mod nonces

    利用 Oracle 和 PHP 管理分布式跟踪文件

    consequently it is a sensible idea to verify that your java layer is behaving as expected before you try starting up the utility as TFMADMIN, try this exec pack_trace_file_manager.pc_generate_file_...

    zeropad.rar_verify

    verify_diskette - to verify that the floppy in the drive is the right one for suninstall. All error messages and prompts go to stderr.

Global site tag (gtag.js) - Google Analytics