Sdata 2.0 Error in Opportunity

Hey guys,

we recently migrated data from oppos, companies and co. into a new database. 

For some reason we now see this error when trying to GET data via Sdata 2.0. 

Sdata 1.1 works fine. The get request also works fine for other entities. We only see this error when using Sdata 2.0 in opportunites. 

Anyone has an input? 

Sdata 2.0 logs didn't help us yet

{
  "$diagnoses": [
    {
      "$severity": "Error",
      "$applicationCode": "sdata613068",
      "$message": "BadRequest ",
      "$stackTrace": "sdata613068",
      "status": "BAD_REQUEST",
      "$sdataCode": "ApplicationDiagnosis"
    }
  ]
}

  • We are currently investigating the same issue and would like to know whether others have encountered a similar problem.

    In our case, the SData 2.0 request against Opportunity fails with:

    com.sage.crm.sdata2.exception.SData2Exception: java.lang.NullPointerException

    at com.sage.crm.sdata2.service.SData2ReadFeedService.createJsonPayloadForFeed(...)

    The stack trace indicates that the exception occurs during JSON payload generation rather than while retrieving the Opportunity data itself. The same request appears to work when using Atom/XML, which makes us suspect that a specific field value is causing the JSON serializer to fail.

    From our investigation so far, it looks very likely that one or more Opportunity fields (or related entities) contain invalid or missing data. However, Sage CRM does not provide enough detail in the exception to identify which field is responsible.

    Has anyone experienced a similar issue where:

    • SData 2.0 returns a NullPointerException for Opportunity records?
    • The root cause was a specific custom field or related entity?
    • There is a way to enable more detailed logging to identify the exact field causing the failure?

    At the moment, we can confirm that the exception is triggered by missing or invalid field data somewhere in the Opportunity structure, but we have not yet found a practical way to determine which field is causing the problem.

    Any suggestions or similar experiences would be greatly appreciated.

  • 0 in reply to Dominik Terhorst

    Hi All,

    So while I do not know the issue we have a Sage CRM connector in our Data Islands tool and this uses the sage rest api and generates the sdata urls for you to see from the command line

    Query Sage CRM Data - Accelerator for SageCRM

    Now using this

    we could test fields one by one easily and it might help figure things out. 

    So if you want to connect and we can help here.

  • 0

    What version of Sage CRM are you using?
    Can you provide more details on "we recently migrated data from oppos, companies and co. into a new database"?

  • 0 in reply to DGR

    We are using 2025 R2.1.
    We migrated CRM to a new, fresh installation and migrated all data from opportunites, companies, persons, users, communications and linked tables so that we can work with existing data but in a fresh enviroment (new crm installation)