Java: RESOURCE_MODIFIED in updateFormFields
Hi folks,
I am using the Java SDK for years now, it was working and I didn’t change anything on my site. Now (since about 2 weeks or more) I have the following problem:
After creating an Agreement and setting it to state AUTHORING I want to update the form fields. The relevant part in my code including debugging additions is this:
try {
agreementsApi.updateFormFields(authorization, etag, id, formFieldPutInfo, xApiUser, xOnBehalfOfUser);
} catch (Exception e) {
agreementInfoHTTP = agreementsApi.getAgreementInfoWithHttpInfo(authorization, id, xApiUser, xOnBehalfOfUser, ifNoneMatch);
etag = agreementInfoHTTP.getHeaders().get("etag").get(0);
System.out.println("etag: " + etag);
throw(e);
}
However this now leads to an ‘io.swagger.client.model.ApiException: Precondition Failed’ and returns ‘{"code":"RESOURCE_MODIFIED","message":"Resource is already modified with newer version"}’.
When using the GET /agreements/{agreementId} here with authorization and agreement id I get the exact same ETag in the Header as I get from my Java Code. The result body is:
{
"id": "CBJ...",
"name": "...",
"groupId": "CBJ...",
"type": "AGREEMENT",
"workflowId": "CBJ...",
"message": "...",
"participantSetsInfo": [
{
"id": "CBJ...",
"memberInfos": [
{
"email": "...",
"deliverableEmail": true,
"name": "...",
"id": "CBJ...",
"securityOption": {
"authenticationMethod": "NONE",
"identityCheckInfo": {}
},
"status": "ACTIVE",
"extendedStatus": "ACTIVE"
}
],
"role": "SIGNER",
"order": 1,
"label": "Signer"
}
],
"senderEmail": "...",
"createdDate": "2026-03-24T09:52:02Z",
"lastEventDate": "2026-03-24T09:52:05Z",
"signatureType": "ESIGN",
"ccs": [
{
"email": "...",
"label": "Cc"
}
],
"locale": "de_DE",
"status": "AUTHORING",
"documentVisibilityEnabled": false,
"hasFormFieldData": false,
"hasSignerIdentityReport": false,
"agreementSettingsInfo": {
"canEditFiles": false,
"canEditElectronicSeals": false,
"canEditAgreementSettings": false,
"showAgreementReminderSentEvents": false,
"hipaaEnabled": false,
"showDocumentsViewedEvents": false
},
"sendType": "REGULAR_SEND",
"senderSigns": "NEVER",
"createdGroupId": "CBJ...",
"documentRetentionApplied": false
}What can I do?
