Pattern selector

Most relevant patterns first. Most helpful ones displayed. Click here to show all.

  1. KeyFactory.generatePublic() has thrown an InvalidKeySpecException
    Java Runtime
    7
    1
    0
  2. X509Key.decode() has thrown an InvalidKeyException
    Java Runtime
    14
    2
    1

Your stack trace compared to the selected pattern

Jump to solutionsExpand frames
java.security.InvalidKeyException: invalid key format
    at sun.security.x509.X509Key.decode(X509Key.java:387)
    at sun.security.x509.X509Key.decode(X509Key.java:403)
    at sun.security.rsa.RSAPublicKeyImpl.<init>(RSAPublicKeyImpl.java:84)
    at sun.security.rsa.RSAKeyFactory.generatePublic(RSAKeyFactory.java:298)
1 frame hidden

Solution

rafael1 year ago

Your key is invalid or you're forgetting to decode it first

Check the source of this solution for more info

External results for this pattern (10)

  1. Siva Kumarvia Stack Overflow5 months ago
    invalid key format
    Show stack trace
  2. java.security.InvalidKeyException: invalid key format
    Show stack trace
  3. 843811via Oracle Community5 months ago
    java.security.InvalidKeyException: IOException: null
    Show stack trace
  4. Unknown authorvia spigotmc.org5 months ago
    java.security.InvalidKeyException: IOException: DerInputStream.getLength(): lengthTag=127, too big.
    Show stack trace
  5. Unknown authorvia androidside.com5 months ago
    java.security.InvalidKeyException: IOException: DerInputStream.getLength(): lengthTag=122, too big.
    Show stack trace
  6. Lessvia Stack Overflow5 months ago
    java.security.InvalidKeyException:IOException: ObjectIdentifier() -- data isn't an object ID (tag = -96)
    Show stack trace
  7. java.security.InvalidKeyException: invalid key format
    Show stack trace
  8. java.security.InvalidKeyException: invalid key format
    Show stack trace
  9. jonneyvia Stack Overflow6 months ago
    java.security.InvalidKeyException: IOException: Detect premature EOF
    Show stack trace
  10. jonneyvia Stack Overflow6 months ago
    java.security.InvalidKeyException: invalid key format
    Show stack trace