Prepare for the active/active mode of CA:
  publish the generated certificate immediately after the generation
fixed the NPE