Troubleshooting Deployment
note
Account Management API is now deprecated and we recommend that you use Account Management functionality built into Elastic Path Commerce 8.2 and later.
InvalidKeySpecException
Returned in Logs
Problem
The following exception returned in the log:
java.security.spec.InvalidKeySpecException: java.security.InvalidKeyException: IOException : DER input, Integer tag error
at sun.security.rsa.RSAKeyFactory.engineGeneratePrivate(RSAKeyFactory.java:217)
at java.security.KeyFactory.generatePrivate(KeyFactory.java:372)
at com.elasticpath.am.appauth.service.impl.AppTokenServiceImpl.activate(AppTokenServiceImpl.java:76)
Cause
The JWT private key is not specified correctly.
Solution
Ensure the following:
- The private key is created properly and is an RS256 key encoded in PKCS #8 format that is formatted on a single line
- The value of the environment variable is set on the Account Management API service