AEM Cloud: NoClassDefFoundError when embedding Sejda WebP (com.luciad.imageio.webp) using bnd
Hi everyone,
I'm working on AEM as a Cloud Service and trying to convert JPEG/PNG images to WebP using a DAM Workflow (creating a new WebP asset programmatically).
I'm using this library: https://mvnrepository.com/artifact/org.sejda.imageio/webp-imageio
Dependency:
<dependency>
<groupId>org.sejda.imageio</groupId>
<artifactId>webp-imageio</artifactId>
<version>0.1.6</version>
</dependency>
In the bnd-maven-plugin**,** I added it as an embedded dependency:
<configuration>
<bnd>
<![CDATA[
Embed-Dependency: *;scope=compile|runtime;inline=false
]]></bnd>
</configuration>
During OSGi service activation, I am getting this error below:
java.lang.NoClassDefFoundError: com/luciad/imageio/webp/WebPImageReaderSpi
The JAR contains classes under:
com.luciad.imageio.webp.*
What am I missing here? Why am I unable to properly embed this library**?**
what are the other ways of achieving this, WebP image conversion?