Skip to main content
mohanb
Level 4
May 11, 2016 10:09 PM UTC
Solved

sling api in use

I am referring the javadoc https://docs.adobe.com/docs/en/aem/6-1/ref/javadoc/ here for JobManager API. Here it says there is a method addJob(String topic, Map<String,Object> properties). But acutal API doesn't have this method. I'm having following dependencies in the maven. Is this documentation error? Isn't recent version of sling used. If so, what's the version of sling used in 6.1.0?

        <dependency>

            <groupId>org.apache.sling</groupId>

            <artifactId>org.apache.sling.jcr.api</artifactId>

            <version>2.1.0</version>

            <scope>provided</scope>

        </dependency>

        <dependency>

            <groupId>org.apache.sling</groupId>

            <artifactId>org.apache.sling.api</artifactId>

            <version>2.4.0</version>

            <scope>provided</scope>

        </dependency>

        <dependency>

            <groupId>org.apache.sling</groupId>

            <artifactId>org.apache.sling.event</artifactId>

            <version>3.1.4</version>

            <scope>provided</scope>

        </dependency>

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Tuhin_Ghosh
Tuhin_GhoshAccepted solution
Level 8
May 11, 2016 10:51 PM UTC

Hi,

Its present in the interface JobManager.

https://sling.apache.org/apidocs/sling7/org/apache/sling/event/jobs/JobManager.html

Do not put the redundant entries in the pom. remove all and try with the below dependency in your pom.

<dependency>
    <groupId>org.apache.sling</groupId>
    <artifactId>org.apache.sling.event</artifactId>
    <version>4.0.0</version>
</dependency>

 

Thanks

Tuhin 

4 replies

Tuhin_Ghosh
Tuhin_GhoshAccepted solution
Level 8
May 11, 2016 10:51 PM UTC

Hi,

Its present in the interface JobManager.

https://sling.apache.org/apidocs/sling7/org/apache/sling/event/jobs/JobManager.html

Do not put the redundant entries in the pom. remove all and try with the below dependency in your pom.

<dependency>
    <groupId>org.apache.sling</groupId>
    <artifactId>org.apache.sling.event</artifactId>
    <version>4.0.0</version>
</dependency>

 

Thanks

Tuhin 

Translate
kautuk_sahni
Level 9
May 12, 2016 6:59 AM UTC

Hi,

Its available since 3.0.

And yes as mentioned by Tuhin, do not use redundant dependency in pom file. 

Thanks and Regards

Kautuk Sahni

Translate
Kautuk Sahni
mohanb
mohanbAuthor
Level 4
May 15, 2016 7:46 PM UTC

Thanks. I was using 3.1.4. Is 4.0.0 compatible with aem 6.1.0 version? Where do you verify compatibility? is there any compatibility matrix published?

Translate
Tuhin_Ghosh
Level 8
May 15, 2016 10:45 PM UTC

Yes there is something like this but as you know the number of opensource java library is huge. So sometime you might have to go to the java doc of the library and see for yourself.

https://docs.adobe.com/docs/en/aem/6-1/deploy/technical-requirements.html

Thanks

Tuhin

Translate