Expand my Community achievements bar.

java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

Avatar

Level 5

Hi ,

I am getting the above error when i tried to execute the following example.

Adobe Experience Manager Help | Creating Adobe Experience Manager bundles that invoke third party Re...

AEM Version : 6.0

Error:

26.04.2018 19:17:55.726 *ERROR* [0:0:0:0:0:0:0:1 [1524750438961] GET /content/mycontent/en/testing.html HTTP/1.1] com.day.cq.wcm.core.impl.WCMDebugFilter Exception: org/apache/commons/logging/LogFactory

java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

at org.apache.http.impl.client.AbstractHttpClient.<init>(AbstractHttpClient.java:182)

at org.apache.http.impl.client.DefaultHttpClient.<init>(DefaultHttpClient.java:150)

at com.mycompany.myproject.study.YoutubeComponent.getJSON(YoutubeComponent.java:46)

at com.mycompany.myproject.study.YoutubeComponent.activate(YoutubeComponent.java:36)

at com.adobe.cq.sightly.WCMUse.init(WCMUse.java:60)

at io.sightly.java.engine.extension.use.PojoUseProvider.provide(PojoUseProvider.java:67)

at io.sightly.java.engine.extension.use.UseExtension$1.call(UseExtension.java:82)

at io.sightly.java.runtime.common.SightlyRuntimeImpl.call(SightlyRuntimeImpl.java:51)

at apps.myproject.components.content.youtube.SightlyJava_youtube.render(SightlyJava_youtube.java:24)

at io.sightly.java.api.BaseRenderUnit.render(BaseRenderUnit.java:39)

at io.sightly.java.engine.SightlyScriptEngine.evaluateScript(SightlyScriptEngine.java:109)

at io.sightly.java.engine.SightlyScriptEngine.eval(SightlyScriptEngine.java:93)Capture.PNG

Regards,

sathya

1 Reply

Avatar

Administrator

Did you make some logging changes to the code? Or using package provided in the article?

The problem would appear to be that the bundle which includes DefaultHttpClient isn't importing org.apache.commons.logging.

Add this to the POM

<dependency>

    <groupId>commons-logging</groupId>

    <artifactId>commons-logging</artifactId>

    <version>1.2</version>

</dependency>

Also, Similar thread:- Errors trying to implement Adobe Helpx RESTful Services example

-Kautuk



Kautuk Sahni