cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2932
Views
0
Helpful
5
Replies

Prime 3.8 API CRUD getEnum error

orp
Level 1
Level 1

I'm running a query of all the ClientDetails.json with pagination, and after quite a few successful queries, I get this error:

<ClientResponse(https://156.72.162.11:443/webacs/api/v4/data/ClientDetails.json?.full=true&.maxResults=250&.firstResult=18000) [500 ]>
<CIMultiDictProxy('Cache-Control': 'private', 'Expires': 'Thu, 01 Jan 1970 00:00:00 GMT', 'Set-Cookie': 'JSESSIONID=79AD54B05C167DF522949AC4ABF382CF; Path=/webacs; Secure; HttpOnly', 'Strict-Transport-Security': 'max-age=31622400; includeSubDomains', 'X-XSS-Protection': '1; mode=block', 'X-Content-Type-Options': 'nosniff', 'Content-Security-Policy': "default-src 'self' wss: https: data: 'unsafe-inline' 'unsafe-eval'", 'X-NBI-TIME': '360', 'X-Frame-Options': 'SAMEORIGIN', 'Date': 'Tue, 06 Apr 2021 08:56:46 GMT', 'Server-Timing': 'filters;dur=5;desc="Servlet filters"', 'Server-Timing': 'security;dur=927;desc="Authentication and authorization"', 'Server-Timing': 'cxf;dur=2;desc="CXF"', 'Server-Timing': 'nbi;dur=7;desc="NBI framework"', 'Server-Timing': 'db;dur=353;desc="Database access"', 'Server-Timing': 'marshalling;dur=0;desc="Response marshalling"', 'Server-Timing': 'total;dur=1294;desc="Total time"', 'Content-Type': 'application/json', 'Content-Length': '577', 'Connection': 'close', 'Server': 'Prime')>
{"errorDocument":{"httpResponseCode":500,"httpMethod":"GET","message":"errorId=12,componentName=CRUD Error Exception while invoking valueOf method 'getEnum' of enumeration class 'class com.cisco.ncs.nbi.client.SecurityPolicyEnum'","exception":"com.cisco.xmp.web.query.PersistenceException: errorId=12,componentName=CRUD Error Exception while invoking valueOf method 'getEnum' of enumeration class 'class com.cisco.ncs.nbi.client.SecurityPolicyEnum'","uriPath":"data/ClientDetails","queryParams":"{.full=[true], .maxResults=[250], .firstResult=[18000]}","domain":"ROOT-DOMAIN"}}

It looks like it always fails on the same page (firstResult=18000). Could this be a specific problematic client?

I saw a similar error in a post that said this issue was fixed in 3.5.1, but I'm running 3.8.1.

Thanks!

5 Replies 5

Olga Bozhko
Cisco Employee
Cisco Employee

Hello, 

It looks like one of the clients returns an unsupported value for policyType attribute.
You can find the full list of the supported values on the documentation page:
your-pi-ipaddress/webacs/api/v4/data/ClientDetails?_docs

Can you please check and update?

Thanks,

Is there any smart way to find the problematic client? Would it appear problematic in the UI as well?

Hello,

This entity may not appear as problematic in the UI.

You can narrow it down by changing the value of .maxResults (and .firstResult if necessary).
Also could be useful to check xmpNbiFw.log and persistence.log.

Hi,

About narrowing it down- I can never actually get the info for the actual endpoint and the order in the API doesn't tell me anything about how to find it in the UI, no? 

BTW- this sounds like a bug. If the field has specific supported types, why isn't it restricted to those values?

Hello,

You can change the values of .maxResults and .firstResult and this way get the problematic entity by a process of elimination.
Have you tried to check xmpNbiFw.log and persistence.log once the error occurs?