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

Multiple CRLs with different CRL partition indexes after upgrade causes NonUniqueResultException

    Details

    • Issue discovered during:
      Customer

      Description

      CrlStoreSession.getLastCRLInfo wrongly assumes unique result which can cause the admin web to stop working after an upgrade of EJBCA. Since we are using surrogate keys, there is nothing preventing EJBCA from inserting multiple CRLs with the same issuer and CRL number.

      EJB Invocation failed on component CrlStoreSessionBean for method public abstract org.cesecore.certificates.crl.CRLInfo org.cesecore.certificates.crl.CrlStoreSession.getLastCRLInfo(java.lang.String,int,boolean): javax.ejb.EJBException: javax.persistence.NonUniqueResultException
      	at org.cesecore.certificates.crl.CrlStoreSessionBean.getLastCRLInfo(CrlStoreSessionBean.java:183) [cesecore-ejb.jar:EJBCA 7.4.1 Enterprise (35423)]
      Caused by: javax.persistence.NonUniqueResultException
      	at org.cesecore.util.QueryResultWrapper.getSingleResult(QueryResultWrapper.java:67) [cesecore-common.jar:EJBCA 7.4.1 Enterprise (35423)]
      	at org.cesecore.util.QueryResultWrapper.getSingleResult(QueryResultWrapper.java:41) [cesecore-common.jar:EJBCA 7.4.1 Enterprise (35423)]
      	at org.cesecore.certificates.crl.CRLData.findByIssuerDNAndCRLNumber(CRLData.java:312) [cesecore-entity.jar:EJBCA 7.4.1 Enterprise (35423)]
      	at org.cesecore.certificates.crl.CrlStoreSessionBean.getLastCRLInfo(CrlStoreSessionBean.java:165) [cesecore-ejb.jar:EJBCA 7.4.1 Enterprise (35423)]
      

      There is a similar issue in CRLData.findHighestCRLNumber.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bastianf Bastian Fredriksson
              Reporter:
              bastianf Bastian Fredriksson
              Verified by:
              Henrik Sunmark
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 5 hours
                  5h
                  Remaining:
                  Time Spent - 3 hours Remaining Estimate - 2 hours
                  2h
                  Logged:
                  Time Spent - 3 hours Remaining Estimate - 2 hours
                  3h