When testing the generic REST collector (
Collectors > {
Collector type} > {
Collector name} >
Test), the following error occurs:
Unexpected response content type received. Expected content type is: application/json but received:{1}
Check logs for details.
Image description
The Request Headers in the collector definition are configured as follows:
Image description
The following error is logged to the
aveksaServer.log file (
$AVEKSA_HOME/wildfly/standalone/log/aveksaServer.log):
04/30/2020 17:08:43.611 ERROR (ApplyChangesPerformQueryThread-372)
[com.aveksa.client.genericrest.postprocessor.impl.GenericRESTPostprocessorImpl]
Unexpected response content type: { Expected: application/json, Received: , Response Content: {"d":{"results":[{"__metadata": ...
...
04/30/2020 17:08:43.613 ERROR (ApplyChangesPerformQueryThread-372)
[com.aveksa.collector.generic.rest.adc.GenericRESTAccountDataReader]
Error in Test Rest API: com.aveksa.client.genericrest.GenericRestException: UNEXPECTED_RESPONSE_CONTENT_TYPE application/json
at com.aveksa.client.genericrest.GenericRestException.connectionError(GenericRestException.java:108)
Please refer to RSA Knowledge Base Article
000030327 -- Artifacts to gather in RSA Identity Governance & Lifecycle to find the location of the
aveksaServer.log file for your specific deployment if you are on a WildFly cluster or a non-WildFly platform. The
aveksaServer.log may also be downloaded from the RSA Identity Governance & Lifecycle user interface (
Admin >
System >
Server Nodes tab > under
Logs.)
This error may occur when the data source returns a response header in lowercase, i.e.
content-type. The RSA Identity Governance & Lifecycle collector incorrectly expects the response header to be in camelCase, i.e.
Content-Type.
An example of a datasource that returns a lowercase response header is SAP as seen when using a software development tool such as
Postman to test the API:
Image description
This issue is resolved in the following versions.
- RSA Identity Governance & Lifecycle 7.2.0 P02
- RSA Identity Governance & Lifecycle 7.2.1
Note that the "Unexpected response content type error" occurs whenever the error response does not match the expected type. This article only documents one such instance of this error. Unless all the symptoms match this article, you do not have this issue.