AEM 6.3 SP1 to SP3 upgrade | Uber Jar

Avatar

Avatar

Ashwin_Raju

Avatar

Ashwin_Raju

Ashwin_Raju

27-12-2018

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>

View Entire Topic

Avatar

Avatar

Ashwin_Raju

Avatar

Ashwin_Raju

Ashwin_Raju

28-12-2018

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>