Highlighted

How to identify which of the inject is failing the sling model to instantiate

cmanoj2105

22-09-2017

How to identify which of the inject is failing the sling model to instantiate??

if suppose i have 5 inject annotations in my sling model and 1 of which its not able to inject. How to identify that particular 1 inject amoung 5.

Thanks

Replies

Highlighted
Highlighted

manjunathdj

18-12-2017

You need to debug the java class and check the logs to identify were sling model instantiation is failing.

To be safer side you can use optional attribute. Please follow below link.

Apache Sling :: Sling Models

Thanks,

Manjunath DJ