我在每个受SSL保护的Webservice调用中都遇到了令人困惑的ArrayIndexOutOfBoundsException,我不知道原因是什么。该例外没有对代码进行任何相关更改,我感到困惑。
任何人都可以告诉我如何解决这个糟糕的错误吗?
环境:
堆栈跟踪:
com.sun.xml.ws.client.ClientTransportException: HTTP transport error: javax.net.ssl.SSLException: java.lang.ArrayIndexOutOfBoundsException
at com.sun.xml.ws.transport.http.client.HttpClientTransport.getOutput(HttpClientTransport.java:132)
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:256)
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:184)
at com.sun.xml.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:137)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:641)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:600)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:585)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:482)
at com.sun.xml.ws.client.Stub.process(Stub.java:323)
at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:161)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:113)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:93)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:144)
at $Proxy294.liefereKonfiguration(Unknown Source)
at at.gv.bmf.efsz.vkps.client.lieferekonfiguration.impl.LiefereKonfigurationServiceClientImpl.updateKonfReader(LiefereKonfigurationServiceClientImpl.java:279)
at at.gv.bmf.efsz.vkps.client.lieferekonfiguration.impl.LiefereKonfigurationServiceClientImpl.initiateUpdate(LiefereKonfigurationServiceClientImpl.java:205)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy293.initiateUpdate(Unknown Source)
at at.gv.bmf.efsz.vkps.client.lieferekonfiguration.impl.VKPSClientInitializer.initVKPSClient(VKPSClientInitializer.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1581)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1522)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:314)
at java.util.concurrent.FutureTask.run(FutureTask.java:149)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
at java.lang.Thread.run(Thread.java:736)
Caused by: javax.net.ssl.SSLException: java.lang.ArrayIndexOutOfBoundsException
at com.ibm.jsse2.n.a(n.java:27)
at com.ibm.jsse2.tc.a(tc.java:328)
at com.ibm.jsse2.tc.a(tc.java:386)
at com.ibm.jsse2.tc.a(tc.java:278)
at com.ibm.jsse2.tc.a(tc.java:298)
at com.ibm.jsse2.tc.startHandshake(tc.java:337)
at com.ibm.net.ssl.www2.protocol.https.c.afterConnect(c.java:23)
at com.ibm.net.ssl.www2.protocol.https.d.connect(d.java:57)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1024)
at com.ibm.net.ssl.www2.protocol.https.b.getOutputStream(b.java:56)
at com.sun.xml.ws.transport.http.client.HttpClientTransport.getOutput(HttpClientTransport.java:120)
... 54 more
Caused by: java.lang.ArrayIndexOutOfBoundsException
at com.ibm.crypto.provider.TlsPrfGenerator.a(Unknown Source)
at com.ibm.crypto.provider.TlsPrfGenerator.a(Unknown Source)
at com.ibm.crypto.provider.TlsPrfGenerator.a(Unknown Source)
at com.ibm.crypto.provider.TlsMasterSecretGenerator.engineGenerateKey(Unknown Source)
at javax.crypto.KeyGenerator.generateKey(Unknown Source)
at com.ibm.jsse2.gb.b(gb.java:268)
at com.ibm.jsse2.gb.a(gb.java:131)
at com.ibm.jsse2.hb.a(hb.java:216)
at com.ibm.jsse2.hb.a(hb.java:71)
at com.ibm.jsse2.gb.n(gb.java:142)
at com.ibm.jsse2.gb.a(gb.java:95)
at com.ibm.jsse2.tc.a(tc.java:244)
at com.ibm.jsse2.tc.g(tc.java:206)
at com.ibm.jsse2.tc.a(tc.java:165)
... 60 more
答案 0 :(得分:-1)
您似乎正在使用IBMJSSE2 Provider进行SSL通信。
有一个非常类似的问题已经修复: http://www-01.ibm.com/support/docview.wss?crawler=1&uid=swg1IV73472
APAR名称:IV73472:从TLSV1和TLSV1.1中未编写的2048位DH密钥生成的大型主要秘密
问题摘要:当使用TLSv1或TLSv1.1时,大的预主密钥 从2048位DH密钥生成的未正确哈希导出 主秘密。
本地修复:禁用使用DH / DHE密钥交换的密码套件。
问题结论:修复IBMJSSE2和IBMJCE提供程序以处理TLSv1和TLSv1.1中的大型预主密钥 相关的Hursley RTC问题报告是93670和94644 相关的Austin CMVC缺陷是116692和116765 受影响的JVM:Java 6.0,Java 626,Java 7.0,Java 727和Java 8 该修复程序是针对Java 6.0 SR16FP7,Java 626 SR8FP7提供的, Java 7.0 SR9FP10,Java 727 SR3FP10和Java 8 SR1FP10 受影响的罐子是“ibmjsseprovider2.jar”和 “ibmjceprovider.jar均”。 受影响版本的ibmjceprovider.jar的构建级别 是“20150604”。 受影响的ibmjsseprovider2.jar的构建级别 发布是“20150604”
尝试升级ibmjsseprovider2.jar库。