Hi All,
While upgrading AEM from 6.3 SP1 to SP3, we also changed uber jar version from 6.3.0 to 6.3.3.1. After updating we are seeing exception while accessing page properties as below. There is no issue if we use Uber jar version upto 6.3.2. So wanted to check if we need to change implementation on how we get the properties or any other imports needed in pom.
Code
Not working -
properties.get(SOME_PROPERTY, "defaultValue");
Working -
properties.get(SOME_PROPERTY,); - We don't want to use this and always wanted to pass the default value.
Exception:
java.lang.NoClassDefFoundError: org/apache/sling/api/wrappers/impl/ObjectConverter
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.apache.sling.api.wrappers.ValueMapDecorator.get(ValueMapDecorator.java:56)
pom.xml
<dependency>
<groupId>com.adobe.aem</groupId>
<artifactId>uber-jar</artifactId>
<version>6.3.3.1</version>
<classifier>apis</classifier>
<scope>provided</scope>
</dependency>
Solved! Go to Solution.
There is typically no need to change any implementation logic when updating a JAR version like this.
Maven Dependency - according to docs is:
Uber Jar
The Uber Jar for 6.3.3.1 is available at Adobe Public Maven repository.
To use Uber Jar in a Maven project, refer to the article, How to use Uber jar and include the following dependency in your project POM:
<dependency>
<groupId>com.adobe.aem</groupId>
<artifactId>uber-jar</artifactId>
<version>6.3.3.1</version>
<classifier>apis</classifier>
<scope>provided</scope>
</dependency>
Adobe Experience Manager Help | Release Notes: AEM 6.3 Cumulative Fix Pack
There is typically no need to change any implementation logic when updating a JAR version like this.
Maven Dependency - according to docs is:
Uber Jar
The Uber Jar for 6.3.3.1 is available at Adobe Public Maven repository.
To use Uber Jar in a Maven project, refer to the article, How to use Uber jar and include the following dependency in your project POM:
<dependency>
<groupId>com.adobe.aem</groupId>
<artifactId>uber-jar</artifactId>
<version>6.3.3.1</version>
<classifier>apis</classifier>
<scope>provided</scope>
</dependency>
Adobe Experience Manager Help | Release Notes: AEM 6.3 Cumulative Fix Pack
I would raise a support ticket.., do you have the same when you do this logic inside a JSP?
Views
Replies
Total Likes
Apparently, dependency for Sling was not added and the necessary classes where not able to resolve from Uber jar. So we added this dependency which resolved the issue.
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.api</artifactId>
<version>2.16.2</version>
<scope>provided</scope>
</dependency>
Views
Replies
Total Likes
Views
Likes
Replies
Views
Like
Replies