Java.security.NoSuchAlgorithmException:SHA1PRNG SecureRandom Not available

Source: Internet
Author: User
Tags addchild

Q long time no use MyEclipse10, today opened to see the previous university project, in the TOMCAT7 launch, I cha, error:

severe:exception initializing random number generator using algorithm [SHA1PRNG] Java.security.NoSuchAlgorithmException:SHA1PRNG SecureRandom not available at    Sun.security.jca.GetInstance.getInstance (Unknown source) at Java.security.SecureRandom.getInstance (Unknown source) At Org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom (Sessionidgeneratorbase.java:210) at Org.apache.catalina.util.SessionIdGeneratorBase.getRandomBytes (Sessionidgeneratorbase.java:174) at Org.apache.catalina.util.StandardSessionIdGenerator.generateSessionId (Standardsessionidgenerator.java: 34) at Org.apache.catalina.util.SessionIdGeneratorBase.generateSessionId (Sessionidgeneratorbase.java:167) at Org.apache.catalina.util.SessionIdGeneratorBase.startInternal (Sessionidgeneratorbase.java:256) at Org.apache.catalina.util.LifecycleBase.start (Lifecyclebase.java:145) at Org.apache.catalina.session.ManagerBase.startInternal (Managerbase.java:714) at Org.apache.catalina.session.StandardManager.startInternal (Standardmanager.java:461) at Org.apache.catalina.util.LifecycleBase.start (Lifecyclebase.java:145) at Org.apache.catalina.core.StandardContext.startInternal (Standardcontext.java:5643) at Org.apache.catalina.util.LifecycleBase.start (Lifecyclebase.java:145) at Org.apache.catalina.core.ContainerBase.addChildInternal (Containerbase.java:899) at Org.apache.catalina.core.ContainerBase.addChild (Containerbase.java:875) at Org.apache.catalina.core.StandardHost.addChild (Standardhost.java:35W) at Org.apache.catalina.startup.HostConfig.deployDirectory (Hostconfig.java:1260) at Org.apache.catalina.startup.hostconfig$deploydirectory.run (Hostconfig.java:2002) at Java.util.concurrent.executors$runnableadapter.call (Unknown Source) at Java.util.concurrent.futuretask$syn C.innerrun (Unknown source) at Java.util.concurrent.FutureTask.run (Unknown source) at Java.util.concurrent.ThreadPool Executor.runworker (Unknown source) at Java.util.concurrent.threadpoolexecutor$worker.run (Unknown source) at Java.lan G.thread.run (Unknown Source)

See this error, confused, never seen this error, thought is Tomcat7 's sake, and change bit tomcat6, after launch, I fork, there is an error:

severe:cannot Find message associated with key managerBase.digestjava.security.NoSuchAlgorithmException:MD5 MessageDigest not available at sun.security.jca.GetInstance.getInstance (Unknown Source) at java.security.Security.ge Timpl (Unknown source) at Java.security.MessageDigest.getInstance (Unknown source) at Org.apache.catalina.session.Mana Gerbase.getdigest (Managerbase.java:478) at Org.apache.catalina.session.ManagerBase.generateSessionId (Managerbase.java:1220) at Org.apache.catalina.session.StandardManager.start (Standardmanager.java:636) at Org.apache.catalina.core.ContainerBase.setManager (Containerbase.java:448) at Org.apache.catalina.core.StandardContext.start (Standardcontext.java:4665) at Org.apache.catalina.core.ContainerBase.addChildInternal (Containerbase.java:803) at Org.apache.catalina.core.ContainerBase.addChild (Containerbase.java:780) at Org.apache.catalina.core.StandardHost.addChild (Standardhost.java:583) at Org.apache.catalina.startup.HostConfig.deployDescriptor (Hostconfig.java:676) at Org.apache.catalina.startup.HostConfig.deployDescriptors (Hostconfig.java:30W) at Org.apache.catalina.startup.HostConfig.deployApps (Hostconfig.java:503) at Org.apache.catalina.startup.HostConfig.start (Hostconfig.java:1322) at Org.apache.catalina.startup.HostConfig.lifecycleEvent (Hostconfig.java:325) at Org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent (Lifecyclesupport.java:142) at Org.apache.catalina.core.ContainerBase.start (Containerbase.java:1069) at Org.apache.catalina.core.StandardHost.start (Standardhost.java:822) at Org.apache.catalina.core.ContainerBase.start (Containerbase.java:1061) at Org.apache.catalina.core.StandardEngine.start (Standardengine.java:463) at Org.apache.catalina.core.StandardService.start (Standardservice.java:525) at Org.apache.catalina.core.StandardServer.start (Standardserver.java:759) at Org.apache.catalina.startup.Catalina.start (Catalina.java:595) at Sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at Sun.reflect.NativeMethodAccessorImpl.invoke (Unknown source) at Sun.reflect.DelegatingMethodAccessorImpl.invoke (Unknown source) at Java.lang.reflect.Method.invo Ke (Unknown Source) at Org.apache.catalina.startup.Bootstrap.start (Bootstrap.java:289) at Org.apache.catalina.startup.Bootstrap.main (Bootstrap.java:414)

Then, simply remove the project, separate start Tomcat6 and tomcat7, I fork, or the same error, this shows that the original project is no problem, that is the reason for MyEclipse10 and Tomcat.

Because Tomcat6 and TOMCAT7 rely on JDK7, it is unclear why this was reported, but Tomcat6 and tomcat7 in Eclipse can use JDK7. So, the TOMCAT6 and Tomcat7 rely on the JDK7 for MyEclipse10 bring JDK6, restart Tomcat, I fork, really no problem.

Java.security.NoSuchAlgorithmException:SHA1PRNG SecureRandom Not available

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.