开发者

Java Update 1.6.0_26 Causes SOAP Exception - NoClassDefFoundError:Could not initialize FastInfosetReflection

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开发者_C百科.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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜