Loggin issue w.r.t API portal api access in Gateway log

Document ID : KB000094889
Last Modified Date : 07/05/2018
Show Technical Document Details
Introduction:
Warning entries logged by portalman in audits
Question:
Why am i seeing below warnings

WARNING com.l7tech.server.policy.assertion.ServerSetVariableAssertion: 150: Array subscript (3) in splitUri out of range (3 values); returning no values 
WARNING com.l7tech.server.policy.assertion.ServerSetVariableAssertion: 150: Array subscript (4) in splitUri out of range (3 values); returning no values 
Environment:
Api Portal 3.5
Answer:
in /portralman/ there are a number of policy branches, 
before these particular branches, the policy splits the request URI 
then it compares the request URI with certain values (each branch checks for one set of values) the request URI specifies what function to perform, so to list all apis 
the uri is; 

/portalman/1/apis 

to list a specific api it's : 

/portalman/1/apis/<api-id> 

so before it does the check, it splits the URI into an array 
so you'd have

splitUri[0] = portalman 
splitUri[1] = 1 
splitUri[2] = apis 

but then these branches also set the variables splitUri[3] and splitUri[4] 
but if the uri was only: /portalman/1/apis 
splitUri[3] and splitUri[4] will be null, since there were only 3 "parts" to the URI, it splits it on the slash and when you try to set a variable that is "out of range", meaning splitUri variable only has 3 parts (0, 1, 2), and you're looking for a 4th or greater part 

you get this message your seeing: Array subscript (3) in splitUri out of range (3 values); returning no values 

splitUri only has 3 values in it's array, and you're trying to pull a value that is out of the range of 3 

so, since there are a number of operations that /portalman/ does (listing apis, a specific api, plans, etc.)it's expected to have some branches fail as it tries to find the matching operation 

If you don't want to see this message at all then you can set the cluster wide property log.levels with a value of 
com.l7tech.server.policy.assertion.ServerSetVariableAssertion = SEVERE 

this would prevent that message along with any other messages from the ServerSetVariableAssertion class which had a log level less than SEVERE from being generated at all. 

But again, the message your seeing is expected and by design.