I'm facing very strange behaviour - I have created new bundle in existing project and implemented new Sling Model, bundle is deployed successfully and it is in Active state too but when I drag and drop component it is not resolving
Can you help, what might be wrong here?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @radhika_k,
While creating new bundle you might missed specifying Sling Model Package in your newly created bundle(pom.xml).
"To start using Sling Model you need to create a separate bundle for Sling Models, is not required but recommended & specify Sling-Model-Packages, a header in the bundle manifest."
If you navigate to your core bundle's pom.xml, you may see header called "Sling-Model-Packages": Please specify the exact package of your newly created bundle.
eg.
For maven-bundle-plugin
<Sling-Model-Packages> org.apache.sling.models.it.models, org.apache.sling.other.models </Sling-Model-Packages>
For bnd-maven-plugin
Sling-Model-Packages:org.apache.sling.other.models
Hope that helps!
Regards,
Santosh
Hi @radhika_k,
While creating new bundle you might missed specifying Sling Model Package in your newly created bundle(pom.xml).
"To start using Sling Model you need to create a separate bundle for Sling Models, is not required but recommended & specify Sling-Model-Packages, a header in the bundle manifest."
If you navigate to your core bundle's pom.xml, you may see header called "Sling-Model-Packages": Please specify the exact package of your newly created bundle.
eg.
For maven-bundle-plugin
<Sling-Model-Packages> org.apache.sling.models.it.models, org.apache.sling.other.models </Sling-Model-Packages>
For bnd-maven-plugin
Sling-Model-Packages:org.apache.sling.other.models
Hope that helps!
Regards,
Santosh
@SantoshSai Thanks for your prompt reply! But I have simply copied existing core bundle and renamed packages didn't changed anything and both the bundles are in Active state.
@radhika_k Well! You renamed packages but forgot to specify (renamed package) header in
Sling-Model-Packages
pom.xml as I stated above, please check and specify it in core - pom.xml that should solve your problem.
Thank you! It works, i can now see in Sling Model Adapter and solved.
Views
Likes
Replies
Views
Likes
Replies