Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

AEM 6.5 - Implementation of Versioning for Clientlibs and CSS

Avatar

Avatar
Validate 1
Level 1
aem_dev2
Level 1

Likes

0 likes

Total Posts

11 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
aem_dev2
Level 1

Likes

0 likes

Total Posts

11 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
aem_dev2
Level 1

06-03-2021

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

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Springboard
MVP
Shashi_Mulugu
MVP

Likes

200 likes

Total Posts

264 posts

Correct Reply

64 solutions
Top badges earned
Springboard
Bedrock
Validate 1
Applaud 100
Establish
View profile

Avatar
Springboard
MVP
Shashi_Mulugu
MVP

Likes

200 likes

Total Posts

264 posts

Correct Reply

64 solutions
Top badges earned
Springboard
Bedrock
Validate 1
Applaud 100
Establish
View profile
Shashi_Mulugu
MVP

06-03-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

 

Answers (0)