AEM 6.5 - Implementation of Versioning for Clientlibs and CSS | Community
Skip to main content
Level 2
March 6, 2021
Solved

AEM 6.5 - Implementation of Versioning for Clientlibs and CSS

  • March 6, 2021
  • 1 reply
  • 13107 views

Hello AEM Guru,

 

We have many versioning documents available but still have few queries.

 

I am new to AEM and have to implement  clientlibs versioning as with every deployment client libs are not getting updated in the normal browser even after flushing the dispatcher cache and CDN cache. Tried to implement as suggested by many.

Facing below few issues :

1. I am tried to implement this via crxde in local . if we want to do it via code how to do that . /apps/<project folder/config/rewriter/ - should a create an xml file and copy paste this code :

<?xml version="1.0" encoding="UTF-8"?>

<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"

jcr:primaryType="sling:Folder"

contentTypes="[text/html]"

enabled="{Boolean}true"

generatorType="htmlparser"

order="{Long}1"

serializerType="htmlwriter"

transformerTypes="[linkchecker,versioned-clientlibs]"/>

This is required, as in our higher environment we don't have access to CRXDE console.  

 

#2 - In my local, i did the changes via  crxde and save all.  After restarting i am getting below :

Configuration versioned-clientlibs

Name : versioned-clientlibs
Content Types : [text/html]
Order : -1
Active : true
Valid : true
Process Error Response : true
Pipeline : 
    Generator : 
        htmlparser
    Transformers : 
        linkchecker
         versioned-clientlibs 
    Serializer : 
        htmlwriter
Resource path: /apps/shc/config/rewriter/versioned-clientlibs

But my author environment is blank . When checked the error logs found this :
Caused by: org.apache.sling.api.SlingException: Unable to setup processor: Unable to get component of class 'interface org.apache.sling.rewriter.Transformer' with type ' versioned-clientlibs '.
at org.apache.sling.rewriter.impl.ProcessorManagerImpl.getProcessor(ProcessorManagerImpl.java:487) [org.apache.sling.rewriter:1.2.2]
at org.apache.sling.rewriter.impl.RewriterResponse.getProcessor(RewriterResponse.java:172) [org.apache.sling.rewriter:1.2.2]
at org.apache.sling.rewriter.impl.RewriterResponse.getWriter(RewriterResponse.java:110) [org.apache.sling.rewriter:1.2.2]
at org.apache.sling.scripting.core.impl.helper.OnDemandWriter.getWriter(OnDemandWriter.java:38) [org.apache.sling.scripting.core:2.0.56]
at org.apache.sling.scripting.core.impl.helper.OnDemandWriter.write(OnDemandWriter.java:61) [org.apache.sling.scripting.core:2.0.56]
at java.io.PrintWriter.write(PrintWriter.java:426)
at org.apache.sling.scripting.jsp.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:119) [org.apache.sling.scripting.jsp:2.3.4]
at org.apache.sling.scripting.jsp.jasper.runtime.PageContextImpl.release(PageContextImpl.java:191) [org.apache.sling.scripting.jsp:2.3.4]
at org.apache.sling.scripting.jsp.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:99) [org.apache.sling.scripting.jsp:2.3.4]
at org.apache.sling.scripting.jsp.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:71) [org.apache.sling.scripting.jsp:2.3.4]
at org.apache.sling.scripting.jsp.jasper.compiler.JspRuntimeContext$JspFactoryHandler.releasePageContext(JspRuntimeContext.java:112) [org.apache.sling.scripting.jsp:2.3.4]
at org.apache.jsp.apps.sling.servlet.errorhandler.default_jsp._jspService(default_jsp.java:456)
at org.apache.sling.scripting.jsp.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) [org.apache.sling.scripting.jsp:2.3.4]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) [org.apache.felix.http.servlet-api:1.1.2]
at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:502) [org.apache.sling.scripting.jsp:2.3.4]
... 76 common frames omitted
Caused by: java.io.IOException: Unable to get component of class 'interface org.apache.sling.rewriter.Transformer' with type ' versioned-clientlibs '.
at org.apache.sling.rewriter.impl.PipelineImpl.getPipelineComponent(PipelineImpl.java:161) [org.apache.sling.rewriter:1.2.2]
at org.apache.sling.rewriter.impl.PipelineImpl.init(PipelineImpl.java:103) [org.apache.sling.rewriter:1.2.2]
at org.apache.sling.rewriter.impl.ProcessorManagerImpl.getProcessor(ProcessorManagerImpl.java:480) [org.apache.sling.rewriter:1.2.2]
... 90 common frames omitted

Any help would be highly appreciated

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 Shashi_Mulugu

@aem_dev2 thank you for reaching out to community. It is a great place to collaborate and learn.

 

Based the question you posted, it seems like you are trying to configure acs commons versioned clientlubs, and rewriter configuration has been correctly done but acs commons needs to be installed in the instance to make it work. Please see the below 

https://adobe-consulting-services.github.io/acs-aem-commons/features/versioned-clientlibs/index.html

 

1 reply

Shashi_Mulugu
Community Advisor
Shashi_MuluguCommunity AdvisorAccepted solution
Community Advisor
March 6, 2021

@aem_dev2 thank you for reaching out to community. It is a great place to collaborate and learn.

 

Based the question you posted, it seems like you are trying to configure acs commons versioned clientlubs, and rewriter configuration has been correctly done but acs commons needs to be installed in the instance to make it work. Please see the below 

https://adobe-consulting-services.github.io/acs-aem-commons/features/versioned-clientlibs/index.html

 

Shashi_Mulugu
Community Advisor
Community Advisor
March 12, 2021
Hey, As per the question you have mentioned version as AEM 6.5, Is it 6.5 or Cloud?