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

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

  • May 22, 2025
  • 4 replies
  • 974 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 ?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
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

Asheesh_Pandey
Community Advisor
Community Advisor
May 22, 2025

Moving to AEM community for review.

- Asheesh
Aditya_Chabuku
Community Advisor
Community Advisor
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
PRATHYUSHA_VP
Community Advisor
PRATHYUSHA_VPCommunity AdvisorAccepted solution
Community Advisor
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

 

 

EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
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