java.lang.ClassCastException

org.bouncycastle.cert.X509CertificateHolder cannot be cast to org.bouncycastle.asn1.x509.SubjectPublicKeyInfo

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web19032

  • via JIRA by Andrew Kerr, 1 year ago
    org.bouncycastle.cert.X509CertificateHolder cannot be cast to org.bouncycastle.asn1.x509.SubjectPublicKeyInfo
  • via GitHub by dmogn
    , 3 months ago
    org.bouncycastle.cert.X509CertificateHolder cannot be cast to java.security.cert.X509Certificate
  • org.bouncycastle.cert.X509CertificateHolder cannot be cast to java.security.cert.X509Certificate
  • Stack trace

    • java.lang.ClassCastException: org.bouncycastle.cert.X509CertificateHolder cannot be cast to org.bouncycastle.asn1.x509.SubjectPublicKeyInfo at com.puppetlabs.certificate_authority.CertificateAuthority.pemToPublicKey(CertificateAuthority.java:533)[puppet-server-release.jar:na] at puppetlabs.certificate_authority.core$pem__GT_public_key$fn__6957.invoke(core.clj:656)[na:na] at puppetlabs.certificate_authority.core$pem__GT_public_key.invoke(core.clj:655)[na:na] at puppetlabs.puppetserver.certificate_authority$eval9501$autosign_certificate_request_BANG___9502$fn__9506.invoke(certificate_authority.clj:738)[na:na] at puppetlabs.puppetserver.certificate_authority$eval9501$autosign_certificate_request_BANG___9502.invoke(certificate_authority.clj:721)[na:na] at puppetlabs.puppetserver.certificate_authority$eval9636$process_csr_submission_BANG___9637$fn__9641.invoke(certificate_authority.clj:825)[na:na] at puppetlabs.puppetserver.certificate_authority$eval9636$process_csr_submission_BANG___9637.invoke(certificate_authority.clj:806)[na:na] at puppetlabs.services.ca.certificate_authority_core$eval12667$handle_put_certificate_request_BANG___12668$fn__12669.invoke(certificate_authority_core.clj:41)[na:na] at puppetlabs.services.ca.certificate_authority_core$eval12667$handle_put_certificate_request_BANG___12668.invoke(certificate_authority_core.clj:36)[na:na] at puppetlabs.services.ca.certificate_authority_core$eval12743$routes__12744$fn__12745$fn__12746$fn__12753$fn__12756.invoke(certificate_authority_core.clj:284)[na:na] at compojure.core$make_route$fn__10848.invoke(core.clj:99)[na:na] at compojure.core$if_route$fn__10832.invoke(core.clj:45)[na:na] at compojure.core$if_method$fn__10825.invoke(core.clj:30)[na:na] at compojure.core$routing$fn__10854.invoke(core.clj:112)[na:na] at clojure.core$some.invoke(core.clj:2443)[puppet-server-release.jar:na] at compojure.core$routing.doInvoke(core.clj:112)[na:na] at clojure.lang.RestFn.invoke(RestFn.java:439)[puppet-server-release.jar:na] at puppetlabs.services.ca.certificate_authority_core$eval12743$routes__12744$fn__12745$fn__12746$fn__12753.invoke(certificate_authority_core.clj:283)[na:na] at compojure.core$wrap_context$fn__10909.invoke(core.clj:176)[na:na] at compojure.core$if_route$fn__10832.invoke(core.clj:45)[na:na] at compojure.core$routing$fn__10854.invoke(core.clj:112)[na:na] at clojure.core$some.invoke(core.clj:2443)[puppet-server-release.jar:na] at compojure.core$routing.doInvoke(core.clj:112)[na:na] at clojure.lang.RestFn.invoke(RestFn.java:486)[puppet-server-release.jar:na] at puppetlabs.services.ca.certificate_authority_core$eval12743$routes__12744$fn__12745$fn__12746.invoke(certificate_authority_core.clj:285)[na:na] at compojure.core$wrap_context$fn__10909.invoke(core.clj:176)[na:na] at compojure.core$if_route$fn__10832.invoke(core.clj:45)[na:na] at puppetlabs.services.ca.certificate_authority_core$wrap_with_puppet_version_header$fn__12773.invoke(certificate_authority_core.clj:293)[na:na] at puppetlabs.puppetserver.ringutils$wrap_response_logging$fn__9997.invoke(ringutils.clj:34)[na:na] at compojure.core$routing$fn__10854.invoke(core.clj:112)[na:na] at clojure.core$some.invoke(core.clj:2443)[puppet-server-release.jar:na] at compojure.core$routing.doInvoke(core.clj:112)[na:na] at clojure.lang.RestFn.invoke(RestFn.java:423)[puppet-server-release.jar:na] at puppetlabs.services.ca.certificate_authority_service$reify__12800$service_fnk__5254__auto___positional$reify__12809$fn__12810.invoke(certificate_authority_service.clj:19)[na:na] at compojure.core$wrap_context$fn__10909.invoke(core.clj:176)[na:na] at compojure.core$if_route$fn__10832.invoke(core.clj:45)[na:na] at puppetlabs.trapperkeeper.services.webserver.jetty9_core$ring_handler$fn__7605.invoke(jetty9_core.clj:299)[na:na] at puppetlabs.trapperkeeper.services.webserver.jetty9_core.proxy$org.eclipse.jetty.server.handler.AbstractHandler$0.handle(Unknown Source)[na:na] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1112)[puppet-server-release.jar:na] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1048)[puppet-server-release.jar:na] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[puppet-server-release.jar:na] at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:199)[puppet-server-release.jar:na] at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109)[puppet-server-release.jar:na] at org.eclipse.jetty.servlets.gzip.GzipHandler.handle(GzipHandler.java:325)[puppet-server-release.jar:na] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[puppet-server-release.jar:na] at org.eclipse.jetty.server.Server.handle(Server.java:459)[puppet-server-release.jar:na] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:280)[puppet-server-release.jar:na] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:229)[puppet-server-release.jar:na] at org.eclipse.jetty.io.AbstractConnection$1.run(AbstractConnection.java:505)[puppet-server-release.jar:na] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607)[puppet-server-release.jar:na] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536)[puppet-server-release.jar:na] at java.lang.Thread.run(Thread.java:745)[na:1.7.0_65]

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    You’re the first here who have seen this exception.