Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger


Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Heres one;
Im doing a simple LDAP query - the code work fine as an application (using java.exe).
when I cut and paste the function into an applet I get:
Cannot instantite class:com.sun.jndi.Ldap.LdapCtxFactory.
As I mentioned before, the application can find it - why can't the applet???
heres the method code;
private String sortLDAP()
Hashtable env = new Hashtable();
env.put(Context.PROVIDER_URL, " my ldap server");

DirContext ctx = new InitialDirContext(env);
Attributes answer = ctx.getAttributes("cn = barry, ou=spc, ou=sc");

for (NamingEnumeration ae = answer.getAll(); ae.hasMore()
Attribute attr = (Attribute);
sDesc += "attribute: " + attr.getID() + "\n";
for (NamingEnumeration e = attr.getAll(); e.hasMore()
sDesc += "value: " + + "\n" ;

catch(NamingException e)
sDesc="Exception Thrown: \n" + e.getMessage();
return sDesc;
any help would be brilliant:
Mike B
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Mike B",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.
Creativity is allowing yourself to make mistakes; art is knowing which ones to keep. Keep this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic