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

Avatar

Avatar
Boost 1
Level 2
ionut_p
Level 2

Likes

2 likes

Total Posts

5 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 2
ionut_p
Level 2

Likes

2 likes

Total Posts

5 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile
ionut_p
Level 2

22-05-2019

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

Replies

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,314 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,314 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

22-05-2019

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

Avatar
Boost 1
Level 2
ionut_p
Level 2

Likes

2 likes

Total Posts

5 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 2
ionut_p
Level 2

Likes

2 likes

Total Posts

5 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile
ionut_p
Level 2

22-05-2019

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

Avatar
Boost 1
Level 2
ionut_p
Level 2

Likes

2 likes

Total Posts

5 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 2
ionut_p
Level 2

Likes

2 likes

Total Posts

5 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile
ionut_p
Level 2

22-05-2019

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

Avatar
Give Back 3
Level 2
Boobalan_M
Level 2

Likes

5 likes

Total Posts

11 posts

Correct reply

1 solution
Top badges earned
Give Back 3
Give Back
Boost 5
Boost 3
Boost 1
View profile

Avatar
Give Back 3
Level 2
Boobalan_M
Level 2

Likes

5 likes

Total Posts

11 posts

Correct reply

1 solution
Top badges earned
Give Back 3
Give Back
Boost 5
Boost 3
Boost 1
View profile
Boobalan_M
Level 2

07-09-2020

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