Getting an Invalid Context Key on LDAP Login for ALM?

  • Questions
  • Getting an Invalid Context Key on LDAP Login for ALM?
Question ID: 105294

We are getting the following error upon attempted logins to the ALM system:
Failed to Login;
Invalid context key;

Stack Trace:
com.mercury.optane.core.CTdException: Invalid context key
at com.mercury.optane.core.web.RequestsDispatcher.execute(
wrapped in com.mercury.optane.core.CTdException: Failed to Login
at com.mercury.optane.core.web.RequestsDispatcher.execute(
at javax.servlet.http.HttpServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at com.hp.qc.core.utils.gzipfilter.GZIPFilter.doFilter(

This is happening for all users. Any suggestions would be appreciated.


Marked as spam
Posted by (Questions: 324, Answers: 17)
Asked on February 6, 2014 12:19 pm
Answers (1)
Private answer

Hi HomerJ,

I see that the issue looks to be related to your LDAP installation, as this has been my experience in the past that something has changed within the LDAP settings and is not generally a QC/ ALM related issue. I would attempt the following to hopefully resolve the issue (starting at step one and continuing until the issue is resolved):

1) I would check with you IT department to see if anything has changed with your passwords and LDAP server, since you said that all users were affected. (If there have been changes to the LDAP server settings, if you cannot log in, you might be able to correct them within the DB under the qc_siteadmin_db project under the PARAM table, edit the settings for the LDAP corrections and restart the servers to correct the changes.)

2) Restart the servers, the DB server first, and once it is up and running restart the App server (more than likely the APP server is the only one needing the restart, but this way you can insure that both are freshly restarted and running correctly.

3) If the prior 2 steps didn't resolve the issues, then you can follow the procedure for changing the log in authentication from LDAP to QC Authentication:

Change the PARAM_NAME variable value for the qcsiteadmin_db database
1. In the qcsiteadmin_db database, find the PARAMS table.
2. Look for the record where PARAM_NAME = 'Authentication'. Change the PARAM_VALUE to 'QualityCenter'.
3. Look for records where PARAM_NAME starts with 'LDAP', and delete all of them except one 'LDAP_SEARCH_USER_CRITIRIA'.
4. Restart the Quality Center service using the Quality Center icon in system tray.

You should be able to log in using old Site Administrator user/password.

After this you can then access site admin and correct the settings that are incorrect to change your authentication settings back to LDAP.

I hope this helps.


Marked as spam
Posted by (Questions: 0, Answers: 718)
Answered on February 6, 2014 12:32 pm
Hi Dan, Thanks a ton. We followed your steps and in the end it was as you correctly guessed a LDAP configuration issue that had changed within IT and was set up differently on the QC side. All is working now, thanks.
( at February 6, 2014 12:33 pm)
You're welcome. Glad that worked or you.
( at February 6, 2014 12:34 pm)