I am doing a lookup of the Object in the Sun One LDAP and getting the exception given below:
javax.naming.NamingException: problem generating object using object factory [Root
exception is java.lang.IllegalAccessException: Class javax.naming.spi.NamingManager can
not access a member of class com.ldap.java.LDAPFactory with modifiers "public"]; remaining
name cn=favorite,dc=xxx,dc=abc,dc=cdf'
The exception is thrown in the code given below where "Read Object back":
Fruit fruit = new Fruit("orange", "sweet and sour");
// Perform bind
ctx.bind("cn=favorite,dc=xxx,dc=abc,dc=cdf", fruit);
logger.info("Entry bind...Complete");
// Read object back
Object f2 = ctx.lookup("cn=favorite,dc=xxx,dc=abc,dc=cdf");
logger.info("Fruit = " + f2);
// Read attributes to see encoding
Attributes attrs =
ctx.getAttributes("cn=favorite,dc=xxx,dc=abc,dc=cdf");
logger.info("Atrributes = " + attrs);
// Close the context when we're done
ctx.close()
Can someone tell me what is wrong in the code?
--
Tks Bharat