Graphql Endpoint got this "details": "Cannot invoke \"Object.getClass()\" because \"value\" is null" error | Community
Skip to main content
New Participant
May 22, 2025
Solved

Graphql Endpoint got this "details": "Cannot invoke \"Object.getClass()\" because \"value\" is null" error

  • May 22, 2025
  • 4 replies
  • 971 views

I have created a GraphQL endpoint on the author instance, and it works fine there. I’ve also published the GraphQL endpoint and the content fragment to the AEM publish instance. But when I try to access the GraphQL endpoint on the publish instance, I see the following errors. I already confirm that the endpoint is already published

AEM Version - AEM CLOUD

{
"errors": [
{
"errorType": "ServletError",
"message": "Internal Servlet Failure",
"details": "Cannot invoke \"Object.getClass()\" because \"value\" is null"
}
]
}

This is the error. 
Is there a clue where I need to check this ?

Best answer by PRATHYUSHA_VP

Hi @fendy_ 

 

Verify all the references in content fragment model and publish all CF models and authored fragments.

As you already mentioned endpoint is published, please verify if endpoint is accessible in publish instance. 

 

Hope this helps

 

 

4 replies

EstebanBustamante
New Participant
May 23, 2025

Hi, 

Chances are a Content Fragment Model is missing on the Publisher, which is why it’s returning null—it just can’t find the object. Make sure all the necessary models and their references are published. You can double-check this using the Repository Browser. https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/developer-tools/repository-browser

 

Hope this helps

Esteban Bustamante
PRATHYUSHA_VP
PRATHYUSHA_VPAccepted solution
New Participant
May 23, 2025

Hi @fendy_ 

 

Verify all the references in content fragment model and publish all CF models and authored fragments.

As you already mentioned endpoint is published, please verify if endpoint is accessible in publish instance. 

 

Hope this helps

 

 

Aditya_Chabuku
New Participant
May 22, 2025

Hi @fendy_ ,

 

As a General precaution, try

  1. Re-Publishing CF Model, Content Fragment even though they were published already. 
  2. Review logs via the Cloud Manager > Developer Console > Logs (Publish).
  3. Refer this page -thttps://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/headless/graphql-api/graphql-endpoint#publishing-graphql-endpoint 
  4. Go to https://<publish-url>/content/graphql/global/endpoint-name.graphql  and check if it was published and not returning 404 error.
Thanks,Aditya Chabuku
Asheesh_Pandey
New Participant
May 22, 2025

Moving to AEM community for review.