I created a new AEM SPA project using archetypeVersion=36 with absolutely no custom code — it’s a completely clean, out-of-the-box project.
The pages render correctly, but the AEM error log keeps showing this warning:
GET /content/demoproject/us/en.model.json HTTP/1.1]
org.apache.sling.models.impl.via.ResourceSuperTypeViaProvider
Could not determine forced resource type for JcrNodeResource,
type=nt:unstructured, superType=null,
path=/conf/demoproject/settings/wcm/templates/spa-page-template/structure/jcr:content/cq:responsive
using via value
Is there any way to fix this warning or prevent it from appearing?
Views
Replies
Total Likes
hi @YanTingCh,
This warning is a known issue in AEM SPA projects generated with the archetype: https://github.com/adobe/aem-core-wcm-components/issues/1946
It doesn't impact functionality and can be ignored, as it's a logging artifact rather than an actual error. You can suppress this specific warning by adjusting the logger configuration in the OSGi console at /system/console/configMgr. Create or modify the Apache Sling Logging Logger Configuration for org.apache.sling.models.impl.via.ResourceSuperTypeViaProvider and set it to ERROR level instead of WARN.
Views
Replies
Total Likes
Hello @YanTingCh ,
org.apache.sling.models.impl.via.ResourceSuperTypeViaProvider
Could not determine forced resource type for JcrNodeResource,
type=nt:unstructured, superType=null,
path=/conf/demoproject/settings/wcm/templates/spa-page-template/structure/jcr:content/cq:responsive using via value
> This is a benign Sling Models warning. It is triggered when the Sling Models @Via injector tries to resolve a resource via its resource super type, but the resource (in this case cq:responsive) does not have a sling:resourceType or sling:resourceSuperType defined.
> In the default AEM SPA archetype (including version 36):
The component structure under your template folder (/conf/.../structure/...) includes nodes like cq:responsive which are of type nt:unstructured.
> These nodes are helper/config nodes (for layout container responsiveness) - they’re not intended to be Sling Models resources.
> Sling’s ResourceSuperTypeViaProvider simply logs a warning when it tries to find a supertype for an nt:unstructured node that doesn’t declare one.
--> So this warning is expected and harmless. It doesn’t indicate a misconfiguration or code problem.
> Else,
If you want a clean log, you can reduce verbosity for this class:
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies