AEM 6.2: Exception when using foundation components in responsivegrid | Community
Skip to main content
Level 2
October 17, 2016
Solved

AEM 6.2: Exception when using foundation components in responsivegrid

  • October 17, 2016
  • 14 replies
  • 9704 views

I get a class not found for ValueMap when adding a foundation component to responsivegrid. My custom components however work fine and all Sling bundles are activated. Any ideas whats wrong?

 

17.10.2016 13:28:26.103 *ERROR* [0:0:0:0:0:0:0:1 [1476703706098] GET /content/sample2/en/home/jcr:content/root/responsivegrid/columns_2/par_col2_1/text.html HTTP/1.1] org.apache.sling.scripting.javascript.wrapper.ScriptableResource Unable to adapt object.
java.lang.ClassNotFoundException: [JavaPackage org.apache.sling.api.resource.ValueMap]
    at org.apache.sling.commons.classloader.impl.ClassLoaderFacade.loadClass(ClassLoaderFacade.java:149)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at org.apache.sling.scripting.javascript.wrapper.ScriptableResource.jsFunction_adaptTo(ScriptableResource.java:298)
    at sun.reflect.GeneratedMethodAccessor131.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
    at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:387)...

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 smacdonald2008

THis looks like some sort of bug. I would report this by opening a ticket. 

14 replies

smacdonald2008
Level 10
October 17, 2016

Never seen this - i am checking to see if this is a known issue. 

DanielSt7Author
Level 2
October 19, 2016

Tried it on a new AEM 6.2 instance and the same exception occurs with Adobe Archetype 10 when using wcm/foundation/components/parsys and adding a component with a supertype e.g. wcm/foundation/components/text.

Is it possible that Archetype 10 is missing some dependency for HTL components?

 

<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="cq:Component" sling:resourceSuperType="wcm/foundation/components/text" jcr:title="Title" componentGroup="sample2-main"/>

 

<dependencyManagement> <dependencies> <dependency> <groupId>org.apache.geronimo.specs</groupId> <artifactId>geronimo-atinject_1.0_spec</artifactId> <version>1.0</version> <scope>provided</scope> </dependency> <!-- OSGi Dependencies --> <dependency> <groupId>org.apache.felix</groupId> <artifactId>org.apache.felix.scr</artifactId> <version>1.6.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.felix</groupId> <artifactId>org.apache.felix.scr.annotations</artifactId> <version>1.9.6</version> <scope>provided</scope> </dependency> <dependency> <groupId>biz.aQute</groupId> <artifactId>bndlib</artifactId> <version>1.50.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.osgi</groupId> <artifactId>org.osgi.core</artifactId> <version>4.2.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.osgi</groupId> <artifactId>org.osgi.compendium</artifactId> <version>4.2.0</version> <scope>provided</scope> </dependency> <!-- Logging Dependencies --> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.5.11</version> <scope>provided</scope> </dependency> <!-- Apache Sling Dependencies --> <dependency> <groupId>com.adobe.aem</groupId> <artifactId>aem-api</artifactId> <version>6.0.0.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.models.api</artifactId> <version>1.0.0</version> <scope>provided</scope> </dependency> <!-- Servlet API --> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.4</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.servlet.jsp</groupId> <artifactId>jsp-api</artifactId> <version>2.1</version> <scope>provided</scope> </dependency> <!-- JCR --> <dependency> <groupId>javax.jcr</groupId> <artifactId>jcr</artifactId> <version>2.0</version> <scope>provided</scope> </dependency> <!-- Taglibs --> <dependency> <groupId>com.day.cq.wcm</groupId> <artifactId>cq-wcm-taglib</artifactId> <version>5.7.4</version> <scope>provided</scope> </dependency> <!-- Testing --> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.8.2</version> <scope>test</scope> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-simple</artifactId> <version>1.5.11</version> <scope>test</scope> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-all</artifactId> <version>1.9.5</version> <scope>test</scope> </dependency> <dependency> <groupId>junit-addons</groupId> <artifactId>junit-addons</artifactId> <version>1.4</version> <scope>test</scope> </dependency> </dependencies> </dependencyManagement>

 

Daniel

smacdonald2008
smacdonald2008Accepted solution
Level 10
October 19, 2016

THis looks like some sort of bug. I would report this by opening a ticket. 

Level 3
April 4, 2017

I do see the same issue when using sightly image component. This works fine in my localhost and our dev environment.

We are seeing this issue in QA environment only, however our environments are exact replica of one another.

Level 3
July 12, 2017

Hi,

Is this issue resolved? We are facing same issue in one of our dev environments while it works fine in local instances.

Thanks,

Srikanth

Level 2
July 19, 2017

We are also facing the same issue on foundation image and richtext components. Class Not Found exception on ValueMap.

Level 2
July 19, 2017

Has there been any response from the dev team? I am facing the same issue on o.t.b. image and richtext components.

I am using AEM 6.3

benjamin_cheria
Level 2
October 4, 2017

I ran into this issue today using AEM 6.3 with Oak 1.6.3. Resolved it by running offline compaction. Not sure why this happened. I had added some package dependencies and then removed them before the issue started.

Adobe Employee
June 21, 2020
Thanks benjamin. running offline compaction helped get rid-off of this exception for me too.
December 13, 2017

did you ever get this resolve. We are facing the same issue in our AEM 6.3 env. It seems to only happen after package installation.

SDharmaraj
Level 2
February 1, 2018

Thanks benjamin.cherian . I also faced the same issue and i did Offline compaction , the issue resolved. This issue started after installing SP1 & CFP1 on top of AEM6.3.