java.lang.ClassCastException: org.bouncycastle.cert.X509CertificateHolder cannot be cast to org.bouncycastle.asn1.x509.SubjectPublicKeyInfo

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

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

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.