Hi all. I'm posting to ask about Sling models and if they differ in 6.3
I have a a few components in 6.1 that make use of Sling models to expose some data in the repo. These work fine in 6.1
We are currently in the process of upgrading to 6.3 and I have noticed that this code no longer works. It doesn't even look as though the models are being invoked (I have logging messages in them that aren't appearing in the logs). I have updated the org.apache.sling.models.api dependency in the POM file and my bundle is in an active state.
Is there something I'm missing that I need to do as part of the upgrade?
Edit: If I go to /system/console/adapters, I can see the sling models registered on my 6.1 server but not in 6.3
Solved! Go to Solution.
By the way - in the article - if you install the package - you will see it registered as shown here:
Build 6.3 Models the way we describe in the Article: Using Maven 11 Archetype.
NOTE - i updated the article to mention this UI as per your comment here.
Views
Replies
Total Likes
Sling Models work in AEM 6.3.
See this article where we create a custom Grid component using Sling Models.
Creating a custom Touch UI Grid Component for Adobe Experience Manager
You may need to rebuild your code using AEM UBER 6.3 JAR file as shown in this article. If you simply trying to get a 6.1 bundle working in 6.3 - it will not work.
Thanks, I'll have a look at this. Just to note, I do have the uberjar included as a dependency - the bundle is active and other components are working as I would expect. It just seems as though the sling model isn't getting registered correctly.
Views
Replies
Total Likes
By the way - in the article - if you install the package - you will see it registered as shown here:
Build 6.3 Models the way we describe in the Article: Using Maven 11 Archetype.
NOTE - i updated the article to mention this UI as per your comment here.
Views
Replies
Total Likes
Are you sure that <Sling-Model-Packages> is set right?
Views
Replies
Total Likes
Yes, certain. The same code works on 6.1.
Views
Replies
Total Likes
Dd you build it like we show you in the article?
Views
Replies
Total Likes
I built the demo bundle and that worked so I'll have a dig around and see what's different between that and my project.
FYI, one change I had to make from the article was to use a different package name when checking out the archetype:
Views
Replies
Total Likes
Views
Likes
Replies