Question
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Huntington Bancshares Inc
US
Last activity: 12 May 2016 15:05 EDT
NullPointerException while retrieving LDAP attribute
Sporadically, getting the below error while retrieving LDAP attribute.
The Authtentication Service rule contains the Attribute mappings. The first attribute specified in the rule is retrieved successfully.
However, getting NullPointerException while retrieving the second LDAP attribute specified in the Authtentication Service rule's "Mapping" tab.
Caused by: java.lang.NullPointerException
at com.sun.jndi.ldap.LdapCtx.getSchemaEntry(LdapCtx.java:1663)
at com.sun.jndi.ldap.LdapCtx.getSchemaTree(LdapCtx.java:1572)
at com.sun.jndi.ldap.LdapCtx.c_getSchema(LdapCtx.java:1519)
at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_getSchema(ComponentDirContext.java:415)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getSchema(PartialCompositeDirContext.java:402)
at com.sun.jndi.ldap.LdapAttribute.getAttributeDefinition(LdapAttribute.java:191)
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Huntington Bancshares Inc
US
we were looping through for every LDAP attribute.
The LDAP context implementation. Implementation (library) is not thread-safe. Caller must sync as per JNDI spec.
Changed the implementation to retrieve all LDAP attributes using getAll()
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
PEG
IN
Which version of PRPC you are in? You mean to say first time you were able to login successfully and next time onwards you were facing the issue. Right?
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Huntington Bancshares Inc
US
Hi Gangababu -
Using PRPC 6.3 SP1.
The LDAP connection is always successful. But, sporadically, while retrieving the second LDAP attribute specified in the Authtentication Service rule, getting NullPointerException with those errors in PegaRULES.log
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689951000/6edb6beb-cf8e-431c-9679-ef67ce5f3aba.jpg?itok=hzTHfrBw)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689951000/6edb6beb-cf8e-431c-9679-ef67ce5f3aba.jpg?itok=hzTHfrBw)
Pegasystems Inc.
US
This does not have pega classes in it. Can you attach the full error stack?
Updated: 26 Apr 2016 3:31 EDT
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Huntington Bancshares Inc
US
2016-04-22 11:00:39,834 ERROR : H673FAC9A037B1891DA61B638F1F92D9D : http-bio-8180-exec-107 com.pega.pegarules.session.internal.engineinterface.service.HttpAPI pdlbeaapp1.<removed company name>.com|<removed IP address>: com.pega.pegarules.pub.PRRuntimeError
- com.pega.pegarules.pub.PRRuntimeError: PRRuntimeError
at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivitiesAlt(ThreadRunner.java:683)
at com.pega.pegarules.session.internal.mgmt.PRThreadImpl.runActivitiesAlt(PRThreadImpl.java:584)
at com.pega.pegarules.session.internal.engineinterface.service.HttpAPI.runActivities(HttpAPI.java:2797)
at com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequestInner(EngineAPI.java:394)
at sun.reflect.GeneratedMethodAccessor82.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:1043)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:765)
2016-04-22 11:00:39,834 ERROR : H673FAC9A037B1891DA61B638F1F92D9D : http-bio-8180-exec-107 com.pega.pegarules.session.internal.engineinterface.service.HttpAPI pdlbeaapp1.<removed company name>.com|<removed IP address>: com.pega.pegarules.pub.PRRuntimeError
- com.pega.pegarules.pub.PRRuntimeError: PRRuntimeError
at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivitiesAlt(ThreadRunner.java:683)
at com.pega.pegarules.session.internal.mgmt.PRThreadImpl.runActivitiesAlt(PRThreadImpl.java:584)
at com.pega.pegarules.session.internal.engineinterface.service.HttpAPI.runActivities(HttpAPI.java:2797)
at com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequestInner(EngineAPI.java:394)
at sun.reflect.GeneratedMethodAccessor82.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:1043)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:765)
at com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequest(EngineAPI.java:328)
at com.pega.pegarules.session.internal.engineinterface.service.HttpAPI.invoke(HttpAPI.java:720)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl._invokeEngine_privact(EngineImpl.java:312)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.invokeEngine(EngineImpl.java:263)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.invokeEngine(EngineImpl.java:240)
at com.pega.pegarules.priv.context.JNDIEnvironment.invokeEngineInner(JNDIEnvironment.java:277)
at com.pega.pegarules.priv.context.JNDIEnvironment.invokeEngine(JNDIEnvironment.java:222)
at com.pega.pegarules.web.impl.WebStandardImpl.makeEtierRequest(WebStandardImpl.java:383)
at com.pega.pegarules.web.impl.WebStandardImpl.doPost(WebStandardImpl.java:271)
at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:349)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:390)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:439)
at com.pega.pegarules.internal.web.servlet.WebStandardBoot.doPost(WebStandardBoot.java:118)
at com.pega.pegarules.internal.web.servlet.WebStandardBoot.doGet(WebStandardBoot.java:89)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.valves.CometConnectionManagerValve.invoke(CometConnectionManagerValve.java:184)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
at com.sun.jndi.ldap.LdapCtx.getSchemaEntry(LdapCtx.java:1663)
at com.sun.jndi.ldap.LdapCtx.getSchemaTree(LdapCtx.java:1572)
at com.sun.jndi.ldap.LdapCtx.c_getSchema(LdapCtx.java:1519)
at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_getSchema(ComponentDirContext.java:415)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getSchema(PartialCompositeDirContext.java:402)
at com.sun.jndi.ldap.LdapAttribute.getAttributeDefinition(LdapAttribute.java:191)
at com.pegarules.generated.activity.ra_action_webstandardldap1auth_bae78242426463ec929a2d26cf606d77.step16_circum0(ra_action_webstandardldap1auth_bae78242426463ec929a2d26cf606d77.java:1942)
at com.pegarules.generated.activity.ra_action_webstandardldap1auth_bae78242426463ec929a2d26cf606d77.perform(ra_action_webstandardldap1auth_bae78242426463ec929a2d26cf606d77.java:354)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3040)
at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivitiesAlt(ThreadRunner.java:617)
... 45 more
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Pegasystems Inc.
IN
I assume you are using replicated ldap environment to read the data from ldap. Across all the servers ldap schema might be different(may be one of the attribute which is failing to load is not defined in the schema). When the request is hitting the ldap through the load balancer some of them are giving the successful result and one of them is failing to serve the request due to inconsistent schema across the ldap environment. Please validate the schema in all the ldap servers and let me know if you find any differences.
Accepted Solution
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Huntington Bancshares Inc
US
we were looping through for every LDAP attribute.
The LDAP context implementation. Implementation (library) is not thread-safe. Caller must sync as per JNDI spec.
Changed the implementation to retrieve all LDAP attributes using getAll()