Error of "[...] is not a string" seen in audit events. How do I see the content of the context variable?
search cancel

Error of "[...] is not a string" seen in audit events. How do I see the content of the context variable?

book

Article ID: 98152

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

When I try to audit a context variable in policy, it says that "it is not a string and cannot be converted to one". How do I see the contents of the context variable in the audit event viewer when it isn't a string?

Environment

All versions of the CA API Gateway.

Resolution

When the content is not a string type, it may be of message type. The text .mainpart must be at the end of the context variable. 

Example:

If the audit viewer shows Variable 'attribute.current' is not a String and cannot be converted to one. (Actual type: com.ca.siteminder.SiteMinderContext$Attribute)

The context variable needs to be changed from ${siteminder.smcontext.attributes} to ${siteminder.smcontext.attributes.mainpart}