Hi,
We are moving from AMS to AEMaaCS but midway we realized that AMS license is going to expire coming November. We are planning to lift and shift few components from AMS to AEMaaCS temporarily while part of team is working on new component creation on AEMaacs.
AMS code repo is on Maven archetype version 17 or 19 and AEMaaCS on recent version.
I have created a package of templates, components, page components, clientlibs, bundle from AMS environment and installed it on AEMaaCS instance along with content but while loading I see below error
03.09.2025 19:43:41.176 *ERROR* [[0:0:0:0:0:0:0:1] [1756908818438] GET /content/my-company/en-us/home/articles.html HTTP/1.1] com.day.cq.wcm.core.impl.WCMDeveloperModeFilter Error during include of SlingRequestPathInfo: path='/content/my-company/en-us/home/articles/jcr:content', selectorString='null', extension='html', suffix='null'
org.apache.sling.scripting.sightly.SightlyException: Identifier com.core.aem.core.components.model.Container cannot be correctly instantiated by the Use API
at org.apache.sling.scripting.sightly.impl.engine.extension.use.UseRuntimeExtension.call(UseRuntimeExtension.java:73) [org.apache.sling.scripting.sightly:1.4.28.140]
I am unable to see my sling models from AMS code here http://localhost:4502/system/console/status-slingmodels. Here is the configuration of AMS core/pom.xml for build plugin org.apache.sling
<Sling-Model-Packages>
com.core.aem
</Sling-Model-Packages>
Any suggestions on the solution to resolve this error?
Bottomline is, I would like to use AMS components, bundle on AEMaaCS for a short period of time and remove this technical debt very soon.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Views
Replies
Total Likes
Hi @SantoshSai ,
Yes the bundle is active
Views
Replies
Total Likes
Not limited the current approach, If there is any other approach which solves the problem of moving AMS components from AMS to AEMaaCS, please suggest.
Views
Replies
Total Likes
Hi @SrikanthPo3 ,
There are several reasons why Use API might not be getting instantiated. Here are a few things you can check:
Try using "optional" as the injection strategy.
Some configurations might prevent the service from being injectable. Please verify if any service is being injected.
PS: Search for ".java" in the error log to pinpoint the exact sling model and line number causing the issue.
Thanks!
Views
Replies
Total Likes
We are using optional injection strategy, here is the signature
@Model(adaptables = { Resource.class, SlingHttpServletRequest.class },
defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL,
adapters = Container.class,
resourceType = ContainerImpl.RESOURCE_TYPE)
public class ContainerImpl implements Container {
Views
Replies
Total Likes