Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

org,apache.sling.servlet-helpers Bundle is missing in the AEM version 6.5.21 system console

Avatar

Level 1
Hi Team,
 
Initially, the code worked as expected without using the embed property, while running on AMS AEM 6.5 (exact service pack version unknown). We are using the org.apache.sling.servlet-helpers dependency, which is correctly declared in the pom.xml. However, we suddenly encountered an issue with the target sync functionality. Upon debugging, we discovered that the servlet-helpers JAR was missing. The JAR is not visible in the AEM console or listed among the active bundles. To resolve this, we applied the embed property to include the JAR under the /apps folder. Unfortunately, this workaround has led to Sonar issues related to the dependency. We are currently using AEM version 6.5.21
 
The servlet-helpers JAR is available in AEM as a Cloud Service, but it appears to be missing in AEM 6.5. We're unsure whether it was replaced or bundled within another JAR. Is it acceptable to manually install the JAR via the AEM console under bundles, or is there a recommended way to restore it? Additionally, is there an alternative approach to sync Experience Fragments (XF) to Adobe Target through code without using the dependency? 
 
Dependency:
-----------------------------
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.servlet-helpers</artifactId>
<version>2.0.0</version>
</dependency>
 
<embedded>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.servlet-helpers</artifactId>
<target>/apps/sample-bundles/install</target>
</embedded>
 
Code:
--------------------------------------
InternalRequest req;
req= new SlingInternalRequest(resourceResolver, slingProcessor,
                    withRequestMethod("POST").withParameter("path", xfPath).execute();
 
Sonar Issues:
The product interface org.apache.sling.api.request.RequestParameter annotated with @ProviderType should not be implemented by custom code. Detected in org.apache.sling.servlethelpers.MockRequestParameter contained in /apps/sample-bundles/install/org.apache.sling.servlet-helpers-1.4.6.jar.
The product interface org.apache.sling.api.request.RequestParameterMap annotated with @ProviderType should not be implemented by custom code. Detected in org.apache.sling.servlethelpers.MockRequestParameterMap contained in /apps/sample-bundles/install/org.apache.sling.servlet-helpers-1.4.6.jar.
 
Can you please help me on this to resolve the sonar issue or to update the code or to update the JAR in system console.
 
Thanks in Advance.
 
Thanks,
Bhanu M.
8 Replies

Avatar

Level 10

hi @BhanuMa,

I've a few questions:

  • Are you possibly using classes intended for JUnit testing within your regular code? If so, you should replace them with classes from a different package or jar.
    <scope>test</scope>

    to the dependency and remove the embed, though.

  • From your Sonar message, the embedded jar version is 1.4.6, but your dependency declares 2.0.0. This discrepancy should be addressed. Have you noticed it?

  • Before embedding the jar, have you tried searching for the class you need through the depfinder? Have a look here
 

Avatar

Level 1

Hi @giuseppebag ,

 

Sorry its typo mistake, we are using 1.4.6 in pom.xml also. Just we were thinking if we upgrade the version does it resolve the sonar issues or not. 

Avatar

Level 10

IMHO, the best solution is to address the root cause by avoiding the embedding of the jar, if possible. As a last resort, you could instruct SonarQube to exclude embedded jars or generated classes from the analysis to suppress false positives.

 

Avatar

Level 1

@giuseppebag ,

If i remove the embed property the jar won't be available. Because of missing this dependency only we added the embedd property.

Avatar

Community Advisor

HI @BhanuMa ,

The version specified for org.apache.sling.servlet-helpers in your pom.xml is 2.0.0.
However, another dependency in your project is also referencing org.apache.sling.servlet-helpers version 1.4.6.
This is causing a dependency conflict, which may have been introduced during the AEM upgrade or could be coming from the uber jar.

One possible solution is to align the versions by explicitly setting org.apache.sling.servlet-helpers to 1.4.6 in your pom.xml.

 

 

-Tarun




Avatar

Level 1

Hi @TarunKumar ,

 

Sorry for typo mistake, we were using 1.4.6. Its present in all the places.

 

Thanks,

Bhanu M.

Avatar

Administrator

@BhanuMa Hey! Just wanted to see if this got resolved. If you solved it yourself, sharing your solution could really help others. And if one of the answers here helped you, marking it as accepted will guide future readers. Thanks!



Kautuk Sahni

Avatar

Level 1

Hi @kautuk_sahni ,

 

Its not resolved. Still waiting for solution