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

Creating limited CertificateData fails with certain databases

    Details

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

      Description

      The test CertificateStoreSessionTest.testLimitedCertificateDataAddUpdateRemove() fails on the Hudson machine that runs Oracle database with a EJBTransactionRolledbackException caused by

      Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-01400: cannot insert NULL into ("EJBCA"."CERTIFICATEDATA"."SUBJECTDN")

      This test calls CertificateStoreSession.createLimitedCertificateData() which sets the SubjectDN to an empty string. The SubjectDN column in the CertificateData table has a condition that it should not be Null. So this error is most likely due to the fact that Oracle treats and empty string as a Null (see http://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements005.htm).

      A quick ( but ugly ) fix would be to set the SubjectDN in CertificateStoreSession.createLimitedCertificateData() to a space character instead of an empty string.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              aveen Aveen Ismail (Inactive)
              Reporter:
              aveen Aveen Ismail (Inactive)
              Verified by:
              Mike Agrenius Kushner
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: