Wolfgang
         The null pointer exception is removed after I rewrote the properties file. Thanks for all your suggestions. The ldap.properties now looks like:

provider-url="">

# Manager/user which is allowed to retrieve a list of "all" users (fullname) from LDAP server
mgr-dn=cn=anonymous,ou=LP,o=ORG
# Password of Manager
mgr-pw=
usr-branch=ou=LP


# keystore is taken relatively to the publication config/ac directory
#key-store=.keystore
#security-protocol=none
key-store=
security-protocol=
security-authentication=simple

The exception I am now receiving is:
javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; remaining name 'ou=LP'
        at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3013)
        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2934)
        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2740)
        at com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1811)

If I rename the parameter usr-branch in the property files as :
usr-branch=
The exception I would receive is:
javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; remaining name ''
        at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3013)
        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2934)
        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2740)
        at com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1811)

And, if I remove this parameter completely from the file then the error is:
javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; remaining name 'ou=People'
 /**[pl. note that ou=People is default value in LDAPUser.java]**/
        at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3013)
        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2934)
        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2740)
        at com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1811)


Can anyone please throw some light on resolving this issue?

Regards
Shishir




J. Wolfgang Kaltz schrieb:
> [EMAIL PROTECTED] schrieb:
>
>>
>>
>> ..........
>>
>> Caused by: java.lang.NullPointerException
>>         at java.util.Hashtable.put(Hashtable.java:393)
>>         at org.apache.lenya.ac.ldap.LDAPUser.bind(LDAPUser.java:346)
>>         at
>> org.apache.lenya.ac.ldap.LDAPUser.getDirectoryEntry(LDAPUser.java:426)
>>         at
>> org.apache.lenya.ac.ldap.LDAPUser.existsUser(LDAPUser.java:137)
>>         ... 61 more
>
>
>
> Well, we can certainly improve the error handling here !
> LDAPUser.java:346 is the reading of the provider-url property, which is
> then put in the environment Hashtable. java.util.Hashtable throws a
> NullPointerException if you pass a null value.
>
> So it looks like the property "provider-url" is null. In your previous
> mail you said
>
>  > My LDAP.properties for my application ...
>
> Is your file actually named like this ? It should be ldap.properties
>
> If this is the cause of your problem, we check for file existence in the
> code prior to this.

I meant to say: "we should check for file existence", but we already do.
So it looks like you don't have a "provider-url" in your properties file.

I will add some sanity checks to the code for prettier error handling.

--
Wolfgang

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


ForwardSourceID:NT00003976    
Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you

Reply via email to