Uploaded image for project: 'MidPoint'
  1. MidPoint
  2. MID-4612

Ninja problem with keystore and config and chown during initialization

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.7.1, 3.8
    • Fix Version/s: 3.8
    • Component/s: Infra
    • Labels:
      None

      Description

      If Ninja can't chmod config.xml to 0660 (even though it already is
      0660!), it just fails with the strange error I reported.

      I'm trying to use Ninja in 3.7.1 to give us a nightly XML export of the
      whole repository. This works with a test instance that uses H2, but I
      can't get it to work with a real instance with PostgreSQL.

      This is not a standalone install but still through Tomcat.
      So /opt/midpoint belongs to user and group "tomcat", the user
      "mp" is member of that group and is the one
      running Ninja. I have verified that I can
      read /opt/midpoint/config.xml
      and /opt/midpoint/keystore/jceks as that user.

      java -jar /opt/midpoint/lib/ninja.jar -v -U
      jdbc:postgresql://localhost/midpoint -u midpoint -p password_here
      -m /opt/midpoint export -O /home/midpoint/backups/midpoint.xml

      But it exits with:

      Unexpected exception occurred (class
      org.springframework.beans.factory.BeanCreationException), reason: Error
      creating bean with name 'keyStoreFactory' defined in class path
      resource [ctx-configuration.xml]: Invocation of init method failed;
      nested exception is java.lang.NullPointerException

      Line 57 where NPE happened:

      File ks = new File(protectorConfig.getKeyStorePath());

      https://github.com/Evolveum/midpoint/blob/v3.7.1/repo/system-init/src/main/java/com/evolveum/midpoint/init/ConfigurableProtectorFactory.java

      protectorConfig is not null, therefore keystore path was null.

        Attachments

          Activity

            People

            Assignee:
            lazyman Viliam Repan
            Reporter:
            lazyman Viliam Repan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: