Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @VivekNa3
Please review the following areas:
1. Bundle Deployment: Ensure that the class is deployed within an active OSGi bundle.
2. Sling Model Factory: Verify that the Sling Model Factory is operational.
3. Resource Matching: Confirm that the resource path and type align with the model's requirements.
Hi @VivekNa3 ,
The error you're encountering suggests an issue with instantiating the AdvancedListModel in Adobe AEM using the Sightly/HTL (HTML Template Language) Use API. Here are some possible causes and solutions for this problem:
1. Ensure that the bundle containing the AdvancedListModel class is active in your AEM instance. You can check this in the Felix console (http://localhost:4502/system/console/bundles).
2. Ensure that your model class is properly annotated with @Model to indicate it is a Sling Model,
3. Double-check that the AdvancedListModel is located in the correct package and that it’s part of the active OSGi bundle in AEM.
4. Ensure that the model is being adapted from the correct resource.
5. Look at the detailed error logs for any additional clues that might help pinpoint the issue.
Thanks,
Madhur Madan
Check if you use optional injection strategy as well in your model : https://sling.apache.org/documentation/bundles/models.html#optional-and-required-1
@VivekNa3 most of the times I have experienced a similar issue when the associated bundle is not started/satisfied.
When you see this error on the page are there any server logs that you encounter?
also, is this specific to a server instance or does the same code work on a different AEM instance?
Hi @VivekNa3 ,
The error you're seeing indicates that the Sling Model (com.learning.core.models.AdvancedListModel) can't be instantiated in Sightly (HTL).
Give try to below-
These steps should help you resolve the issue.
Thanks
Ritesh Mittal
Hi @VivekNa3
Please review the following areas:
1. Bundle Deployment: Ensure that the class is deployed within an active OSGi bundle.
2. Sling Model Factory: Verify that the Sling Model Factory is operational.
3. Resource Matching: Confirm that the resource path and type align with the model's requirements.
As everyone suggested the issue is related to a problem with the instantiation of the AdvancedListModel
class in your Sling application. Specifically, it indicates that the AdvancedListModel
class cannot be correctly instantiated by the Sightly Use API.
Hi @VivekNa3
Adding to the above pointer you can also check your core pom.xml and ensure the export declaration is proper.
<Export-Package> your packagename;version=1.0.0 </Export-Package>
also add some loggers in your model class and see if the invocation is happening and check the class in system console components
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies