AEM 6.2: Exception when using foundation components in responsivegrid

Avatar

Avatar

daniel_strmecki

Avatar

daniel_strmecki

daniel_strmecki

17-10-2016

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)...

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

19-10-2016

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

Answers (13)

Answers (13)

Avatar

Avatar

benjamin_cheria

Avatar

benjamin_cheria

benjamin_cheria

04-10-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.

Avatar

Avatar

srikanth_pogula

Avatar

srikanth_pogula

srikanth_pogula

11-07-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

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

25-07-2018

As I mentioned earlier - best to talk to support via a ticket. Most of the community is on newer AEM versions and using HTL/Core components vs Foundation components.

Avatar

Avatar

manojs24803215

Avatar

manojs24803215

manojs24803215

25-07-2018

I have also faced the same issue,any update from support team

Avatar

Avatar

amitshukla753

Avatar

amitshukla753

amitshukla753

23-07-2018

Do we have any solution for this now?
I am getting this and tried all the suggestion given here not working for me.

Avatar

Avatar

FredrickDominy

Avatar

FredrickDominy

FredrickDominy

03-02-2018

I had the same exception crop up mysteriously too. It bugged our dev server but locally everything was fine.  The problem was resolved by hitting the Refresh Packages button in /system/console/configMgr

Avatar

Avatar

SDharmaraj

Avatar

SDharmaraj

SDharmaraj

01-02-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.

Avatar

Avatar

yongz14902728

Avatar

yongz14902728

yongz14902728

13-12-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.

Avatar

Avatar

varunsud86

Avatar

varunsud86

varunsud86

19-07-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

Avatar

Avatar

varunsud86

Avatar

varunsud86

varunsud86

19-07-2017

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

Avatar

Avatar

shajiahmed

Avatar

shajiahmed

shajiahmed

04-04-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.

Avatar

Avatar

daniel_strmecki

Avatar

daniel_strmecki

daniel_strmecki

19-10-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

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

17-10-2016

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