Java 更新 1.6.0_26 导致 SOAP 异常 - NoClassDefFoundError:无法初始化 FastInfosetReflection

发布于 2024-11-16 20:36:21 字数 1467 浏览 4 评论 0原文

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

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)

有谁知道是什么原因造成的或有任何解决方法吗?

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

谢谢。

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.

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

尐偏执 2024-11-23 20:36:21

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

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

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

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

HTH,

迈克尔

This was from http://java.net/node/701033

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.

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).

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,

Michael

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文