Expand my Community achievements bar.

SOLVED

sling api in use

Avatar

Level 4

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>

1 Accepted Solution

Avatar

Correct answer by
Level 7

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 

View solution in original post

4 Replies

Avatar

Correct answer by
Level 7

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 

Avatar

Administrator

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



Kautuk Sahni

Avatar

Level 4

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?

Avatar

Level 7

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