Unexpected character ('-' (code 45)) in numeric value

Shailendra_Ch
edited October 8, 2017 in Documentum #1

Hello,

I'm trying to make POST API call using custom REST client code. On execution I'm getting the 400 status code and following error message


{"status":400,"code":"E_INPUT_MESSAGE_NOT_READABLE","message":"The input message is not readable.","details":"Error in parsing the JSON into object class: class com.rest.model.ApplicationSearch;Unexpected character ('-' (code 45)) in numeric value: expected digit (0-9) to follow minus sign, for valid numeric value\n at [Source: org.apache.catalina.connector.CoyoteInputStream@4feed296; line: 1, column: 3]"}

Following is my JSON string


String json="{\"properties\" : {\"document_type\": \"LoanApplication\"}}";

This is no "-" in the JSON string. Only "_" is there.

Can anyone tell me what needs to be done to resolve this error.

Thanks.

Tagged:

Comments

  • abc123
    edited October 8, 2017 #2

    The sample request payload you posted here did not show a relation to the error cause. It might be better if you could dump the request / response messages together with the logs.

    • Set DEBUG logging level in dctm-rest.war\WEB-INF\classes\log4j.properties

      log4j.logger.com.emc.documentum.rest.log=DEBUG

    • Set message logging enabled in dctm-rest.war\WEB-INF\classes\rest-api-runtime.properties

      rest.message.logging.enabled=true

  • I am getting the same error. Please let me know how you resolved the same

    Vinod Krishna
    Architect, Consulting Services
    OpenText