Discussion

NullPointer Exception while running activity

While loggin into Pega sometimes I am getting NullPointer exception.
This is happening quiet often once in every 4 tries.
I am using custom authentication and getting this error from the authentication activity. here are the logs

2009-12-22 01:45:07,735 [fault (self-tuning)'] [ STANDARD] [ CS:01.01.01] ( pegarules.services.HttpAPI) DEBUG 10.15.26.204|10.244.16.106 sba1 - Adding HTTP header = pxHandler:
2009-12-22 01:45:12,858 [fault (self-tuning)'] [ STANDARD] [ :] ( pegarules.services.HttpAPI) DEBUG 10.15.26.204|10.239.64.130 - [ Locale info for: STANDARD ]
2009-12-22 01:45:12,858 [fault (self-tuning)'] [ STANDARD] [ :] ( pegarules.services.HttpAPI) DEBUG 10.15.26.204|10.239.64.130 - LstReq: en_US
2009-12-22 01:45:12,858 [fault (self-tuning)'] [ STANDARD] [ :] ( pegarules.services.HttpAPI) DEBUG 10.15.26.204|10.239.64.130 - Specif: null
2009-12-22 01:45:12,858 [fault (self-tuning)'] [ STANDARD] [ :] ( pegarules.services.HttpAPI) DEBUG 10.15.26.204|10.239.64.130 - Client: en_US
2009-12-22 01:45:12,858 [fault (self-tuning)'] [ STANDARD] [ :] ( pegarules.services.HttpAPI) DEBUG 10.15.26.204|10.239.64.130 - Thread: en_US
2009-12-22 01:45:15,355 [fault (self-tuning)'] [ STANDARD] [ :] (hentication.AuthenticationUtil) ERROR 10.15.26.204|10.239.64.130 - Problem executing activity: Code-Security.PayPalAnA
java.lang.NullPointerException
at com.pega.pegarules.priv.LogHelper.lhEncodeStringMap(LogHelper.java:1334)
at com.pega.pegarules.priv.LogHelper.doAlert(LogHelper.java:950)
at com.pega.pegarules.priv.LogHelper.alert(LogHelper.java:831)
at com.pega.pegarules.priv.LogHelper.alert(LogHelper.java:817)
at com.pega.pegarules.engine.database.DatabasePreparedStatement.executeQuery(DatabasePreparedStatement.java:323)
at com.pega.pegarules.engine.database.Opener.openData(Opener.java:518)
at com.pega.pegarules.engine.database.DatabaseImpl.open(DatabaseImpl.java:2967)
at com.pega.pegarules.engine.database.DatabaseImpl.open(DatabaseImpl.java:2787)
at com.pega.pegarules.engine.database.DatabaseImpl.open(DatabaseImpl.java:2774)
at com.pega.pegarules.authorization.access.AccessCacheEntry.load(AccessCacheEntry.java:849)
at com.pega.pegarules.authorization.access.AccessCacheEntry.build(AccessCacheEntry.java:930)
at com.pega.pegarules.authorization.context.LegacyContext.getAccess(LegacyContext.java:236)
at com.pega.pegarules.authorization.access.AccessEvaluator.haveAccess(AccessEvaluator.java:96)
at com.pega.pegarules.authorization.Authorization.haveAccess(Authorization.java:1254)
at com.pega.pegarules.engine.runtime.Executable.doActivity(Executable.java:3051)
at com.pegarules.generated.activity.ra_action_paypalana_9134ae3f0e4fec2f98ccab2fe6b5252c.step7_circum0(ra_action_paypalana_9134ae3f0e4fec2f98ccab2fe6b5252c.java:776)
at com.pegarules.generated.activity.ra_action_paypalana_9134ae3f0e4fec2f98ccab2fe6b5252c.perform(ra_action_paypalana_9134ae3f0e4fec2f98ccab2fe6b5252c.java:110)
at com.pega.pegarules.engine.runtime.Executable.doActivity(Executable.java:3080)
at com.pega.pegarules.authentication.AuthenticationUtil.runActivity(AuthenticationUtil.java:133)
at com.pega.pegarules.authentication.SchemePRCustom.authenticateOperator(SchemePRCustom.java:630)
at com.pega.pegarules.authentication.Authentication.doAuthentication(Authentication.java:259)
at com.pega.pegarules.services.HttpAPI.handleAuthentication(HttpAPI.java:1197)
at com.pega.pegarules.services.EngineAPI.activityExecutionProlog(EngineAPI.java:360)
at com.pega.pegarules.services.EngineAPI.processRequestInner(EngineAPI.java:323)
at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.pega.pegarules.engine.context.PREnvironment.doWithRequestorLocked(PREnvironment.java:909)
at com.pega.pegarules.engine.context.PREnvironment.doWithRequestorLocked(PREnvironment.java:674)
at com.pega.pegarules.services.EngineAPI.processRequest(EngineAPI.java:259)
at com.pega.pegarules.services.HttpAPI.invoke(HttpAPI.java:497)
at com.pega.pegarules.etier.impl.EngineImpl._invokeEngine_privact(EngineImpl.java:280)
at com.pega.pegarules.etier.impl.EngineImpl.invokeEngine(EngineImpl.java:231)
at com.pega.pegarules.etier.ejb.EngineBean.invokeEngine(EngineBean.java:224)
at sun.reflect.GeneratedMethodAccessor104.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:254)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:295)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingException(PRBootstrap.java:317)
at com.pega.pegarules.internal.etier.ejb.EngineBeanBoot.invokeEngine(EngineBeanBoot.java:162)
at com.pega.pegarules.internal.etier.ejb.EngineBMT_h449u3_ELOImpl.invokeEngine(EngineBMT_h449u3_ELOImpl.java:65)
at com.pega.pegarules.priv.context.JNDIEnvironment.invokeEngineInner(JNDIEnvironment.java:274)
at com.pega.pegarules.priv.context.JNDIEnvironment.invokeEngine(JNDIEnvironment.java:219)
at com.pega.pegarules.web.impl.WebStandardImpl.makeEtierRequest(WebStandardImpl.java:307)
at com.pega.pegarules.web.impl.WebStandardImpl.doPost(WebStandardImpl.java:201)
at sun.reflect.GeneratedMethodAccessor113.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:254)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:295)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:344)
at com.pega.pegarules.internal.web.servlet.WebStandardBoot.doPost(WebStandardBoot.java:93)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3395)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
2009-12-22 01:45:15,355 [fault (self-tuning)'] [ STANDARD] [ :] ( pegarules.services.HttpAPI) ERROR 10.15.26.204|10.239.64.130 - 10.239.64.130: com.pega.pegarules.pub.PRRuntimeException
com.pega.pegarules.pub.PRRuntimeException: PRRuntimeException
at com.pega.pegarules.authentication.SchemePRCustom.authenticateOperator(SchemePRCustom.java:633)
at com.pega.pegarules.authentication.Authentication.doAuthentication(Authentication.java:259)
at com.pega.pegarules.services.HttpAPI.handleAuthentication(HttpAPI.java:1197)
at com.pega.pegarules.services.EngineAPI.activityExecutionProlog(EngineAPI.java:360)
at com.pega.pegarules.services.EngineAPI.processRequestInner(EngineAPI.java:323)
at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.pega.pegarules.engine.context.PREnvironment.doWithRequestorLocked(PREnvironment.java:909)
at com.pega.pegarules.engine.context.PREnvironment.doWithRequestorLocked(PREnvironment.java:674)
at com.pega.pegarules.services.EngineAPI.processRequest(EngineAPI.java:259)
at com.pega.pegarules.services.HttpAPI.invoke(HttpAPI.java:497)
at com.pega.pegarules.etier.impl.EngineImpl._invokeEngine_privact(EngineImpl.java:280)
at com.pega.pegarules.etier.impl.EngineImpl.invokeEngine(EngineImpl.java:231)
at com.pega.pegarules.etier.ejb.EngineBean.invokeEngine(EngineBean.java:224)
at sun.reflect.GeneratedMethodAccessor104.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:254)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:295)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingException(PRBootstrap.java:317)
at com.pega.pegarules.internal.etier.ejb.EngineBeanBoot.invokeEngine(EngineBeanBoot.java:162)
at com.pega.pegarules.internal.etier.ejb.EngineBMT_h449u3_ELOImpl.invokeEngine(EngineBMT_h449u3_ELOImpl.java:65)
at com.pega.pegarules.priv.context.JNDIEnvironment.invokeEngineInner(JNDIEnvironment.java:274)
at com.pega.pegarules.priv.context.JNDIEnvironment.invokeEngine(JNDIEnvironment.java:219)
at com.pega.pegarules.web.impl.WebStandardImpl.makeEtierRequest(WebStandardImpl.java:307)
at com.pega.pegarules.web.impl.WebStandardImpl.doPost(WebStandardImpl.java:201)
at sun.reflect.GeneratedMethodAccessor113.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:254)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:295)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:344)
at com.pega.pegarules.internal.web.servlet.WebStandardBoot.doPost(WebStandardBoot.java:93)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3395)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
Caused by: java.lang.NullPointerException
at com.pega.pegarules.priv.LogHelper.lhEncodeStringMap(LogHelper.java:1334)
at com.pega.pegarules.priv.LogHelper.doAlert(LogHelper.java:950)
at com.pega.pegarules.priv.LogHelper.alert(LogHelper.java:831)
at com.pega.pegarules.priv.LogHelper.alert(LogHelper.java:817)
at com.pega.pegarules.engine.database.DatabasePreparedStatement.executeQuery(DatabasePreparedStatement.java:323)
at com.pega.pegarules.engine.database.Opener.openData(Opener.java:518)
at com.pega.pegarules.engine.database.DatabaseImpl.open(DatabaseImpl.java:2967)
at com.pega.pegarules.engine.database.DatabaseImpl.open(DatabaseImpl.java:2787)
at com.pega.pegarules.engine.database.DatabaseImpl.open(DatabaseImpl.java:2774)
at com.pega.pegarules.authorization.access.AccessCacheEntry.load(AccessCacheEntry.java:849)
at com.pega.pegarules.authorization.access.AccessCacheEntry.build(AccessCacheEntry.java:930)
at com.pega.pegarules.authorization.context.LegacyContext.getAccess(LegacyContext.java:236)
at com.pega.pegarules.authorization.access.AccessEvaluator.haveAccess(AccessEvaluator.java:96)
at com.pega.pegarules.authorization.Authorization.haveAccess(Authorization.java:1254)
at com.pega.pegarules.engine.runtime.Executable.doActivity(Executable.java:3051)
at com.pegarules.generated.activity.ra_action_paypalana_9134ae3f0e4fec2f98ccab2fe6b5252c.step7_circum0(ra_action_paypalana_9134ae3f0e4fec2f98ccab2fe6b5252c.java:776)
at com.pegarules.generated.activity.ra_action_paypalana_9134ae3f0e4fec2f98ccab2fe6b5252c.perform(ra_action_paypalana_9134ae3f0e4fec2f98ccab2fe6b5252c.java:110)
at com.pega.pegarules.engine.runtime.Executable.doActivity(Executable.java:3080)
at com.pega.pegarules.authentication.AuthenticationUtil.runActivity(AuthenticationUtil.java:133)
at com.pega.pegarules.authentication.SchemePRCustom.authenticateOperator(SchemePRCustom.java:630)
... 47 more

Can someone help me on this

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Comments

Keep up to date on this post and subscribe to comments

December 22, 2009 - 9:05am

As a PRPC professional, you *have* to be able to look at a stack trace and determine which line is useful (It's not on any of the exams AFAIK, but it should be.) This is it:

at com.pegarules.generated.activity.ra_action_paypalana_9134ae3f0e4fec2f98ccab2fe6b5252c.step7_circum0(ra_action_paypalana_9134ae3f0e4fec2f98ccab2fe6b5252c.java:776)

Naturally, you've opened up the PRGenJava folder, found this file, and had a look at line 776...?

Jon