Question

3
Replies
77
Views
Close popover
Maarten Veger (MaartenBPM)
BPM Company
Managing Consultant & Pega CLSA
BPM Company
NL
MaartenBPM Member since 2013 11 posts
BPM Company
Posted: July 13, 2018
Last activity: July 16, 2018
Closed

NullPointerException in log when Pega REST service gets a HEAD http message

I configured uptimerobot.com to monitor a REST service that we provide from Pega 7.3.1. They send a GET and HEAD http message each 5 minutes to the service URL. I noticed that the HEAD message generates a NullPointerException in the log and I'd like to avoid that.

I know that Service REST rules support only the GET, POST, PUT and DELETE methods. But I did some testing from Postman and found these responses on the HTTP methods:

Methods that return a 501 Not Implemented status code: PATCH, COPY, LINK, UNLINK, PURGE, LOCK, UNLOCK, PROPFIND & VIEW. These messages will not be registered if you enable service monitoring;
Methods that return a 500 Internal Server Error status code: HEAD & OPTIONS. Only a HEAD message will be registered when service monitoring is enabled.

So my conclusion is that HEAD and OPTIONS are implemented but are not customizable.

My main question is: Is it possible to avoid a NullPointerException with a HEAD message?

See the log with some extra debug logs in. The bold line will be generated with regular log level settings.

2018-07-13 09:04:38,964 [p-apr-8080-exec-1368] [ STANDARD] [ ] [ ] ( internal.services.ServiceAPI) DEBUG <RemovedHostFromLogMessage> - Constructing alert for messageId PEGA0011
2018-07-13 09:04:38,964 [p-apr-8080-exec-1368] [ STANDARD] [ ] [ ] ( internal.services.ServiceAPI) DEBUG <RemovedHostFromLogMessage> - Enabling alert for messageId PEGA0011
2018-07-13 09:04:38,964 [p-apr-8080-exec-1368] [ STANDARD] [ ] [ ] ( internal.services.ServiceAPI) INFO <RemovedHostFromLogMessage>|Rest|Abillity|API|customers - Processing service request...
2018-07-13 09:04:38,965 [p-apr-8080-exec-1368] [ STANDARD] [ ] [ ] ( internal.services.ServiceAPI) DEBUG <RemovedHostFromLogMessage>|Rest|Abillity|API|customers - entering postLockCleanup()
2018-07-13 09:04:38,965 [p-apr-8080-exec-1368] [ STANDARD] [ ] [ ] ( internal.services.ServiceAPI) ERROR <RemovedHostFromLogMessage>|Rest|Abillity|API|customers - Rest service [Abillity][API][customers] failed::java.lang.NullPointerException

2018-07-13 09:04:38,965 [p-apr-8080-exec-1368] [ STANDARD] [ ] [ ] ( internal.services.ServiceAPI) DEBUG <RemovedHostFromLogMessage> - leaving postLockCleanup()

Data Integration Cloud Services
Moderation Team has archived post,
Close popover This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.