Uber jar library files overriding the original libraries | Community
Skip to main content
New Participant
Jul 9, 2019 2:22 PM UTC
Solved

Uber jar library files overriding the original libraries

HI,

I have used the Uber Jar 6.4.4 for 6.4 upgrade. The org.json.JSONArray file declared in the package does not implement the Iterable class as the original library, so the following code is failing:

JSONArray summaryArray = new JSONArray(summaryJSONString);

JSONArray jsonArray = new JSONArray(jsonString);

for (Object json : jsonArray) {

if (json instanceof JSONObject) {

//Some code

}

}

Even after adding the original library as a dependency, my code is still referencing to the uber jar file instead of the referenced library.

Dependencies:

<dependency>

<groupId>com.adobe.aem</groupId>

<artifactId>uber-jar</artifactId>

<version>6.4.4</version>

<classifier>apis</classifier>

<scope>provided</scope>

</dependency>

<dependency>

<groupId>org.json</groupId>

<artifactId>json</artifactId>

<version>20180813</version>

</dependency>

Is there a way to override the Uber Jar libraries or to exclude them in the POM?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
arunpatidar
arunpatidarAccepted solution
New Participant
Jul 9, 2019 2:28 PM UTC

Can you try to reorder both in core pom.xml

Arun Patidar

2 replies

arunpatidar
arunpatidarAccepted solution
New Participant
Jul 9, 2019 2:28 PM UTC

Can you try to reorder both in core pom.xml

Translate
Arun Patidar
Level 2
May 30, 2022 12:00 PM UTC

I tried re-ordering it is not working for me. 

Translate