This topic has 9 replies, 4 voices, and was last updated 6 years, 1 month ago by Morten Lømo.

  • Author
    Posts
  • #5061
     Morten Lømo
    Participant

    Hi
    I have run sample4. It works fine. Then I have modified the sync.json file to create a mapping csv->managed/user instead of to the XML file. That also works fine.

    Now I want to use MySQL as repository instead of OrientDB. I have replaced the repo.orientdb.json file with repo.jdbc.json which I took from samples/usecase/db/mysql/. MySQL is up and running and it contains the database openidm. When I start OpenIDM (./startup.sh -p samples/sample4-test-mysql) I get a lot of errors. It starts like this:

    SEVERE: OpenICF Provisioner Service configuration has errors
    org.forgerock.json.fluent.JsonValueException: /systemActions/0/actions/0/actionFile: Failed to load the action file.
    ..
    Any clues on what I do wrongly?
    Morten

    #5062
     Brad Tumy
    Participant

    Hey Morten,

    Try shutting the OpenIDM service down, deleting all files in the felix-cache directory and restarting. It’s a good idea to clear that directory when you are making significant changes.

    Brad

    #5064
     Jake Feasel
    Moderator

    Did your MySQL repo get used to run a previous OpenIDM project? If you start it up with a different config, the previous config will still be in the DB and will be used initially (until the new files from the project folder are loaded into the DB). To prevent this, be sure to drop and recreate your repo db every time you switch projects.

    #5065
     Morten Lømo
    Participant

    Thanks and thanks. You are right. I have used the MySQL repo in a previous OpenIDM project (usecase1) and it is full of users. How do I drop and recreate the repo db? (I have done “rm -rf db/openidm”, but this obviously does not do the trick because the db is still populated with users).
    Morten

    #5066
     Jake Feasel
    Moderator

    It is a mysql database, so you drop it like you would any other MySQL db. See the MySQL docs for details. Afterward, just recreate it following the procedure outlined in the installation guide.

    #5068
     Rajesh R
    Participant

    @Morten, If you are looking to clean up the MySQL repository to be used as internal repository for ForgeRock OpenIDM, you can do the following:
    From the OS prompt (assuming you are running *nix OS):
    $ mysql -u root -p<password>
    mysql> DROP USER openidm;
    mysql> DROP DATABASE openidm;
    mysql> exit

    If it helps, I’ve posted a screen-cast on configuring MySQL as internal repository for OpenIDM at the link below:
    https://forgerock.org/2015/07/setting-up-forgerock-openidm-with-mysql/

    #5075
     Morten Lømo
    Participant

    Thanks and thanks. You were right. Dropping the database solved the problem. Now OpenIDM starts up without errors.

    But a new problem has appeared. When I press Mappings in the Admin UI to view the mappings, the Mapping UI is not displayed. Instead I get “Bad Request Error” in the UI. The only file that I changed when moving from OrientDb to MySQL is the repo file. Could it be the repo file that causes the problem? Or, how do I go about debugging the problem?
    Morten

    #5080
     Rajesh R
    Participant

    @morten Let me reiterate the steps to make MySQL the internal repository for OpenIDM:
    [Assumption here is that the OpenIDM is installed under /opt of a *nix OS]
    Make sure you’ve copied the MySQL/J connector file (.jar) to /opt/openidm/bundle directory
    1. Shutdown OpenIDM
    $ cd /opt/openidm
    $ ./shutdown.sh

    2. Remove the OrientDB file
    $ cd /opt/openidm/conf
    $ rm repo.orientdb.conf

    3. Copy the MySQL repository configuration file
    $ cp /opt/openidm/db/mysql/conf/repo.jdbc.json /opt/openidm/conf

    4. Import the DDL for IDM into MySQL
    $ mysql -u root -p < /opt/openidm/db/mysql/scripts/openidm.sql

    It’s important to update the MySQL DB configuration file (/opt/openidm/conf/repo.jdbc.json) with exact connection details to your MySQL repository (like the host where MySQL is running, the port number etc.)

    See if it helps.

    –R Rajesh

    #5081
     Rajesh R
    Participant

    @morten After you perform the steps as mentioned in my earlier post, could you try starting up the OpenIDM with the appropriate sample file (Sample4) and see if everything is fine within the UI?

    #5147
     Morten Lømo
    Participant

    Thanks. Now it works, but I don´t understand why. One thing I did, was to add a user in the User UI before I selected “Mappings” in the Admin UI. But I don´t know if that had anything to do with it. Anyway it works. I can proceed.

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.

©2021 ForgeRock - we provide an identity and access platform to secure every online relationship for the enterprise market, educational sector and even entire countries. Click to view our privacy policy and terms of use.

Log in with your credentials

Forgot your details?