cannot be correctly instantiated by the Use API | Community
Skip to main content
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 Umesh_Thakur

Hi @mohit1, There are many reason due to which you User API can not instantiated. Like your Sling model is not using injection strategy as optional, Some exception or error in your post construct method, any issue in any services that you are using into you sling model.

You log says you are getting null pointer in CommonHelper.java at line#1105.

Once you correct this, this issue will get resolved.

Hope this helps.

Umesh Thakur

4 replies

Bhuwan_B
Community Advisor
Community Advisor
December 12, 2022
Umesh_Thakur
Community Advisor
Umesh_ThakurCommunity AdvisorAccepted solution
Community Advisor
December 12, 2022

Hi @mohit1, There are many reason due to which you User API can not instantiated. Like your Sling model is not using injection strategy as optional, Some exception or error in your post construct method, any issue in any services that you are using into you sling model.

You log says you are getting null pointer in CommonHelper.java at line#1105.

Once you correct this, this issue will get resolved.

Hope this helps.

Umesh Thakur

Adobe Employee
December 12, 2022

hi @mohit1 ,

 

Can you share your model code , which can provide more insight to the issue.

 

Thanks,

Nikita Garg

Manu_Mathew_
Community Advisor
Community Advisor
December 12, 2022

@mohit1 It seems to be related to the sling model you are using, debugging and clearing the exception should ideally solve the propblem.