Uploaded image for project: 'EJBCA'
  1. EJBCA
  2. ECA-3695

100% upgrade from EJBCA 4 to 6 fails on CertificatePolicy

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: EJBCA 6.2.2
    • Component/s: None
    • Labels:
      None
    • Issue discovered during:
      Customer

      Description

      Do a 100% upgrade from EJBCA 4 to EJBCA 6 and then sending a pkcs10 request to issue a certificate fails on a cast of certificatepolicy.

      This is changed by a "nat post-upgrade" but for 100% upgrade, this must work before post-upgrade.

      We need to handle old CertificatePolicy objects in the database.

      Stacktrace from EJBCA 6.1.2.


      23:01:00,508 ERROR [org.jboss.as.webservices.invocation.InvocationHandlerJAXWS] (http-/0.0.0.0:10503-1) JBAS015594: Method invocation failed with exception: java.lang.ClassCastException: org.ejbca.core.model.ca.certificateprofiles.CertificatePolicy cannot be cast to org.cesecore.certificates.certificateprofile.CertificatePolicy: org.cesecore.certificates.certificate.CertificateCreateException: java.lang.ClassCastException: org.ejbca.core.model.ca.certificateprofiles.CertificatePolicy cannot be cast to org.cesecore.certificates.certificateprofile.CertificatePolicy
      at org.cesecore.certificates.certificate.CertificateCreateSessionBean.createCertificate(CertificateCreateSessionBean.java:448) [cesecore-ejb.jar:]
      at org.cesecore.certificates.certificate.CertificateCreateSessionBean.createCertificate(CertificateCreateSessionBean.java:180) [cesecore-ejb.jar:]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_51]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_51]

      Caused by: java.lang.ClassCastException: org.ejbca.core.model.ca.certificateprofiles.CertificatePolicy cannot be cast to org.cesecore.certificates.certificateprofile.CertificatePolicy
      at org.cesecore.certificates.certificate.certextensions.standard.CertificatePolicies.getValue(CertificatePolicies.java:74) [cesecore-common.jar:]
      at org.cesecore.certificates.certificate.certextensions.CertificateExtension.getValueEncoded(CertificateExtension.java:161) [cesecore-common.jar:]
      at org.cesecore.certificates.ca.X509CA.generateCertificate(X509CA.java:783) [cesecore-common.jar:]

        Attachments

          Activity

            People

            Assignee:
            tomas Tomas Gustavsson
            Reporter:
            tomas Tomas Gustavsson
            Verified by:
            Mike Agrenius Kushner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: