Component specific Clientlibs under apps not loading | Community
Skip to main content
priyac92178889
Level 2
May 1, 2018
Solved

Component specific Clientlibs under apps not loading

  • May 1, 2018
  • 4 replies
  • 2315 views

Hi,

We are upgrading our application from AEM 6.0 to AEM 6.2.

I have installed CFP 13.

I see that Component specific Clientlibs under apps not loading .

I am  embedding the Component specific Clientlib  /apps/bootstrap/components/bootstrap-nav-megamenu/clientlibs/js/bootstrap-nav-megamenu.min.js in /etc/designs/bootstrap/bootstrap-design/components/bootstrap-megamenu and referencing the clientlib under designs by its category .

I see below error

01.05.2018 13:17:30.163 *ERROR* [10.99.27.202 [1525144650152] GET /etc/designs/bootstrap/bootstrap-design/components/bootstrap-megamenu.js HTTP/1.1] com.adobe.granite.ui.clientlibs.impl.HtmlLibraryServlet Cannot create library for /etc/designs/bootstrap/bootstrap-design/components/bootstrap-megamenu.js

java.io.IOException: Error while sending cached library: javax.jcr.PathNotFoundException: /apps/bootstrap/components/bootstrap-nav-megamenu/clientlibs/js/bootstrap-nav-megamenu.min.js/jcr:content/jcr:data

As a work around i have given the clientlibs-service user permission to /apps folder and rebuild the client library.

By doing this i am able to load the client libs under apps folder.

Can some one help me with whats missing and  why the clientlibs under /apps not loading straight away.

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 priyac92178889

I was able to find the root cause of the issue.

The system user "clientlibs-service" should be having the permission to /apps, /etc and /libs folder by default.

clientlibs-service is a service user for HTML client library service.

I believe there was a package which was overwriting this permission. Hence access to  /apps folder was removed and was unable to embed the clientlibs under /apps folder,

4 replies

kautuk_sahni
Community Manager
Community Manager
May 1, 2018

This could be the reason for your problem:- Re: Unable to apply component-level CSS.

Kautuk Sahni
priyac92178889
Level 2
May 1, 2018

The same code base works fine in AEM

6.0 but when deployed on AEM 6.2  I see the issue with component specific libraries not loading . What’s changed with AEM 6.2

smacdonald2008
Level 10
May 1, 2018

When you build an AEM Maven 10 Archetype for 6.2 - notice that clientlibs are placed under etc and they are being pulled in. See this article -- Scott's Digital Community: Creating your first AEM 6.2 Project using Adobe Maven Archetype 10

Follow that article and you will see that CSS is being pulled into the AEM site defined under /etc.

priyac92178889
priyac92178889AuthorAccepted solution
Level 2
May 3, 2018

I was able to find the root cause of the issue.

The system user "clientlibs-service" should be having the permission to /apps, /etc and /libs folder by default.

clientlibs-service is a service user for HTML client library service.

I believe there was a package which was overwriting this permission. Hence access to  /apps folder was removed and was unable to embed the clientlibs under /apps folder,