August 9, 2015 at 7:47 pm #5061
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?
MortenAugust 9, 2015 at 7:58 pm #5062Brad TumyParticipant
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.
BradAugust 9, 2015 at 8:18 pm #5064Jake FeaselModerator
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.August 9, 2015 at 8:42 pm #5065
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).
MortenAugust 9, 2015 at 10:07 pm #5066Jake FeaselModerator
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.August 10, 2015 at 3:58 am #5068
@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;
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/August 10, 2015 at 9:16 pm #5075
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?
MortenAugust 11, 2015 at 3:02 am #5080
@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
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 RajeshAugust 11, 2015 at 3:06 am #5081
@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?August 13, 2015 at 10:55 pm #5147
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.
You must be logged in to reply to this topic.