ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

JUnit cannot use 'long format' of encrypted password in


Article ID: 8455


Updated On:


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


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(


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. 


DevTest 10.0 on any OS


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.