Sling models in 6.3 | Community
Skip to main content
Level 4
October 30, 2017
Solved

Sling models in 6.3

  • October 30, 2017
  • 7 replies
  • 3232 views

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

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 smacdonald2008

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.

7 replies

smacdonald2008
Level 10
October 30, 2017

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.

Level 4
October 30, 2017

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.

smacdonald2008
smacdonald2008Accepted solution
Level 10
October 30, 2017

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.

Feike_Visser1
Adobe Employee
Adobe Employee
October 31, 2017

Are you sure that <Sling-Model-Packages> is set right?

Level 4
October 31, 2017

Yes, certain. The same code works on 6.1.

smacdonald2008
Level 10
October 31, 2017

Dd you build it like we show you in the article?

Level 4
October 31, 2017

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:

  • package - com.community.grid