Expand my Community achievements bar.

SOLVED

ACS AEM Commons Contexual Content Variables(CCVAR) 'ccvar-transformer' not found

Avatar

Level 4
Something wierd... Today, after restarting the instance, it works... Adding this message here to prevent people from wasting time...

 

Hi Masters!

 

I'm trying to use ACS AEM Commons Contexual Content Variables(CCVAR) in my project. After following the configuration steps, I get this error message in error.log:

Caused by: java.io.IOException: Unable to get component of class 'interface org.apache.sling.rewriter.Transformer' with type 'ccvar-transformer'.

I also configured a specific log for org.apache.sling.rewriter package and catched this error message:

2022-07-06 11:23:26.892 DEBUG [org.apache.sling.rewriter.impl.FactoryCache] Requested transformer factory for type 'ccvar-transformer' not found.

After analyzing, I figured out that I can't configure the PropertyAggregatorServiceImpl service (the first step in the documentation), so the service is not running, causing the error.

I followed the instructions provided, adding a com.adobe.acs.commons.ccvar.impl.PropertyAggregatorServiceImpl.xml file to my project, in /apps/myproject/osgiconfig/config/, but after a couple of seconds, the configuration is deleted.

I've checked in the OSGI Console, in the /components page, it remains as 'no config':

 

Julio_Baixauli_0-1657100191018.png

I also cheched the configMgr console page, and I can't see the PropertyAggregatorServiceImpl service. I can only see com.adobe.acs.commons.ccvar.impl.PropertyConfigServiceImpl:

Julio_Baixauli_1-1657101835911.png

 

My setup is:

  • AEM SDK 2022.3.6698.20220318T233218Z
  • ACS Commons 5.3.2

My PropertyAggregatorServiceImpl.xml:

<?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:OsgiConfig"/>
Not sure if relevant for this issue, but my pipeline configuration:
<?xml version="1.0" encoding="UTF-8"?>

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

    jcr:primaryType="nt:unstructured"

    contentTypes="[text/html]"

    enabled="{Boolean}true"

    generatorType="htmlparser"

    order="0"

    serializerType="htmlwriter"

    transformerTypes="[linkchecker,mobile,mobiledebug,contentsync,ccvar-transformer]">

    <transformer-mobile

        jcr:primaryType="nt:unstructured"

        component-optional="{Boolean}true"/>

    <transformer-mobiledebug

        jcr:primaryType="nt:unstructured"

        component-optional="{Boolean}true"/>

    <transformer-contentsync

        jcr:primaryType="nt:unstructured"

        component-optional="{Boolean}true"/>

    <generator-htmlparser

        jcr:primaryType="nt:unstructured"

        includeTags="[A,/A,DIV,/DIV,SPAN,/SPAN,P,/P,SECTION,/SECTION,H1,/H1,H2,/H2,H3,/H3,H4,/H4,H5,/H5,LI,/LI,BUTTON,/BUTTON]"/>

</jcr:root>
I would like to mention @lukasz-m and @GaneshM, as I saw a couple of accepted solutions related to CCVAR and Sling rewriter, here in the community.
 
Thank you very mych!
 

 

1 Accepted Solution

Avatar

Correct answer by
Administrator

As per the comment from Author

after restarting the instance, it works... 

 



Kautuk Sahni

View solution in original post

1 Reply

Avatar

Correct answer by
Administrator

As per the comment from Author

after restarting the instance, it works... 

 



Kautuk Sahni