title: Tomcat 7 fail to start giving exception: java.security.NoSuchAlgorithmException: SHA1PRNG SecureRandom not available
body: <p>hello I have a problem with my new installed tomcat 7 when I try to start it it does not start and log error on tomcat7-stderr.log with this exception:</p>
  
  <pre><code>SEVERE: Exception initializing random number generator using algorithm [SHA1PRNG] 
  java.security.NoSuchAlgorithmException: SHA1PRNG SecureRandom not available
      at sun.security.jca.GetInstance.getInstance(GetInstance.java:159)
      at java.security.SecureRandom.getInstance(SecureRandom.java:276)
      at org.apache.catalina.util.SessionIdGenerator.createSecureRandom(SessionIdGenerator.java:219)
      at org.apache.catalina.util.SessionIdGenerator.getRandomBytes(SessionIdGenerator.java:183)
      at org.apache.catalina.util.SessionIdGenerator.generateSessionId(SessionIdGenerator.java:153)
      at org.apache.catalina.session.ManagerBase.startInternal(ManagerBase.java:574)
      at org.apache.catalina.session.StandardManager.startInternal(StandardManager.java:466)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5199)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)
      at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1044)
      at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:967)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
      at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1305)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
      at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
      at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:379)
      at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:324)
      at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1041)
      at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
      at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
      at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
      at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
      at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:620)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:303)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
  
  Apr 15, 2013 2:21:47 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom
  SEVERE: Exception initializing random number generator using algorithm [SHA1PRNG] 
  java.security.NoSuchAlgorithmException: SHA1PRNG SecureRandom not available
      at sun.security.jca.GetInstance.getInstance(GetInstance.java:159)
      at java.security.SecureRandom.getInstance(SecureRandom.java:276)
      at org.apache.catalina.util.SessionIdGenerator.createSecureRandom(SessionIdGenerator.java:233)
      at org.apache.catalina.util.SessionIdGenerator.getRandomBytes(SessionIdGenerator.java:183)
      at org.apache.catalina.util.SessionIdGenerator.generateSessionId(SessionIdGenerator.java:153)
      at org.apache.catalina.session.ManagerBase.startInternal(ManagerBase.java:574)
      at org.apache.catalina.session.StandardManager.startInternal(StandardManager.java:466)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5199)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)
      at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1044)
      at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:967)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
      at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1305)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
      at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
      at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:379)
      at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:324)
      at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1041)
      at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
      at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
      at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
      at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
      at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:620)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:303)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
  
  java.lang.InternalError: internal error: SHA-1 not available.
      at sun.security.provider.SecureRandom.init(SecureRandom.java:105)
      at sun.security.provider.SecureRandom.&lt;init&gt;(SecureRandom.java:84)
      at java.security.SecureRandom.getDefaultPRNG(SecureRandom.java:191)
      at java.security.SecureRandom.&lt;init&gt;(SecureRandom.java:155)
      at org.apache.catalina.util.SessionIdGenerator.createSecureRandom(SessionIdGenerator.java:242)
      at org.apache.catalina.util.SessionIdGenerator.getRandomBytes(SessionIdGenerator.java:183)
      at org.apache.catalina.util.SessionIdGenerator.generateSessionId(SessionIdGenerator.java:153)
      at org.apache.catalina.session.ManagerBase.startInternal(ManagerBase.java:574)
      at org.apache.catalina.session.StandardManager.startInternal(StandardManager.java:466)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5199)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)
      at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1044)
      at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:967)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
      at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1305)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
      at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
      at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:379)
      at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:324)
      at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1041)
      at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
      at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
      at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
      at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
      at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:620)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:303)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
  </code></pre>
  
  <p>I tried to look for this exception but I faild to understand what it is about, I tried to reinstall tomcat but it still gives me the same error.
  so what should I do to start my tomcat?</p>
  
  <p><strong>UPDATE</strong> I am using jdk 1.7 on windows 7 32bit machine</p>