Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

AEM 6.5 uber jar java.lang.NoClassDefFoundError: com/day/imageio/plugins/GifImageWriterSpi

Avatar

Level 2

Hello,

I noticed that \com\adobe\aem\uber-jar\6.5.0\uber-jar-6.5.0-apis.jar!\com\day\image\ImageSupport.class has import com.day.imageio.plugins.* but uber 6.5 jar doesn't have this com.day.imageio package anymore.

Kindly ask if you can guide me on how to solve / workaround this issue.

Thank you, have a nice day!

Ionut

4 Replies

Avatar

Community Advisor

you can try to explicitly deploy this bundle in felix console and add as dependency in your project pom

<dependency>

    <groupId>com.day.cq.dam</groupId>

    <artifactId>cq-dam-handler</artifactId>

    <version>5.7.8</version>

</dependency>

Avatar

Level 2

I'm using the ImageHelper.createLayer() method, and I don't see something equivalent in that dependency.


I'm using bellow dependency for my JUnit 5 tests.

<dependency>

   <groupId>io.wcm</groupId>

   <artifactId>io.wcm.testing.aem-mock.junit5</artifactId>

   <version>2.4.6</version>

   <scope>test</scope>

</dependency>

-  java.lang.NoClassDefFoundError: com/day/imageio/plugins/GifImageWriterSpi

at com.day.image.Layer.<clinit>(Layer.java:237)

at io.wcm.testing.mock.aem.MockAssetManager.createAsset(MockAssetManager.java:90)

at io.wcm.testing.mock.aem.builder.ContentBuilder.asset(ContentBuilder.java:326)

at io.wcm.testing.mock.aem.builder.ContentBuilder.asset(ContentBuilder.java:243)

at io.wcm.testing.mock.aem.builder.ContentBuilder.asset(ContentBuilder.java:227)

Thank you for your time

Avatar

Level 2

ImageHelper.createLayer() can be imported from:

        <dependency>

            <groupId>com.day.cq</groupId>

            <artifactId>cq-commons</artifactId>

            <version>5.8.32</version>

            <scope>provided</scope>

        </dependency>

But the error will persist due to Layer -> ImageSupport.initialize();

Avatar

Level 2

Hi,

Adding below dependency helps to resolve the issue:

 

<!-- Workaround for AEM 6.5: The new uber-jar does no longer contain the package com.day.imageio.plugins -->
<dependency>
<groupId>com.day.commons</groupId>
<artifactId>day-commons-gfx</artifactId>
<version>2.1.28</version>
<scope>compile</scope>
</dependency>

Thanks,
Boobalan M

The ultimate experience is back.

Join us in Vegas to build skills, learn from the world's top brands, and be inspired.

Register Now