Java 更新 1.6.0_26 导致 SOAP 异常 - NoClassDefFoundError:无法初始化 FastInfosetReflection [英] Java Update 1.6.0_26 Causes SOAP Exception - NoClassDefFoundError:Could not initialize FastInfosetReflection

查看:16
本文介绍了Java 更新 1.6.0_26 导致 SOAP 异常 - NoClassDefFoundError:无法初始化 FastInfosetReflection的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个向 Web 服务发出 SOAP 请求的小程序.它没有证书或特殊的安全考虑,只有一个基本的小程序和网络服务.在几台计算机上将 Java 更新到 1.6.0_26 后,我可以毫无疑问地说更新会导致以下异常.(以前的 Java 版本仍然有效)

I have an applet that makes a SOAP request to a web service. It has no certificates or special security considerations, just a basic applet and webservice. After updating Java on a few computers to 1.6.0_26 I can say without a doubt that the update causes the following exception. (Previous versions of Java still work)

com.sun.xml.internal.messaging.saaj.soap.MessageImpl saveChanges
SEVERE: SAAJ0540: Error during saving a multipart message
com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Error during saving a multipart message
at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.call(Unknown Source)

...

java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.internal.messaging.saaj.util.FastInfosetReflection
   at com.sun.xml.internal.messaging.saaj.util.transform.EfficientStreamingTransformer.transform(Unknown Source)
   at com.sun.xml.internal.messaging.saaj.soap.impl.EnvelopeImpl.output(Unknown Source)
   at com.sun.xml.internal.messaging.saaj.soap.impl.EnvelopeImpl.output(Unknown Source)
   at com.sun.xml.internal.messaging.saaj.soap.SOAPPartImpl.getContentAsStream(Unknown Source)
   at com.sun.xml.internal.messaging.saaj.soap.MessageImpl.getHeaderBytes(Unknown Source)
   at com.sun.xml.internal.messaging.saaj.soap.MessageImpl.saveChanges(Unknown Source)
   at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.post(Unknown Source)
   at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.call(Unknown Source)

有谁知道是什么导致了这种情况或有任何解决方法吗?

Does anyone know what is causing this or have any workarounds?

如有必要,我可以发布更长的异常堆栈跟踪.

If necessary, I have a longer exception stack trace that I can post.

谢谢.

推荐答案

这是来自 http://java.net/node/701033

我必须知道我需要对小程序使用的所有 .jar 文件进行签名,并且它们都必须使用相同的证书进行签名(即,即使我使用的库文件已经签名 - 但由其他签名授权 - 我需要使用与我用来签署小程序的 main-jar 相同的证书重新签署它们).之后,小程序现在可以正常启动,并且不会尝试访问任何非法的系统属性,也不会尝试定位任何丢失的类从而避免这些异常.

I had to learn that I need to sign ALL .jar files that the applet uses AND they all have to be signed with the same certificate (i.e. even though the library files I were using WERE already signed - but by an other signing authority - I needed to re-sign them with the same certificate that I use to sign the applet's main-jar). After that the applet now starts up fine and does not try to access any illegal system property nor does it try to locate any missing class thereby avoiding these exceptions.

我不是 100% 肯定这是否是先决条件:在尝试让它运行的过程中,我还迁移到了最新的 Java 6 JRE(即对于 Sun JRE 是 1.6.0_17,对于 IBM JRE,将是 1.6.0sr7).

I am not 100% positive whether that's a prereq or not: in the process of trying to get this running I also migrated to the very latest Java 6 JRE (i.e. for Sun JRE that's 1.6.0_17, for an IBM JRE that would be 1.6.0sr7).

通过这两个步骤,我的小程序现在可以正常工作,使用 SOAP 与服务器进行通信,并且它与提到的两个 JRE 都可以正常工作.

With these both steps my applet is now working fine using SOAP to communicate with the server and it does so with both mentioned JREs.

HTH,

这篇关于Java 更新 1.6.0_26 导致 SOAP 异常 - NoClassDefFoundError:无法初始化 FastInfosetReflection的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆