Expand my Community achievements bar.

Nomination window for the Adobe Community Advisor Program, Class of 2025, is now open!
SOLVED

org.joda.time,version=[2.12,3) Cannot be resolved

Avatar

Level 4

I've updated to the latest version of aws-java-sdk-osgi, but some of the imported packages cannot be resolved.

org.joda.time,version=[2.12,3) -- Cannot be resolved
org.joda.time.format,version=[2.12,3) -- Cannot be resolved
org.joda.time.tz,version=[2.12,3) -- Cannot be resolved

In the dependecny finder I can see that the version of joda-time is 2.9.1.

 

 

 

<dependency>
	<artifactId>joda-time</artifactId>
	<version>2.9.1</version>
	<groupId>joda-time</groupId>
	<scope>provided</scope>
</dependency>

 

 

 

 

I tried to embed some of the dependencies, including joda-time(version: 2.12.7), but all other dependencies have been available in the container (Felix framework) except joda-time(version : 2.12.7).

 

 

 

<embeddeds>
    <embedded>
        <artifactId>joda-time</artifactId>
        <artifactId>jackson-databind</artifactId>
         .................................
         .................................
    </embedded>
<embedded>

 

 

Please find the log data

 

org.apache.sling.installer.core.impl.tasks.BundleTaskCreator Ignoring blacklisted bundle joda-time found at jcrinstall:/apps/<project>/install/joda-time-2.12.7.jar

 

 

 

Can someone share any idea how this problem can be addressed? 

@aanchal-sikka @Jennifer_Dungan @EstebanBustamante@HrishikeshKa @Josh__Stephens @alexbishop 

 

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

I am wondering about this dependency. On the Joda time homepage I found this prominent statement:

Note that from Java SE 8 onwards, users are asked to migrate to java.time (JSR-310) - a core part of the JDK which replaces this project.

 

I read that this this version still needs to support java 6 and therefor uses Joda Time. For a more modern version of that library I'd suggest to check https://github.com/houseofai/aws-sdk-java-v2-osgi (which is a wrapper around the v2 SDK). I hope that this version avoids the use of Joda time.

(Regarding the actual problem: Checking the code it seems that this bundle is marked as "do not install it again" in your AEM instance. IIRC AEM abandoned Joda time when the minimal requirement was Java 8.)

View solution in original post

1 Reply

Avatar

Correct answer by
Employee Advisor

I am wondering about this dependency. On the Joda time homepage I found this prominent statement:

Note that from Java SE 8 onwards, users are asked to migrate to java.time (JSR-310) - a core part of the JDK which replaces this project.

 

I read that this this version still needs to support java 6 and therefor uses Joda Time. For a more modern version of that library I'd suggest to check https://github.com/houseofai/aws-sdk-java-v2-osgi (which is a wrapper around the v2 SDK). I hope that this version avoids the use of Joda time.

(Regarding the actual problem: Checking the code it seems that this bundle is marked as "do not install it again" in your AEM instance. IIRC AEM abandoned Joda time when the minimal requirement was Java 8.)