JRockit 8.1 SP1 - Unable to use DirectoryContext APIs - fails to load net.dll - unsatisfiedLinkError - CR125239 (Doc ID 774057.1)

Last updated on NOVEMBER 05, 2016

Applies to:

Oracle JRockit / JRockit / 8,1
Information in this document applies to any platform

Goal

DESCRIPTION:
The following program will fail in JRockit with the unsatisfied link error:

import java.util.*;
import javax.naming.*;
import javax.naming.directory.*;

public class ldaptest {

public static void main(String args[])throws Exception{
		System.loadLibrary("net");
		Hashtable env = new Hashtable();
		env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
		env.put(Context.SECURITY_PROTOCOL, "DIGEST-MD5");
		env.put(Context.PROVIDER_URL, "ldap:///dc=pacificas,dc=jnj,dc=com");
		env.put(Context.SECURITY_PRINCIPAL, "CN=xxx,OU=Service Accounts,OU=JANBE,DC=pacificas,DC=jnj,DC=com");
		env.put(Context.SECURITY_CREDENTIALS, "xxx");
		DirContext context = new InitialDirContext(env);
		System.out.println("context is : "+context);

}

}

CONFIGURATION:
JRockit 8.1.0 with Service Pack 1

Solution

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