You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by sh...@tcs.com on 2005/06/16 16:22:08 UTC

LDAP Authentication: exception

Hi 
        I created the following schema in my LDAP server(OpenLDAP):

dn: cn=Vipul Ramani, ou=LP, o=ORG
homePhone: 800-555-1313
givenName: Vipul
mobile: 800-555-1318
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
userPassword:: e1NIQX1xVXFQNWN5eG02WWNUQWh6MDVIcGg1Z3Z1OU09
facsimileTelephoneNumber: 800-555-3318
ou: LP
uid: vipul
mail: VRamani@isp.com
cn: Vipul Ramani
initials: Joe
telephoneNumber: (800)555-1214
pager: 800-555-1319
destinationIndicator: /bios/images/cRamani.jpg
o: ORG
st: TX
l: Dallas
postalAddress: 2908 Greenville Ave.
sn: Ramani
homePostalAddress: 14 Cherry Ln.$Plano TX 78888
title: Developemnt Engineer

As per my LDAP server configuration file:
rootdn=Manager
rootpwd=test
 
My LDAP.properties for my application in 
<publication_directory>/config/ac/properties is as:
provider-url=ldap://172.17.127.60:389/o=ORG
base-dn=o=ORG
usr-branch=ou=LP
usr-attr=uid
usr-name-attr=sn
usr-authentication=simple
domain-name=
security-authentication=simple
mgr-dn=Manager
mgr-pw=test

There is no ssl being used.

I made the following changes in ac.xconf:
.....
<accreditable-manager type="file">
    <parameter name="directory" 
value="context:///lenya/pubs/NEW-PUB/config/ac/passwd"/>

    <user-manager>
       <user-type class="org.apache.lenya.ac.file.FileUser" 
create-use-case="userAddUser">Local User</user-type>
       <!-- uncomment the following line if you want LDAP support -->
       <user-type class="org.apache.lenya.ac.ldap.LDAPUser" 
create-use-case="userAddUserLdap">LDAP User</user-type>
    </user-manager>
  </accreditable-manager>
....
...
After restarting the servlet container, I logged into my publication as 
administrator and tried creating LDAP user after clicking on the 
respective button in 'User Creation' module. After entering the user 
credentials with UID and CMS UID as 'vipul' and pressing submit, I get the 
following error:
org.apache.avalon.framework.CascadingRuntimeException: uncaught JavaScript 
exception: at addUser 
(file:/D:/apache-src/lenya-1.2.3/build/lenya/webapp/lenya/content/admin/users/user-admin.js, 
Line 373): org.apache.lenya.ac.AccessControlException: Exception during 
search: 


I tried debug the error but was in vain.

Can anyone please let me know what can be the possible solution(s) to 
rectify the same? ASAP.


Thanks and regards 
 
Shishir Bhasker Saxena
Mailto: shishir.saxena@tcs.com



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

Re: LDAP Authentication: exception-resolved:comments

Posted by sh...@tcs.com.
Hi Wolfgang 
 
        I downloaded the browser and found that the connection with LDAP 
server was stable and it was able to authenticate the user. Thanks.

After drilling down in to the problem further, we came to the conclusion 
that the ldap.properties file was incomplete. Thus, we were able to 
resolve the issue.
Although there is a sample referral file(ldap.properties.sample) for 
configuring a publication to LDAP authentication, I would like to share 
with the user list that the following parameters are mandatory to exist in 
the ldap.properties:

provider-url (LDAP server ip and port no.) along with root directory : 
non-empty
base-dn (Base Domain Name) : non-empty
mgr-dn (Directory manager name along with domain name) : can be empty for 
anonymous binding
mgr-pw (Password for above field): can be empty for anonymous binding
usr-branch (Subtree entry if want to search in particular subtree): Can be 
empty if want to search all the subtrees but note that base-dn entry 
should exist.
security-protocol (Entry for protocol type for secure authentication): Can 
be empty if secure authentication is not enabled
security-authentication (Entry for type of LDAP authentication; can be ' 
anonymous' if password need not be checked i.e. anonymous binding else the 
default is 'simple'): Non-empty

Hence, the property file(ldap.properties) for unitemplate publication 
looks like:
provider-url=ldap://172.17.127.60:389/o=ORG
base-dn=o=ORG
mgr-dn=cn=Manager,o=ORG
mgr-pw=test
usr-branch=
security-protocol=
security-authentication=simple

Thanks again for all you help Wolfgang.

Regards
Shishir 




shishir.saxena@tcs.com schrieb:
> 
> (...)
> authenticate failed for principal uid=vipul,ou=LP,o=ORG, exception 
> javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid 
> Credentials]

This is an error from the LDAP server.
Either you provided the bad password (or the password is encoded in a 
different format than expected), or the software performing the 
authentication does not have enough rights to perform the authentication.


 > (...)
> # Password of Manager
> mgr-pw=test

Is the password accurate ? Note that you do not necessarily need to set 
this for OpenLDAP, you can use anonymous bindings (if this is configured 
in your server)

> (...)
> Are we missing any parameters either in properties file or, if you can 
> suggest, in the schema(we are new to LDAP)?

Not that I can see. Obviously, you need to make sure that your OpenLDAP 
is configured correctly to allow users to authenticate with their 
password.

I recommend you get LDAP authentication to work independently of Lenya 
first. Try an LDAP browser, for example
http://www-unix.mcs.anl.gov/~gawor/ldap/
Once a user can authenticate in such a GUI, you should get it to work in 
Lenya as well.


--
Wolfgang

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


ForwardSourceID:NT00003C1E 


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

Re: LDAP Authentication: exception

Posted by "J. Wolfgang Kaltz" <ka...@interactivesystems.info>.
shishir.saxena@tcs.com schrieb:
> 
> (...)
> authenticate failed for principal uid=vipul,ou=LP,o=ORG, exception 
> javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid 
> Credentials]

This is an error from the LDAP server.
Either you provided the bad password (or the password is encoded in a 
different format than expected), or the software performing the 
authentication does not have enough rights to perform the authentication.


 > (...)
> # Password of Manager
> mgr-pw=test

Is the password accurate ? Note that you do not necessarily need to set 
this for OpenLDAP, you can use anonymous bindings (if this is configured 
in your server)

> (...)
> Are we missing any parameters either in properties file or, if you can 
> suggest, in the schema(we are new to LDAP)?

Not that I can see. Obviously, you need to make sure that your OpenLDAP 
is configured correctly to allow users to authenticate with their password.

I recommend you get LDAP authentication to work independently of Lenya 
first. Try an LDAP browser, for example
http://www-unix.mcs.anl.gov/~gawor/ldap/
Once a user can authenticate in such a GUI, you should get it to work in 
Lenya as well.


--
Wolfgang

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: LDAP Authentication: exception

Posted by sh...@tcs.com.
Hi Wolfgang
 
        Thanks for all your responses. We are gradually moving ahead with 
configuring LDAP to Lenya but still are not able to implement it 
completely. We are successfull in adding a LDAP user(University User for 
Unitemplate Publication). After providing access for a page to this user 
through Site Mgmt., we are not able to authenticate this user although we 
are providing the accurate credentials. The front end says 'Authentication 
Failed'. The log says:

authenticate failed for principal uid=vipul,ou=LP,o=ORG, exception 
javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid 
Credentials]
Is Authenticated:false


We hope that we are making correct entries in ldap.properties as the user 
is getting added. The ldap.properties is as:
 provider-url=ldap://172.17.127.60:389/ou=LP,o=ORG
# Manager/user which is allowed to retrieve a list of "all" users 
(fullname) from LDAP server
mgr-dn=cn=Manager,o=ORG
# Password of Manager
mgr-pw=test
usr-branch=ou=LP
partial-user-dn=ou=LP,o=ORG
# keystore is taken relatively to the publication config/ac directory
#key-store=.keystore
#security-protocol=none
key-store=
security-protocol=
security-authentication=simple

I am resending the schema for the user(uid=vipul, userPassword=test):
dn: cn=Vipul Ramani, ou=LP, o=ORG
homePhone: 800-555-1313
givenName: Vipul
mobile: 800-555-1318
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
userPassword:: e1NIQX1xVXFQNWN5eG02WWNUQWh6MDVIcGg1Z3Z1OU09
facsimileTelephoneNumber: 800-555-3318
ou: LP
uid: vipul
mail: VRamani@isp.com
cn: Vipul Ramani
initials: Joe
telephoneNumber: (800)555-1214
pager: 800-555-1319
destinationIndicator: /bios/images/cRamani.jpg
o: ORG
st: TX
l: Dallas
postalAddress: 2908 Greenville Ave.
sn: Ramani
homePostalAddress: 14 Cherry Ln.$Plano TX 78888
title: Developemnt Engineer

Are we missing any parameters either in properties file or, if you can 
suggest, in the schema(we are new to LDAP)?

Thanks in advance. 

Regards
Shishir
 




shishir.saxena@tcs.com schrieb:
> (...)  The ldap.properties
> now looks like:
> 
> provider-url=ldap://172.17.127.60:389/ou=LP,o=ORG
> 
> # 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

this only makes sense if you actually have a user branch ou=LP in your 
LDAP directory. So your users would be underneath ou=LP,ou=LP,o=ORG - 
this is probably not what you want. So the setting
   usr-branch=
is probably right.

> The exception I am now receiving is:
> javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such 
> Object] (...)

At least LDAP is working, and it is responding to you saying that it did 
not find your entry.
What does an entry in your directory for an existing user in your LDAP 
actually look like ?

Also, for the exception you'll need to look further down, to find out 
what exactly caused the exception (I assume it's the search in LDAP for 
the id you typed in for the new user creation in Lenya)

I suggest you provide us with
- the complete ldap.properties file
- an example of an existing user path in your LDAP
- the complete exception stacktrace

--
Wolfgang

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


ForwardSourceID:NT00003A52 


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

Re: LDAP Authentication: exception

Posted by "J. Wolfgang Kaltz" <ka...@interactivesystems.info>.
shishir.saxena@tcs.com schrieb:
> (...)  The ldap.properties
> now looks like:
> 
> provider-url=ldap://172.17.127.60:389/ou=LP,o=ORG
> 
> # 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

this only makes sense if you actually have a user branch ou=LP in your 
LDAP directory. So your users would be underneath ou=LP,ou=LP,o=ORG - 
this is probably not what you want. So the setting
   usr-branch=
is probably right.

> The exception I am now receiving is:
> javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such 
> Object] (...)

At least LDAP is working, and it is responding to you saying that it did 
not find your entry.
What does an entry in your directory for an existing user in your LDAP 
actually look like ?

Also, for the exception you'll need to look further down, to find out 
what exactly caused the exception (I assume it's the search in LDAP for 
the id you typed in for the new user creation in Lenya)

I suggest you provide us with
- the complete ldap.properties file
- an example of an existing user path in your LDAP
- the complete exception stacktrace

--
Wolfgang

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: LDAP Authentication: exception

Posted by sh...@tcs.com.
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=ldap://172.17.127.60:389/ou=LP,o=ORG

# 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:
> shishir.saxena@tcs.com 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: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


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

Re: LDAP Authentication: exception

Posted by "J. Wolfgang Kaltz" <ka...@interactivesystems.info>.
J. Wolfgang Kaltz schrieb:
> shishir.saxena@tcs.com 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: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: LDAP Authentication: exception

Posted by "J. Wolfgang Kaltz" <ka...@interactivesystems.info>.
shishir.saxena@tcs.com schrieb:
> 
> Wolfgang
>         I am receiving the same error after deploying the unitemplate 
> publication.
> 
>  I am sorry to write ldap.properties as LDAP.properties in my mail.
> 
> After browsing the mail archives, I got a patch posted by Markus 
> Anwander (dated:12-10-2004) and in that thread I was able to read your 
> comments also. I downloaded that patch now and changed my 
> ldap.properties as:

No, if you are using Lenya 1.2.3 then you don't need to consider any 
patches, they have been integrated. Refer only to the 
ldap.properties.sample for examples, not to examples from the patches, 
they are not up-to-date.

If I comment out the "provider-url" in ldap.properties, I get exactly 
the error you are mentioning. If the "provider-url" is present, you do 
not get this error. So your error is definitely coming from the fact 
that Java can not read the "provider-url" property in your ldap.properties

Maybe there is a problem with the file format, line endings or 
something. It looks like Java does not read this file properly, to 
convert the entries into java.util.Properties. Under which OS are you 
working ? Try to recreate the file with some native editor to your OS.


--
Wolfgang

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: LDAP Authentication: exception

Posted by sh...@tcs.com.
Wolfgang
        I am receiving the same error after deploying the unitemplate 
publication.

 I am sorry to write ldap.properties as LDAP.properties in my mail. 

After browsing the mail archives, I got a patch posted by Markus Anwander 
(dated:12-10-2004) and in that thread I was able to read your comments 
also. I downloaded that patch now and changed my ldap.properties as:

provider-url=ldap://172.17.127.60:389/
base-dn=o=ORG
# Manager/user which is allowed to retrieve a list of "all" users 
(fullname) from LDAP server
#mgr-dn=cn=Manager,o=People,ou=FooOrg,dc=foodomain,dc=com
#mgr-dn=cn=Manager,o=ORG

# Password of Manager
#mgr-pw=test
mgr-dn=anonymous
mgr-pw=none
security-authentication=none

### Attribute-name of User Partition (Lenya-User)
usr-attr=uid

### Authentication for Lenya-User
user-authentication=simple

#partial-user-dn=ou=LP,o=ORG
# keystore is taken relatively to the publication config/ac directory
#key-store=.keystore
#security-protocol=ssl 


The  error now I am receiving is:
org.apache.avalon.framework.CascadingRuntimeException: uncaught JavaScript 
exception: at addUser 
(file:/mnt/coe2/lenya/src/lenya-1.2.3/build/lenya/webapp/lenya/content/admin/users/user-admin.js, 
Line 373): org.apache.lenya.ac.AccessControlException: Exception during 
search: 
cause: java.io.EOFException: SSL peer shut down incorrectly

Am I required to make further more changes?

Thanks
Shishir 





shishir.saxena@tcs.com 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.


--
Wolfgang

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


ForwardSourceID:NT00003962 


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

Re: LDAP Authentication: exception

Posted by "J. Wolfgang Kaltz" <ka...@interactivesystems.info>.
shishir.saxena@tcs.com 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.


--
Wolfgang

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: LDAP Authentication: exception

Posted by sh...@tcs.com.
Thanks Wolfgang for the prompt reply. There is no exception as such being 
displayed even in the logs. I am just pasting parts of the stack trace:

org.apache.avalon.framework.CascadingRuntimeException: 
"file:/D:/apache-src/lenya-1.2.3/build/lenya/webapp/lenya/content/admin/users/user-admin.js", 
line 373: uncaught JavaScript exception: 
at addUser 
(file:/D:/apache-src/lenya-1.2.3/build/lenya/webapp/lenya/content/admin/users/user-admin.js, 
Line 373):
org.apache.lenya.ac.AccessControlException: Exception during search: 
        at 
org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.handleContinuation(FOM_JavaScriptInterpreter.java:853)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:123)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:107)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:138)

...
...

at 
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1123)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358)
        at 
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
........

Caused by: org.apache.lenya.ac.AccessControlException: Exception during 
search: 
        at org.apache.lenya.ac.ldap.LDAPUser.existsUser(LDAPUser.java:144)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
..........

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


Thanks in advance
Shishir 





shishir.saxena@tcs.com schrieb:
> ...
> After restarting the servlet container, I logged into my publication as 
> administrator and tried creating LDAP user after clicking on the 
> respective button in 'User Creation' module. After entering the user 
> credentials with UID and CMS UID as 'vipul' and pressing submit, I get 
> the following error:
> org.apache.avalon.framework.CascadingRuntimeException: uncaught 
> JavaScript exception: at addUser 
> 
(file:/D:/apache-src/lenya-1.2.3/build/lenya/webapp/lenya/content/admin/users/user-admin.js, 

> Line 373): org.apache.lenya.ac.AccessControlException: Exception during 
> search:
> 
> 
> I tried debug the error but was in vain.

What is the exception ? It should be printed after the information you 
pasted ("Exception during search:"). If not, check in the log file what 
the actual Exception is.


--
Wolfgang

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


ForwardSourceID:NT00003956 


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

Re: LDAP Authentication: exception

Posted by "J. Wolfgang Kaltz" <ka...@interactivesystems.info>.
shishir.saxena@tcs.com schrieb:
> ...
> After restarting the servlet container, I logged into my publication as 
> administrator and tried creating LDAP user after clicking on the 
> respective button in 'User Creation' module. After entering the user 
> credentials with UID and CMS UID as 'vipul' and pressing submit, I get 
> the following error:
> org.apache.avalon.framework.CascadingRuntimeException: uncaught 
> JavaScript exception: at addUser 
> (file:/D:/apache-src/lenya-1.2.3/build/lenya/webapp/lenya/content/admin/users/user-admin.js, 
> Line 373): org.apache.lenya.ac.AccessControlException: Exception during 
> search:
> 
> 
> I tried debug the error but was in vain.

What is the exception ? It should be printed after the information you 
pasted ("Exception during search:"). If not, check in the log file what 
the actual Exception is.


--
Wolfgang

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org