`
sjsky
  • 浏览: 918215 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

java.security.ProviderException: nextBytes() failed

阅读更多
    blog迁移至:http://www.micmiu.com

在Solaris系统下调用webservices时报如题的异常,之前程序运行一直是好的没有任何异常发生 ,只是修改了部分逻辑代码从新执行就发生了这样的悲剧。
PS:详细的错误代码贴在了文章最后
从google等搜索的资料看基本说的是由于系统本身产生随机数UUID()引起的问题,从而分析出这个异常的发生应该不是所写程序引起的,与操作系统本身的环境参数设置有关系,正好碰到同事说这台机器最近为了其他功能的运用,重新设置过一些random链接,和之前的分析基本一致,大概肯定了这次异常是由于系统设置更改引起的。所以赶紧恢复了之前的链接设置,调用webservices,经观察没有发生问题一切正常了,下面是详细的恢复过程:
PS:好在上次链接参数更改时同事做了备份,不然就悲剧了
下面是Unix恢复设置的详细过程:
bash-2.03# ls -Fl *random
lrwxrwxrwx   1  root  other 22 Sep  7 17:24 random -> /usr/kernel/drv/random*
lrwxrwxrwx   1  root  other 22 Sep  7 17:24 urandom -> /usr/kernel/drv/random*
bash-2.03# rm -f *random
bash-2.03# ln -s random ../devices/pseudo/random@0:random
ln: cannot create ../devices/pseudo/random@0:random: File exists
bash-2.03# ln -s ../devices/pseudo/random@0:random random
bash-2.03# ln -s ../devices/pseudo/random@0:urandom urandom
bash-2.03# ls -Fl *random
lrwxrwxrwx 1 root other 33 Sep 9 12:03 random -> ../devices/pseudo/random@0:random
lrwxrwxrwx 1 root other 33 Sep 9 12:03 urandom -> ../devices/pseudo/random@0:random


详细的错误代码:
java.security.ProviderException: nextBytes() failed
	at sun.security.provider.NativePRNG$RandomIO.implNextBytes(NativePRNG.java:270)
	at sun.security.provider.NativePRNG$RandomIO.access$200(NativePRNG.java:108)
	at sun.security.provider.NativePRNG.engineNextBytes(NativePRNG.java:97)
	at java.security.SecureRandom.nextBytes(SecureRandom.java:433)
	at java.util.UUID.randomUUID(UUID.java:162)
	at com.sun.xml.internal.ws.encoding.MtomCodec.createConteTypeHeader(MtomCodec.java:102)
	at com.sun.xml.internal.ws.encoding.MtomCodec.<init>(MtomCodec.java:93)
	at com.sun.xml.internal.ws.encoding.SOAPBindingCodec.<init>(SOAPBindingCodec.java:179)
	at com.sun.xml.internal.ws.encoding.SOAPBindingCodec.<init>(SOAPBindingCodec.java:170)
	at com.sun.xml.internal.ws.api.BindingID$SOAPHTTPImpl.createEncoder(BindingID.java:415)
	at com.sun.xml.internal.ws.binding.BindingImpl.createCodec(BindingImpl.java:127)
	at com.sun.xml.internal.ws.client.WSServiceDelegate.createPipeline(WSServiceDelegate.java:435)
	at com.sun.xml.internal.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceDelegate.java:628)
	at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:331)
	at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:313)
	at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:295)
	at javax.xml.ws.Service.getPort(Service.java:92)
	at ResDispatcherClient.ref.BusinessWebserviceImplService.getBusinessWebserviceImplPort(BusinessWebserviceImplService.java:53)
	at service.ResIService.callByData(ResIService.java:215)
	at service.ResWebService.callByData(ResWebService.java:42)
	at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.sun.xml.internal.ws.api.server.InstanceResolver$1.invoke(InstanceResolver.java:235)
	at com.sun.xml.internal.ws.server.InvokerTube$2.invoke(InvokerTube.java:135)
	at com.sun.xml.internal.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:246)
	at com.sun.xml.internal.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:82)
	at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Fiber.java:587)
	at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Fiber.java:546)
	at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Fiber.java:531)
	at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Fiber.java:428)
	at com.sun.xml.internal.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:232)
	at com.sun.xml.internal.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:460)
	at com.sun.xml.internal.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:233)
	at com.sun.xml.internal.ws.transport.http.server.WSHttpHandler.handleExchange(WSHttpHandler.java:95)
	at com.sun.xml.internal.ws.transport.http.server.WSHttpHandler.handle(WSHttpHandler.java:80)
	at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:65)
	at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:65)
	at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:68)
	at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:555)
	at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:65)
	at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:527)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.EOFException: /dev/[u]random closed?
	at sun.security.provider.NativePRNG$RandomIO.readFully(NativePRNG.java:187)
	at sun.security.provider.NativePRNG$RandomIO.ensureBufferValid(NativePRNG.java:247)
	at sun.security.provider.NativePRNG$RandomIO.implNextBytes(NativePRNG.java:261)
	... 44 more
1
0
分享到:
评论

相关推荐

    Gateway error 20190620.docx

    com.oracle.pgbu.pdi.provider.ProviderException: Unifier return code is 707. [null] at com.oracle.pgbu.pdi.unifierprovider.project.UnifierProjectSaveStep.save(UnifierProjectSaveStep.java:277) at ...

    Android 中Failed to read key from keystore解决办法

    Android 中Failed to read key from keystore解决办法 Caused by: org.gradle.tooling.BuildException: Failed to read key from keystore at ...

    超级有影响力霸气的Java面试题大全文档

    超级有影响力的Java面试题大全文档 1.抽象: 抽象就是忽略一个主题中与当前目标无关的那些方面,以便更充分地注意与当前目标有关的方面。抽象并不打算了解全部问题,而只是选择其中的一部分,暂时不用部分细节。...

    JAVA 程序员面试必备的32个要点

    ### JAVA程序员面试必备的32个要点详解 #### 1. final、finally、finalize 的区别 - **final**: 用于声明变量、方法或类时,表示该元素是不可变的。例如,当一个变量被声明为final时,则该变量不能重新赋值;如果是...

    ServletJSP数据库的笔试及面试题.docx

    Servlet/JSP 是基于 Java 的 Web 应用程序开发技术,广泛应用于 Web 服务器端开发。以下是Servlet/JSP 相关的知识点: 应用服务器 在 Java EE 规范中,应用服务器是指实现了 Java EE 规范的服务器软件。常见的应用...

    JAVA程序员常见的面试题

    ### JAVA程序员常见的面试题解析 #### 一、final, finally, finalize 的区别 - **final**: 关键字“final”在 Java 中有多种用途。它可以用于声明类、方法或变量。当一个类被声明为 final 时,它不能被继承。如果...

Global site tag (gtag.js) - Google Analytics