java.lang.VerifyError的

时间:2010-08-09 08:29:41

标签: java

我在J2EE容器中偶尔会收到以下错误。这是容器起床的一段时间,没有任何问题,有时候容器没有出现,因为这个错误,有没有人看到过这个错误......?可能是什么原因..?它涉及任何类加载器/安全问题..?

java.lang.VerifyError: (class: com/rsa/authagent/authapi/realmstat/AUTHav, method: a signature: (Lcom/rsa/authagent/authapi/authmsg/AUTHa0;)V) catch_type not a subclass of Throwable
        at java.lang.Class.getDeclaredFields0(Native Method)
        at java.lang.Class.privateGetDeclaredFields(Class.java:2259)
        at java.lang.Class.getDeclaredField(Class.java:1852)
        at java.io.ObjectStreamClass.getDeclaredSUID(ObjectStreamClass.java:1582)
        at java.io.ObjectStreamClass.access$700(ObjectStreamClass.java:52)
        at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:408)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:400)
        at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:297)
        at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:531)
        at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552)
        at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
        at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
        at com.rsa.authagent.authapi.realmstat.AUTHi.j(Unknown Source)
        at com.rsa.authagent.authapi.realmstat.AUTHi.<init>(Unknown Source)
        at com.rsa.authagent.authapi.realmstat.AUTHh.<init>(Unknown Source)
        at com.rsa.authagent.authapi.realmstat.AUTHg.<init>(Unknown Source)
        at com.rsa.authagent.authapi.AuthSessionFactory.a(Unknown Source)
        at com.rsa.authagent.authapi.AuthSessionFactory.<init>(Unknown Source)
        at com.rsa.authagent.authapi.AuthSessionFactory.getInstance(Unknown Source)
        at netx.esf.authentication.rsa.service.RsaAuthenticationServiceImpl.instantiateRsaAPI(RsaAuthenticationServiceImpl.java:1050)
        at netx.esf.authentication.rsa.service.RsaAuthenticationServiceImpl.start(RsaAuthenticationServiceImpl.java:73)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at arch.service.beans.RepBasedServiceBean.onMessage(RepBasedServiceBean.java:108)
        at arch.service.beans.RepBasedServiceImpl.onMessage(RepBasedServiceImpl.java:202)
        at arch.service.beans.RepBasedServiceImpl.message(RepBasedServiceImpl.java:229)
        at arch.CORBA.service.ServicePOA.local_message(ServicePOA.java:188)
        at arch.CORBA.Transport.sendLocalRequest(Transport.java:447)
        at arch.transport.StubProxy.send_managed_request(StubProxy.java:364)
        at arch.transport.StubProxy.invoke(StubProxy.java:205)
        at $Proxy15.start(Unknown Source)
        at arch.service.beans.RepositoryBasedServiceFactory.startDeployable(RepositoryBasedServiceFactory.java:423)
        at arch.service.beans.ServiceContainer$ServiceStarter.run(ServiceContainer.java:1392)
        at arch.service.beans.ServiceContainer$ThreadPool._run(ServiceContainer.java:2934)
        at arch.util.ThreadPool._runLoopBody(ThreadPool.java:213)
        at arch.util.ThreadPool._runForThread(ThreadPool.java:230)
        at arch.util.ThreadPool.access$000(ThreadPool.java:3)
        at arch.util.ThreadPool$1.run(ThreadPool.java:95)

2 个答案:

答案 0 :(得分:2)

AUTHav.class已损坏(有时?)。显然,某些方法被声明为抛出不是Throwable的子类的东西。通常这不应该发生,因为Java编译器会检测到该问题并报告错误。但也许类文件被修改/检测,甚至在运行时生成,这引入了偶发错误。或者你有一个命名冲突,并且classloaded偶尔会看到一个不同的非Throwable类而不是预期的类。

如果某个档案中包含AUTHav.class,您可以查看字节代码(使用javap或反编译器)并检查是否找到了可疑throws的方法参数。


所以字节代码被混淆了......那么它可能是 - 这只是猜测 - 你的J2EE容器中有多个版本的库。由于类是混淆的,因此类名AUTHa7和/或AUTHa1有可能用于不同版本库中的不同(原始)类。然后,如果类加载器在错误的时间拾取了两个或者错误的一个,那么可能会发生AUTHa7和/或AUTHa1在运行时不是例外...

答案 1 :(得分:1)

我的猜测:错误的硬件,特别是RAM,导致JVM损坏字节码。通常它会导致彻底的JVM崩溃,但它肯定值得一试:

Memtest86+