cannot be correctly instantiated by the Use API | Community
Skip to main content
Mohit1
New Participant
December 12, 2022
Solved

cannot be correctly instantiated by the Use API

  • December 12, 2022
  • 4 replies
  • 16123 views

Hi @1298763,

can someone help me with this error.

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

Manu_Mathew_
New Participant
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.

Employee
December 12, 2022

hi @mohit1 ,

 

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

 

Thanks,

Nikita Garg

Umesh_Thakur
Umesh_ThakurAccepted solution
New Participant
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

Bhuwan_B
New Participant
December 12, 2022