sun.security.pkcs11.wrapper.PKCS11Exception: CKR_FUNCTION_NOT_SUPPORTED (Doc ID 1565500.1)

Last updated on JUNE 09, 2016

Applies to:

Oracle WebLogic Server - Version 10.3.5 to 10.3.6
Oracle Solaris on SPARC (64-bit)

Symptoms

When trying to create an InitialContext to a solaris machine using weblogic.jndi.WLInitialContextFactory running the following code:

public static void main(String[] args) throws Exception
{
Hashtable environment = new Hashtable();

 environment.put( Context.PROVIDER_URL, "t3://servername:8080" );
 environment.put( Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory" );
InitialContext ctx = new InitialContext( environment );
}
}

the following stacktrace is generated:

Exception in thread "main" java.lang.ExceptionInInitializerError
  at weblogic.rjvm.LocalRJVM.getLocalRJVM(LocalRJVM.java:72)
  at weblogic.rjvm.JVMID.(JVMID.java:373)
  at weblogic.rjvm.JVMID.setLocalClientID(JVMID.java:146)
  at weblogic.rjvm.JVMID.localID(JVMID.java:110)
  at weblogic.protocol.LocalServerIdentity$SingletonMaker.(LocalServerIdentity.java:13)
  at weblogic.protocol.LocalServerIdentity.getIdentity(LocalServerIdentity.java:20)
  at weblogic.server.channels.BasicServerChannelImpl.createDefaultServerChannel(BasicServerChannelImpl.java:629)
  at weblogic.rjvm.t3.client.ProtocolHandlerT3$ChannelInitializer.(ProtocolHandlerT3.java:37)
  at weblogic.rjvm.t3.client.ProtocolHandlerT3.getDefaultServerChannel(ProtocolHandlerT3.java:42)
  at weblogic.protocol.ServerChannelManager$SingletonMaker$1.getOutboundServerChannel(ServerChannelManager.java:393)
  at weblogic.protocol.ServerChannelManager.findOutboundServerChannel(ServerChannelManager.java:288)
  at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java:233)
  at weblogic.rjvm.RJVMManager.findOrCreate(RJVMManager.java:197)
  at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(RJVMFinder.java:238)
  at weblogic.rjvm.RJVMFinder.findOrCreateInternal(RJVMFinder.java:200)
  at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFin
Caused by: java.security.ProviderException: implNextBytes() failed
  at sun.security.pkcs11.P11SecureRandom.implNextBytes(P11SecureRandom.java:171)
  at sun.security.pkcs11.P11SecureRandom.engineNextBytes(P11SecureRandom.java:118)
Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_FUNCTION_NOT_SUPPORTED
  at sun.security.pkcs11.wrapper.PKCS11.C_GenerateRandom(Native Method)
  at sun.security.pkcs11.P11SecureRandom.implNextBytes(P11SecureRandom.java:168)
  ... 31 more

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms