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

AEM 6.5 | javax.crypto.spec error

Avatar

Level 2

Hi All,

 

I am getting below exception in AEM 6.5 when calling slingserlvet. Bundle is in active state. 

Am I missing any dependency to be included in pom file?

Please advise.

 

Caused by: java.lang.ClassNotFoundException: javax.crypto.spec.IvParameterSpec not found by

 

Any help is highly appreciated. 

 

Thanks,

Pradeep

5 Replies

Avatar

Community Advisor

Hi @X015206 

  can you share pom file where dependency added.

 

And I think dependency is not added at runtime. Can you try adding JCE Jar at runtime?

 

Thanks

Dipti Chauhan

Avatar

Level 2
jce.jar file I have converted to bundle Manifest-Version: 1.0 Created-By: Pradeep Bundle-ManifestVersion: 2 Bundle-Name: javaxcrypto 4.4 bundle Bundle-Description: Package javax crypto 4.4 in an OSGi bundle Bundle-Version: 4.4.0 Bundle-ClassPath: .,jce.jar Bundle-SymbolicName: javax.crypto Export-Package: javax.crypto.spec. Still it is not working. These are the dependencies added in pom file <dependencies> <!-- https://mvnrepository.com/artifact/org.osgi/org.osgi.framework --> <dependency> <groupId>org.osgi</groupId> <artifactId>org.osgi.framework</artifactId> <version>1.10.0</version> </dependency> <dependency> <groupId>net.snowflake</groupId> <artifactId>snowflake-jdbc</artifactId> <version>3.6.27</version> </dependency> <!-- https://mvnrepository.com/artifact/javax.xml.crypto/jsr105-api --> <dependency> <groupId>javax.xml.crypto</groupId> <artifactId>jsr105-api</artifactId> <version>1.0.1</version> </dependency> <!-- https://mvnrepository.com/artifact/org.bouncycastle/bcprov-jdk15on --> <dependency> <groupId>org.bouncycastle</groupId> <artifactId>bcprov-jdk15on</artifactId> <version>1.66</version> </dependency>

Avatar

Level 2
added import and export package in pom file <Export-Package> net.snowflake.*, javax.crypto.spec.* </Export-Package> <Import-Package>javax.crypto.spec.*</Import-Package> <Embed-Dependency>*;scope=compile|runtime</Embed-Dependency><Embed-Transitive>true</Embed-Transitive> still I am seeing java.lang.NoClassDefFoundError: javax/crypto/SecretKey