search cancel

JUnit cannot use 'long format' of encrypted password in


Article ID: 8455


Updated On:


CA Application Test CA Continuous Application Insight (PathFinder) Service Virtualization


InvalidKeyException error is thrown when running tests through junit. The "lisadb.pool.common.password_enc" in '' file is by default encrypted into 'long format' which cannot be consumed by junit as 'InvalidKeyException' is thrown with below stack trace:

2016-10-31 10:29:09,558Z (10:29) [dbwriter for LISA Test Set to reproduce End Date issue writing 7 objects, started batch at 10/31/16 10:29 AM] ERROR com.itko.lisa.utils.db.ConnectionPoolManager - Could not decrypt password for pool common Illegal key size
	at javax.crypto.Cipher.checkCryptoPerm(
	at javax.crypto.Cipher.implInit(
	at javax.crypto.Cipher.chooseProvider(
	at javax.crypto.Cipher.init(
	at javax.crypto.Cipher.init(
	at com.itko.util.AESCrypto.decryptThis(


All supported DevTest releases.


This has been found to an limitation with JVM being used by JUnit which doesn't has Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files. 


Since the JUnit test is unable to consume the long format of encrypted password, to resolve this issue, installing Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files to the JVM used by JUnit resolves this issue.