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

Statedump import fails when there is an unconfigured EST alias

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Cosmetic
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: EJBCA 7.4.0
    • Component/s: None
    • Labels:
    • Issue discovered during:
      Another issue
    • Sprint:
      EJBCA Team Bob - 2019 w51

      Description

      Statedump import fails when there is an unconfigured EST alias.
      This causes StatedumpTest to fail, for example when running "ant test:runsys" when there is an unconfigred EST alias.

      Steps to reproduce
      1. Add an EST alias, but do not edit it.
      2. Export & import a statedump (or run StatedumpTest)

      At step 2, you get a NumberFormatException:

      java.lang.NumberFormatException: For input string: ""
      
      javax.ejb.EJBException: java.lang.NumberFormatException: For input string: ""
      [...]
      Caused by: java.lang.NumberFormatException: For input string: ""
      at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
      at java.base/java.lang.Integer.parseInt(Integer.java:662)
      at java.base/java.lang.Integer.valueOf(Integer.java:983)
      at deployment.ejbca.ear//org.ejbca.util.CAIdTools.updateCAIds(CAIdTools.java:253)
      at deployment.ejbca.ear.statedump-ejb.jar//org.ejbca.statedump.ejb.StatedumpSessionBean.importEstConfiguration(StatedumpSessionBean.java:1344)
      at deployment.ejbca.ear.statedump-ejb.jar//org.ejbca.statedump.ejb.StatedumpSessionBean.performImport(StatedumpSessionBean.java:261)
      at deployment.ejbca.ear.statedump-ejb.jar//org.ejbca.statedump.ejb.StatedumpSessionBean.performDryRun(StatedumpSessionBean.java:223)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [...]
      

        Attachments

          Activity

            People

            Assignee:
            samuel Samuel Lidén Borell
            Reporter:
            samuel Samuel Lidén Borell
            Verified by:
            Ulf Undmark
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 15 minutes
                15m