<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt;"><div>Hi Drew, <br></div><div>The guide worked fine. Thanks for your support.<br></div><div><br></div><div>Huutm,<br></div><div><br></div><div class="zmail_extra_hr" style="border-top: 1px solid rgb(204, 204, 204); height: 0px; margin-top: 10px; margin-bottom: 10px; line-height: 0px;"><br></div><div class="zmail_extra" data-zbluepencil-ignore="true"><div><br></div><div id="Zm-_Id_-Sgn1">---- Trên Wed, 22 Nov 2023 13:38:22 +0700 <b>Drew Roberts <aroberts@apu.edu></b> đã viết ---<br></div><div><br></div><blockquote id="blockquote_zmail" style="margin: 0px;"><div><div dir="ltr"><div>Hey Huttm & Deshak,<br></div><div>After reviewing this further I realized I missed a few things that were in my config and are essential to make this work. I really hope there is a simpler way to do a native postgresql database because the way I got it working is ridiculous for the new recommended default option. Anyways, here's a more complete guide to my maniac method:<br></div><div><div><ol><li>Add these variables to your midPoint container:<br></li><ol><li>MP_SET_midpoint_repository_type=native<br></li><li>MP_SET_midpoint_repository_jdbcUrl=jdbc:postgresql://db.at.your.address:5432/midpoint<br></li><li>MP_SET_midpoint_repository_jdbcUsername=midpoint<br></li><li>MP_SET_midpoint_repository_jdbcPassword_FILE=/run/secrets/mp_database_password.txt<br></li><li>MP_SET_midpoint_keystore_keyStorePassword_FILE=/run/secrets/mp_keystore_password.txt<br></li></ol><li>Make sure your midPoint container does NOT have these variables:<br></li><ol><li>- REPO_DATABASE_TYPE=postgresql <br></li><li>- REPO_HOST=midpoint_data <br></li><li>- REPO_DATABASE=midpoint_db <br></li><li>- REPO_USER=midpoint <br></li><li>- REPO_PASSWORD_FILE=/run/secrets/mp_database_password.txt<br></li><li>- MP_KEYSTORE_PASSWORD_FILE=/run/secrets/mp_keystore_password.txt<br></li></ol><li>Create a config.xml file and put it in /opt/midpoint/var on your midPoint container (you could probably fill in these variables instead of using the MP_SET stuff above if you want. I prefer to use environment variables when I can):<span style="white-space : pre;"> </span><blockquote class="x_-663785064gmail_quote" style="margin : 0px 0px 0px 0.8ex; border-left : 1px solid rgb(204,204,204); padding-left : 1ex;"><div style="font-family: Consolas, "Courier New", monospace; font-weight: normal; font-size: 14px; line-height: 19px; white-space: pre; color: rgb(204, 204, 204); background-color: rgb(31, 31, 31);"><div><div style="font-family: Consolas, "Courier New", monospace; font-weight: normal; font-size: 14px; line-height: 19px; white-space: pre; color: rgb(204, 204, 204); background-color: rgb(31, 31, 31);"><div><span class="colour" style="color: rgb(128, 128, 128);"><?</span><span class="colour" style="color: rgb(86, 156, 214);">xml</span><span class="colour" style="color: rgb(156, 220, 254);"> version</span><span class="colour" style="color: rgb(204, 204, 204);">=</span><span class="colour" style="color: rgb(206, 145, 120);">"1.0"</span><span class="colour" style="color: rgb(128, 128, 128);">?></span> <div style="font-family: Consolas, "Courier New", monospace; font-weight: normal; font-size: 14px; line-height: 19px; white-space: pre; color: rgb(204, 204, 204); background-color: rgb(31, 31, 31);"><div><span class="colour" style="color: rgb(106, 153, 85);"><!--</span><br></div><div><span class="colour" style="color: rgb(106, 153, 85);"> ~ Copyright (C) 2010-2021 Evolveum and contributors</span><br></div><div><span class="colour" style="color: rgb(106, 153, 85);"> ~</span><br></div><div><span class="colour" style="color: rgb(106, 153, 85);"> ~ This work is dual-licensed under the Apache License 2.0</span><br></div><div><span class="colour" style="color: rgb(106, 153, 85);"> ~ and European Union Public License. See LICENSE file for details.</span><br></div><div><span class="colour" style="color: rgb(106, 153, 85);"> --></span><br></div><br><div><span class="colour" style="color: rgb(106, 153, 85);"><!--</span><br></div><div><span class="colour" style="color: rgb(106, 153, 85);">Example config.xml for Native PG repository.</span><br></div><div><span class="colour" style="color: rgb(106, 153, 85);">To use it:</span><br></div><div><span class="colour" style="color: rgb(106, 153, 85);">1. Copy it to $MIDPOINT_HOME, e.g. under midpoint.../var directory in the extracted archive.</span><br></div><div><span class="colour" style="color: rgb(106, 153, 85);">2. Rename the copied file in $MIDPOINT_HOME to config.xml.</span><br></div><div><span class="colour" style="color: rgb(106, 153, 85);">3. Check DB connection parameters and change them as needed.</span><br></div><div><span class="colour" style="color: rgb(106, 153, 85);">4. Start midPoint (bin/start.sh) and observe the success in $MIDPOINT_HOME/log/midpoint.log.</span><br></div><br><div><span class="colour" style="color: rgb(106, 153, 85);">For more info see:</span><br></div><br><div><span class="colour" style="color: rgb(106, 153, 85);">* midPoint home:</span><br></div><div><span class="colour" style="color: rgb(106, 153, 85);"><a href="https://docs.evolveum.com/midpoint/reference/deployment/midpoint-home-directory/" target="_blank">https://docs.evolveum.com/midpoint/reference/deployment/midpoint-home-directory/</a></span><br></div><br><div><span class="colour" style="color: rgb(106, 153, 85);">* Overriding config.xml parameters from command line:</span><br></div><div><span class="colour" style="color: rgb(106, 153, 85);"><a href="https://docs.evolveum.com/midpoint/reference/deployment/midpoint-home-directory/overriding-config-xml-parameters/" target="_blank">https://docs.evolveum.com/midpoint/reference/deployment/midpoint-home-directory/overriding-config-xml-parameters/</a></span><br></div><br><div><span class="colour" style="color: rgb(106, 153, 85);">* Repository configuration:</span><br></div><div><span class="colour" style="color: rgb(106, 153, 85);"><a href="https://docs.evolveum.com/midpoint/reference/repository/configuration/" target="_blank">https://docs.evolveum.com/midpoint/reference/repository/configuration/</a></span><br></div><br><div><span class="colour" style="color: rgb(106, 153, 85);">* Canonical config.xml auto-created if not present in $MIDPOINT_HOME (master branch):</span><br></div><div><span class="colour" style="color: rgb(106, 153, 85);"><a href="https://github.com/Evolveum/midpoint/blob/master/repo/system-init/src/main/resources/config.xml" target="_blank">https://github.com/Evolveum/midpoint/blob/master/repo/system-init/src/main/resources/config.xml</a></span><br></div><div><span class="colour" style="color: rgb(106, 153, 85);">--></span><br></div></div></div></div><<span class="colour" style="color: rgb(86, 156, 214);">configuration</span><span class="colour" style="color: rgb(128, 128, 128);">></span></div><div><span class="colour" style="color: rgb(204, 204, 204);"> </span><span class="colour" style="color: rgb(128, 128, 128);"><</span><span class="colour" style="color: rgb(86, 156, 214);">midpoint</span><span class="colour" style="color: rgb(128, 128, 128);">></span><br></div><div><span class="colour" style="color: rgb(204, 204, 204);"> </span><span class="colour" style="color: rgb(128, 128, 128);"><</span><span class="colour" style="color: rgb(86, 156, 214);">webApplication</span><span class="colour" style="color: rgb(128, 128, 128);">></span><br></div><div><span class="colour" style="color: rgb(204, 204, 204);"> </span><span class="colour" style="color: rgb(128, 128, 128);"><</span><span class="colour" style="color: rgb(86, 156, 214);">importFolder</span><span class="colour" style="color: rgb(128, 128, 128);">></span><span class="colour" style="color: rgb(204, 204, 204);">${midpoint.home}/import</span><span class="colour" style="color: rgb(128, 128, 128);"></</span><span class="colour" style="color: rgb(86, 156, 214);">importFolder</span><span class="colour" style="color: rgb(128, 128, 128);">></span><br></div><div><span class="colour" style="color: rgb(204, 204, 204);"> </span><span class="colour" style="color: rgb(128, 128, 128);"></</span><span class="colour" style="color: rgb(86, 156, 214);">webApplication</span><span class="colour" style="color: rgb(128, 128, 128);">></span><br></div><div><span class="colour" style="color: rgb(204, 204, 204);"> </span><span class="colour" style="color: rgb(128, 128, 128);"><</span><span class="colour" style="color: rgb(86, 156, 214);">repository</span><span class="colour" style="color: rgb(128, 128, 128);">></span><br></div><div><span class="colour" style="color: rgb(204, 204, 204);"> </span><span class="colour" style="color: rgb(128, 128, 128);"><</span><span class="colour" style="color: rgb(86, 156, 214);">type</span><span class="colour" style="color: rgb(128, 128, 128);">></span><span class="colour" style="color: rgb(204, 204, 204);">native</span><span class="colour" style="color: rgb(128, 128, 128);"></</span><span class="colour" style="color: rgb(86, 156, 214);">type</span><span class="colour" style="color: rgb(128, 128, 128);">></span><br></div><div><span class="colour" style="color: rgb(204, 204, 204);"> </span><span class="colour" style="color: rgb(128, 128, 128);"><</span><span class="colour" style="color: rgb(86, 156, 214);">jdbcUrl</span><span class="colour" style="color: rgb(128, 128, 128);">></span><span class="colour" style="color: rgb(204, 204, 204);">jdbc:postgresql://localhost:5432/midpoint</span><span class="colour" style="color: rgb(128, 128, 128);"></</span><span class="colour" style="color: rgb(86, 156, 214);">jdbcUrl</span><span class="colour" style="color: rgb(128, 128, 128);">></span><br></div><div><span class="colour" style="color: rgb(204, 204, 204);"> </span><span class="colour" style="color: rgb(128, 128, 128);"><</span><span class="colour" style="color: rgb(86, 156, 214);">jdbcUsername</span><span class="colour" style="color: rgb(128, 128, 128);">></span><span class="colour" style="color: rgb(204, 204, 204);">midpoint</span><span class="colour" style="color: rgb(128, 128, 128);"></</span><span class="colour" style="color: rgb(86, 156, 214);">jdbcUsername</span><span class="colour" style="color: rgb(128, 128, 128);">></span><br></div><div><span class="colour" style="color: rgb(204, 204, 204);"> </span><span class="colour" style="color: rgb(128, 128, 128);"><</span><span class="colour" style="color: rgb(86, 156, 214);">jdbcPassword</span><span class="colour" style="color: rgb(128, 128, 128);">></span><span class="colour" style="color: rgb(204, 204, 204);">password</span><span class="colour" style="color: rgb(128, 128, 128);"></</span><span class="colour" style="color: rgb(86, 156, 214);">jdbcPassword</span><span class="colour" style="color: rgb(128, 128, 128);">></span><br></div><div><span class="colour" style="color: rgb(204, 204, 204);"> </span><span class="colour" style="color: rgb(128, 128, 128);"></</span><span class="colour" style="color: rgb(86, 156, 214);">repository</span><span class="colour" style="color: rgb(128, 128, 128);">></span><br></div><div><span class="colour" style="color: rgb(204, 204, 204);"> </span><span class="colour" style="color: rgb(128, 128, 128);"><</span><span class="colour" style="color: rgb(86, 156, 214);">audit</span><span class="colour" style="color: rgb(128, 128, 128);">></span><br></div><div><span class="colour" style="color: rgb(204, 204, 204);"> </span><span class="colour" style="color: rgb(128, 128, 128);"><</span><span class="colour" style="color: rgb(86, 156, 214);">auditService</span><span class="colour" style="color: rgb(128, 128, 128);">></span><br></div><div><span class="colour" style="color: rgb(204, 204, 204);"> </span><span class="colour" style="color: rgb(128, 128, 128);"><</span><span class="colour" style="color: rgb(86, 156, 214);">auditServiceFactoryClass</span><span class="colour" style="color: rgb(128, 128, 128);">></span><span class="colour" style="color: rgb(204, 204, 204);">com.evolveum.midpoint.audit.impl.LoggerAuditServiceFactory</span><span class="colour" style="color: rgb(128, 128, 128);"></</span><span class="colour" style="color: rgb(86, 156, 214);">auditServiceFactoryClass</span><span class="colour" style="color: rgb(128, 128, 128);">></span><br></div><div><span class="colour" style="color: rgb(204, 204, 204);"> </span><span class="colour" style="color: rgb(128, 128, 128);"></</span><span class="colour" style="color: rgb(86, 156, 214);">auditService</span><span class="colour" style="color: rgb(128, 128, 128);">></span><br></div><div><span class="colour" style="color: rgb(204, 204, 204);"> </span><span class="colour" style="color: rgb(128, 128, 128);"><</span><span class="colour" style="color: rgb(86, 156, 214);">auditService</span><span class="colour" style="color: rgb(128, 128, 128);">></span><br></div><div><span class="colour" style="color: rgb(204, 204, 204);"> </span><span class="colour" style="color: rgb(128, 128, 128);"><</span><span class="colour" style="color: rgb(86, 156, 214);">auditServiceFactoryClass</span><span class="colour" style="color: rgb(128, 128, 128);">></span><span class="colour" style="color: rgb(204, 204, 204);">com.evolveum.midpoint.repo.sqale.audit.SqaleAuditServiceFactory</span><span class="colour" style="color: rgb(128, 128, 128);"></</span><span class="colour" style="color: rgb(86, 156, 214);">auditServiceFactoryClass</span><span class="colour" style="color: rgb(128, 128, 128);">></span><br></div><div><span class="colour" style="color: rgb(204, 204, 204);"> </span><span class="colour" style="color: rgb(128, 128, 128);"></</span><span class="colour" style="color: rgb(86, 156, 214);">auditService</span><span class="colour" style="color: rgb(128, 128, 128);">></span><br></div><div><span class="colour" style="color: rgb(204, 204, 204);"> </span><span class="colour" style="color: rgb(128, 128, 128);"></</span><span class="colour" style="color: rgb(86, 156, 214);">audit</span><span class="colour" style="color: rgb(128, 128, 128);">></span><br></div><div><span class="colour" style="color: rgb(204, 204, 204);"> </span><span class="colour" style="color: rgb(128, 128, 128);"><</span><span class="colour" style="color: rgb(86, 156, 214);">icf</span><span class="colour" style="color: rgb(128, 128, 128);">></span><br></div><div><span class="colour" style="color: rgb(204, 204, 204);"> </span><span class="colour" style="color: rgb(128, 128, 128);"><</span><span class="colour" style="color: rgb(86, 156, 214);">scanClasspath</span><span class="colour" style="color: rgb(128, 128, 128);">></span><span class="colour" style="color: rgb(204, 204, 204);">true</span><span class="colour" style="color: rgb(128, 128, 128);"></</span><span class="colour" style="color: rgb(86, 156, 214);">scanClasspath</span><span class="colour" style="color: rgb(128, 128, 128);">></span><br></div><div><span class="colour" style="color: rgb(204, 204, 204);"> </span><span class="colour" style="color: rgb(128, 128, 128);"><</span><span class="colour" style="color: rgb(86, 156, 214);">scanDirectory</span><span class="colour" style="color: rgb(128, 128, 128);">></span><span class="colour" style="color: rgb(204, 204, 204);">${midpoint.home}/icf-connectors</span><span class="colour" style="color: rgb(128, 128, 128);"></</span><span class="colour" style="color: rgb(86, 156, 214);">scanDirectory</span><span class="colour" style="color: rgb(128, 128, 128);">></span><br></div><div><span class="colour" style="color: rgb(204, 204, 204);"> </span><span class="colour" style="color: rgb(128, 128, 128);"></</span><span class="colour" style="color: rgb(86, 156, 214);">icf</span><span class="colour" style="color: rgb(128, 128, 128);">></span><br></div><div><span class="colour" style="color: rgb(204, 204, 204);"> </span><span class="colour" style="color: rgb(128, 128, 128);"><</span><span class="colour" style="color: rgb(86, 156, 214);">keystore</span><span class="colour" style="color: rgb(128, 128, 128);">></span><br></div><div><span class="colour" style="color: rgb(204, 204, 204);"> </span><span class="colour" style="color: rgb(128, 128, 128);"><</span><span class="colour" style="color: rgb(86, 156, 214);">keyStorePath</span><span class="colour" style="color: rgb(128, 128, 128);">></span><span class="colour" style="color: rgb(204, 204, 204);">${midpoint.home}/keystore.jceks</span><span class="colour" style="color: rgb(128, 128, 128);"></</span><span class="colour" style="color: rgb(86, 156, 214);">keyStorePath</span><span class="colour" style="color: rgb(128, 128, 128);">></span><br></div><div><span class="colour" style="color: rgb(204, 204, 204);"> </span><span class="colour" style="color: rgb(128, 128, 128);"><</span><span class="colour" style="color: rgb(86, 156, 214);">keyStorePassword</span><span class="colour" style="color: rgb(128, 128, 128);">></span><span class="colour" style="color: rgb(204, 204, 204);">changeit</span><span class="colour" style="color: rgb(128, 128, 128);"></</span><span class="colour" style="color: rgb(86, 156, 214);">keyStorePassword</span><span class="colour" style="color: rgb(128, 128, 128);">></span><br></div><div><span class="colour" style="color: rgb(204, 204, 204);"> </span><span class="colour" style="color: rgb(128, 128, 128);"><</span><span class="colour" style="color: rgb(86, 156, 214);">encryptionKeyAlias</span><span class="colour" style="color: rgb(128, 128, 128);">></span><span class="colour" style="color: rgb(204, 204, 204);">default</span><span class="colour" style="color: rgb(128, 128, 128);"></</span><span class="colour" style="color: rgb(86, 156, 214);">encryptionKeyAlias</span><span class="colour" style="color: rgb(128, 128, 128);">></span><br></div><div><span class="colour" style="color: rgb(204, 204, 204);"> </span><span class="colour" style="color: rgb(128, 128, 128);"></</span><span class="colour" style="color: rgb(86, 156, 214);">keystore</span><span class="colour" style="color: rgb(128, 128, 128);">></span><br></div><div><span class="colour" style="color: rgb(204, 204, 204);"> </span><span class="colour" style="color: rgb(128, 128, 128);"></</span><span class="colour" style="color: rgb(86, 156, 214);">midpoint</span><span class="colour" style="color: rgb(128, 128, 128);">></span><br></div><div><span class="colour" style="color: rgb(128, 128, 128);"></</span><span class="colour" style="color: rgb(86, 156, 214);">configuration</span><span class="colour" style="color: rgb(128, 128, 128);">></span><br></div></div></blockquote></li><li>Set things so your midPoint container doesn't boot til after your database is configured<br></li><li>Recreate
this logic somehow on the database container for the first launch
(maybe make an init container to run these commands or something?):<br><blockquote class="x_-663785064gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">sudo su - postgres<br>psql<br>CREATE USER midpoint WITH PASSWORD '<PASSWORD>' LOGIN SUPERUSER; <br>CREATE
DATABASE midpointdev WITH OWNER = midpoint ENCODING = 'UTF8' TABLESPACE
= pg_default LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8'
CONNECTION LIMIT = -1;<br>\q<br><br>curl <a href="https://raw.githubusercontent.com/Evolveum/midpoint/support-4.8/config/sql/native/postgres.sql" target="_blank">https://raw.githubusercontent.com/Evolveum/midpoint/support-4.8/config/sql/native/postgres.sql</a> --output postgres.sql<br>curl <a href="https://raw.githubusercontent.com/Evolveum/midpoint/support-4.8/config/sql/native/postgres-audit.sql" target="_blank">https://raw.githubusercontent.com/Evolveum/midpoint/support-4.8/config/sql/native/postgres-audit.sql</a> --output postgres-audit.sql<br>curl <a href="https://raw.githubusercontent.com/Evolveum/midpoint/support-4.8/config/sql/native/postgres-quartz.sql" target="_blank">https://raw.githubusercontent.com/Evolveum/midpoint/support-4.8/config/sql/native/postgres-quartz.sql</a> --output postgres-quartz.sql<br><br>psql -h localhost -d midpointdev -U midpoint -f postgres.sql -f postgres-audit.sql -f postgres-quartz.sql</blockquote></li></ol><div><br></div><div>I hope this time I've included everything you need to get it going. Apologies for the incomplete information before.<br></div></div></div></div><br><div class="x_-663785064gmail_quote"><div dir="ltr" class="x_-663785064gmail_attr">On Tue, Nov 21, 2023 at 9:37 PM lazy tech <<a href="mailto:huutm@lazytech.biz.vn" target="_blank">huutm@lazytech.biz.vn</a>> wrote:<br></div><div id="zmail_block"><br></div></div><br><br><span class="x_-663785064gmail_signature_prefix">-- </span><br><div dir="ltr" class="x_-663785064gmail_signature"><div dir="ltr"><div style="font-family: sans-serif; font-size: 12px; line-height: 1.5em;"><b>Drew Roberts</b> | <b>Systems Administrator II</b><br>IT Platform Engineering, Azusa Pacific University<br><a href="https://apu.edu" target="_blank">apu.edu</a> <br><br><img style="width : 210px;" id="1700635102462100001_imgsrc_url_0" alt="APU logo" width="210"></div></div></div></div><blockquote class="x_-663785064gmail_quote" style="margin : 0px 0px 0px 0.8ex; border-left : 1px solid rgb(204,204,204); padding-left : 1ex;"><u></u><div><div style="font-family : Verdana, Arial, Helvetica, sans-serif; font-size : 10pt;"><div>Hello Drew,<br></div><div><span class="colour" style="color: rgb(15, 15, 15);"><span class="size" style="font-size: 16px; font-style: normal; font-weight: 400; letter-spacing: normal; text-indent: 0px; text-transform: none; word-spacing: 0px; white-space: pre-wrap; float: none; display: inline;"><span class="colour" style="color: rgb(15, 15, 15);"><span class="size" style="font-size: 16px; font-style: normal; font-weight: 400; letter-spacing: normal; text-indent: 0px; text-transform: none; word-spacing: 0px; white-space: pre-wrap; float: none; display: inline;">I followed the same steps as outlined in your guide, but I am still encountering an error. Could you provide further assistance?</span></span></span></span><br></div><div><br></div><div>2023-11-22 12:05:30 ... 94 common frames omitted <br></div><div>2023-11-22 12:05:30 Caused by: com.evolveum.midpoint.util.exception.SystemException: AuditServiceFactory implementation class com.evolveum.midpoint.repo.sql.SqlAuditServiceFactory failed to initialize: Couldn't find AuditServiceFactory for class com.evolveum.midpoint.repo.sql.SqlAuditServiceFactory<br></div><div>2023-11-22 12:05:30 at com.evolveum.midpoint.init.AuditFactory.init(AuditFactory.java:84)<br></div><div>2023-11-22 12:05:30 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br></div><div>2023-11-22 12:05:30 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)<br></div><div>2023-11-22 12:05:30 at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br></div><div>2023-11-22 12:05:30 at java.base/java.lang.reflect.Method.invoke(Method.java:568)<br></div><div>2023-11-22 12:05:30 at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMethod.invoke(InitDestroyAnnotationBeanPostProcessor.java:457)<br></div><div>2023-11-22 12:05:30 at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:401)<br></div><div>2023-11-22 12:05:30 at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:219)<br></div><div>2023-11-22 12:05:30 ... 115 common frames omitted<br></div><div>2023-11-22 12:05:30 Caused by: com.evolveum.midpoint.util.exception.SystemException: Couldn't find AuditServiceFactory for class com.evolveum.midpoint.repo.sql.SqlAuditServiceFactory<br></div><div>2023-11-22 12:05:30 at com.evolveum.midpoint.init.AuditFactory.getFactory(AuditFactory.java:97)<br></div><div>2023-11-22 12:05:30 at com.evolveum.midpoint.init.AuditFactory.init(AuditFactory.java:75)<br></div><div>2023-11-22 12:05:30 ... 122 common frames omitted<br></div><div>2023-11-22 12:05:30 ERROR initializing midPoint: org.springframework.context.ApplicationContextException: Unable to start web server<br></div><div>2023-11-22 12:05:30 ROOT cause: com.evolveum.midpoint.util.exception.SystemException: Couldn't find AuditServiceFactory for class com.evolveum.midpoint.repo.sql.SqlAuditServiceFactory<br></div><div>2023-11-22 12:05:30 See midpoint.log for more details.<br></div><div><br></div><div><br></div><div>Thanks,<br></div><div>Huutm<br></div><div><br></div><div style="border-top : 1px solid rgb(204,204,204); min-height: 0px; margin-top : 10px; margin-bottom : 10px; line-height : 0px;"><br></div><div><div><br></div><div id="x_-663785064m_-4560778357358216661Zm-_Id_-Sgn1">---- Trên Tue, 14 Nov 2023 23:42:18 +0700 <b>Drew Roberts via midPoint <<a href="mailto:midpoint@lists.evolveum.com" target="_blank">midpoint@lists.evolveum.com</a>></b> đã viết ---<br></div><div><br></div><blockquote id="x_-663785064m_-4560778357358216661blockquote_zmail" style="margin : 0px;"><div><div dir="ltr"><div>Hey Deshak,<br></div><div><br></div><div>That's the error you should get if you only did the first step I gave you. Run the commands I gave you in step 3 on the database, then reboot the midpoint container and your issue should be resolved.<br></div></div><br><div><div dir="ltr">On Tue, Nov 14, 2023 at 4:45 AM BHATNAGAR Deshak <<a href="mailto:deshak.bhatnagar@thalesgroup.com" target="_blank">deshak.bhatnagar@thalesgroup.com</a>> wrote:<br></div><blockquote style="margin : 0px 0px 0px 0.8ex; border-left : 1px solid rgb(204,204,204); padding-left : 1ex;"><div><div><div><p style="margin : 0in;"><span class="colour" style="color: green;"><span class="size" style="font-size: 10pt;">THALES GROUP LIMITED DISTRIBUTION to email recipients </span></span><u></u><u></u><br></p><p style="margin-top : 0px; margin-bottom : 0px;"><u></u> <u></u><br></p><p style="margin-top: 0px; margin-bottom: 0px;">Hello Drew,<u></u><u></u><br></p><p style="margin-top : 0px; margin-bottom : 0px;"><u></u> <u></u><br></p><p style="margin-top: 0px; margin-bottom: 0px;">Thanks for the swift reply and the possible solution.<u></u><u></u><br></p><p style="margin-top : 0px; margin-bottom : 0px;"><u></u> <u></u><br></p><p style="margin-top: 0px; margin-bottom: 0px;">I tried the same as explained below but faced another error:<u></u><u></u><br></p><p style="margin-top : 0px; margin-bottom : 0px;"><u></u> <u></u><br></p><p style="margin-top: 0px; margin-bottom: 0px;">ERROR initializing midPoint: org.springframework.context.ApplicationContextException: Unable to start web server<u></u><u></u><br></p><p style="margin-top: 0px; margin-bottom: 0px;">ROOT cause: org.postgresql.util.PSQLException: ERROR: relation "m_global_metadata" does not exist<u></u><u></u><br></p><p style="margin-top: 0px; margin-bottom: 0px;"> Position: 31<u></u><u></u><br></p><p style="margin-top : 0px; margin-bottom : 0px;"><u></u> <u></u><br></p><p style="margin-top: 0px; margin-bottom: 0px;">I have attached the complete error below in the error 14 Nov 2023 file.<u></u><u></u><br></p><p style="margin-top : 0px; margin-bottom : 0px;"><u></u> <u></u><br></p><p style="margin-top: 0px; margin-bottom: 0px;">It would be great if you can share the docker-compose & and any other adjustments or changes you have made to your setup, so I can get a better understanding of it. <u></u><u></u><br></p><p style="margin-top : 0px; margin-bottom : 0px;"><u></u> <u></u><br></p><p style="margin-top : 0px; margin-bottom : 0px;"><span class="colour" style="color: rgb(31, 73, 125);">Kind regards,</span><span class="colour" style="color: black;"><u></u><u></u></span><br></p><p style="margin-top : 0px; margin-bottom : 0px;"><span class="colour" style="color: rgb(31, 73, 125);">Deshak Bhatnagar </span><span class="colour" style="color: black;"><u></u><u></u></span><br></p><div style="border-width : 1pt medium medium; border-style : solid none none; border-color : rgb(225,225,225) currentcolor currentcolor; padding : 3pt 0in 0in;"><p style="margin-top: 0px; margin-bottom: 0px;"><b>From:</b> Drew Roberts <<a href="mailto:aroberts@apu.edu" target="_blank">aroberts@apu.edu</a>> <br> <b>Sent:</b> Saturday, November 11, 2023 3:50 AM<br> <b>To:</b> midPoint General Discussion <<a href="mailto:midpoint@lists.evolveum.com" target="_blank">midpoint@lists.evolveum.com</a>><br> <b>Cc:</b> BHATNAGAR Deshak <<a href="mailto:deshak.bhatnagar@thalesgroup.com" target="_blank">deshak.bhatnagar@thalesgroup.com</a>><br> <b>Subject:</b> Re: [External] Re: [midPoint] Unable to deploy midPoint 4.8 with postgresql using Docker<u></u><u></u></p></div><p style="margin-top : 0px; margin-bottom : 0px;"><u></u> <u></u><br></p><div><div><p style="margin-top: 0px; margin-bottom: 0px;">Hey Deshak,<u></u><u></u><br></p></div><div><p style="margin-top : 0px; margin-bottom : 0px;"><u></u> <u></u><br></p></div><div><p style="margin-top: 0px; margin-bottom: 0px;">If you take a look at the <a href="https://docs.evolveum.com/midpoint/release/4.8/" target="_blank"> Release Notes for midPoint 4.8</a> and use your browser's Find function with the term "native", a couple results in you'll see:<u></u><u></u><br></p></div><blockquote style="border-width : medium medium medium 1pt; border-style : none none none solid; border-color : currentcolor currentcolor currentcolor rgb(204,204,204); padding : 0in 0in 0in 6pt; margin : 5pt 0in 5pt 4.8pt;"><div><ul><li>Generic Repository with PostgreSQL is not supported, if you are using PostgreSQL with generic repository, please migrate to <a href="https://docs.evolveum.com/midpoint/reference/master/repository/native-postgresql/" target="_blank"> PostgreSQL native repository</a>. <u></u><u></u><br></li></ul></div></blockquote><div><p style="margin-top: 0px; margin-bottom: 0px;">I believe the issue you're experiencing is due to this change. My environment and setup are slightly different from yours so your mileage may vary but here are my two cents:<u></u><u></u><br></p></div><div><ol start="1" type="1"><li>Add a MP_SET_midpoint_repository_type=native environment variable to your midPoint container<u></u><u></u><br></li><li>Set things so your midPoint container doesn't boot til after your database is configured<u></u><u></u><br></li><li>Recreate this logic somehow on the database container for the first launch (maybe make an init container to run these commands or something?):<u></u><u></u><br></li></ol><blockquote style="border-width : medium medium medium 1pt; border-style : none none none solid; border-color : currentcolor currentcolor currentcolor rgb(204,204,204); padding : 0in 0in 0in 6pt; margin : 5pt 0in 5pt 4.8pt;"><p style="margin-left: 0.5in; margin-top: 0px; margin-bottom: 0px;">sudo su - postgres<br> psql<br> CREATE USER midpoint WITH PASSWORD '<PASSWORD>' LOGIN SUPERUSER; <br> CREATE DATABASE midpointdev WITH OWNER = midpoint ENCODING = 'UTF8' TABLESPACE = pg_default LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8' CONNECTION LIMIT = -1;<br> \q<br> <br> curl <a href="https://raw.githubusercontent.com/Evolveum/midpoint/support-4.8/config/sql/native/postgres.sql" target="_blank"> https://raw.githubusercontent.com/Evolveum/midpoint/support-4.8/config/sql/native/postgres.sql</a> --output postgres.sql<br> curl <a href="https://raw.githubusercontent.com/Evolveum/midpoint/support-4.8/config/sql/native/postgres-audit.sql" target="_blank"> https://raw.githubusercontent.com/Evolveum/midpoint/support-4.8/config/sql/native/postgres-audit.sql</a> --output postgres-audit.sql<br> curl <a href="https://raw.githubusercontent.com/Evolveum/midpoint/support-4.8/config/sql/native/postgres-quartz.sql" target="_blank"> https://raw.githubusercontent.com/Evolveum/midpoint/support-4.8/config/sql/native/postgres-quartz.sql</a> --output postgres-quartz.sql<br> <br> psql -h localhost -d midpointdev -U midpoint -f postgres.sql -f postgres-audit.sql -f postgres-quartz.sql<u></u><u></u></p></blockquote></div></div><p style="margin-top : 0px; margin-bottom : 0px;"><u></u> <u></u><br></p><div><div><p style="margin-top: 0px; margin-bottom: 0px;">On Fri, Nov 10, 2023 at 8:37 AM BHATNAGAR Deshak via midPoint <<a href="mailto:midpoint@lists.evolveum.com" target="_blank">midpoint@lists.evolveum.com</a>> wrote:<u></u><u></u><br></p></div><blockquote style="border-width : medium medium medium 1pt; border-style : none none none solid; border-color : currentcolor currentcolor currentcolor rgb(204,204,204); padding : 0in 0in 0in 6pt; margin : 5pt 0in 5pt 4.8pt;"><div><div><div><p style="margin : 0in;"><span class="colour" style="color: green;"><span class="size" style="font-size: 10pt;">THALES GROUP LIMITED DISTRIBUTION to email recipients </span></span><u></u><u></u><br></p><p style="margin-top : 0px; margin-bottom : 0px;"> <u></u><u></u><br></p><p style="margin-top: 0px; margin-bottom: 0px;">Added the docker-compose for reference.<u></u><u></u><br></p><p style="margin-top : 0px; margin-bottom : 0px;"> <u></u><u></u><br></p><p style="margin-top: 0px; margin-bottom: 0px;">Thanks<u></u><u></u><br></p><div><div style="border-width : 1pt medium medium; border-style : solid none none; padding : 3pt 0in 0in; border-color : currentcolor;"><p style="margin-top: 0px; margin-bottom: 0px;"><b>From:</b> BHATNAGAR Deshak <br> <b>Sent:</b> Friday, November 10, 2023 9:43 PM<br> <b>To:</b> <a href="mailto:midpoint@lists.evolveum.com" target="_blank">midpoint@lists.evolveum.com</a><br> <b>Subject:</b> Unable to deploy midPoint 4.8 with postgresql using Docker<u></u><u></u></p></div></div><p style="margin-top : 0px; margin-bottom : 0px;"> <u></u><u></u><br></p><p style="margin : 0in;"><span class="colour" style="color: green;"><span class="size" style="font-size: 10pt;">THALES GROUP LIMITED DISTRIBUTION to email recipients </span></span><u></u><u></u><br></p><p style="margin-top : 0px; margin-bottom : 0px;"> <u></u><u></u><br></p><p style="margin-top: 0px; margin-bottom: 0px;">Hello midpoint community,<u></u><u></u><br></p><p style="margin-top: 0px; margin-bottom: 0px;">I am deploying the Evolveum midpoint 4.8 with postgresql using Docker but I am facing the below mentioned error:<u></u><u></u><br></p><p style="margin-top : 0px; margin-bottom : 0px;"> <u></u><u></u><br></p><p style="margin-top: 0px; margin-bottom: 0px;">ERROR initializing midPoint: org.springframework.context.ApplicationContextException: Unable to start web server<u></u><u></u><br></p><p style="margin-top: 0px; margin-bottom: 0px;">ROOT cause: com.evolveum.midpoint.util.exception.SystemException: DB script (/sql/postgresql-4.6-all.sql) couldn't be found<u></u><u></u><br></p><p style="margin-top : 0px; margin-bottom : 0px;"> <u></u><u></u><br></p><p style="margin-top: 0px; margin-bottom: 0px;">This above error occurs because the system is not able to create required database tables, the log file is attached below (log file (error))<u></u><u></u><br></p><p style="margin-top : 0px; margin-bottom : 0px;"> <u></u><u></u><br></p><p style="margin-top: 0px; margin-bottom: 0px;">I was previously using the LTS version midpoint 4.4.4 and used the same docker-compose file with changes to midpoint 4.8 image and postgresql-16 image.<u></u><u></u><br></p><p style="margin-top : 0px; margin-bottom : 0px;"> <u></u><u></u><br></p><p style="margin-top: 0px; margin-bottom: 0px;">I have tried with all the recommended version of both midpoint 4.8 as well as postgresql db.<u></u><u></u><br></p><p style="margin-top : 0px; margin-bottom : 0px;"> <u></u><u></u><br></p><p style="margin-top: 0px; margin-bottom: 0px;">But the error remains the same in all cases.<u></u><u></u><br></p><p style="margin-top : 0px; margin-bottom : 0px;"> <u></u><u></u><br></p><p style="margin-top: 0px; margin-bottom: 0px;">Also, a similar error was reported on the Jira of Evolveum regarding the schema validation in which the database tables were not created: <a href="https://jira.evolveum.com/projects/MID/issues/MID-9258?filter=doneissues" target="_blank"> https://jira.evolveum.com/projects/MID/issues/MID-9258?filter=doneissues</a> <u></u> <u></u><br></p><p style="margin-top : 0px; margin-bottom : 0px;"> <u></u><u></u><br></p><p style="margin-top: 0px; margin-bottom: 0px;">As per the conclusion drawn after my troubleshooting. <u></u><u></u><br></p><p style="margin-top: 0px; margin-bottom: 0px;">I found out that the config/sql file in midpoint 4.8 repository on Github do not have the above-mentioned file in the error i.e., postgresql-4.6-all.sql (<a href="https://github.com/Evolveum/midpoint/tree/v4.8/config/sql/native" target="_blank">https://github.com/Evolveum/midpoint/tree/v4.8/config/sql/native</a>). <u></u><u></u><br></p><p style="margin-top : 0px; margin-bottom : 0px;"> <u></u><u></u><br></p><p style="margin-top: 0px; margin-bottom: 0px;">In-comparison, all of the previous versions of midpoint on the Github had the file (postgresql-4.6-all.sql) in their respective repositories, for example: midpoint 4.7.2 had the
file postgresql-4.6-all.sql in it on the Github (<a href="https://github.com/Evolveum/midpoint/tree/v4.7.2/config/sql/native-new" target="_blank">https://github.com/Evolveum/midpoint/tree/v4.7.2/config/sql/native-new</a>). <u></u><u></u><br></p><p style="margin-top : 0px; margin-bottom : 0px;"> <u></u><u></u><br></p><p style="margin-top: 0px; margin-bottom: 0px;">So, I suspect that the issue is caused due to the file being missing in the repositories. <u></u><u></u><br></p><p style="margin-top : 0px; margin-bottom : 0px;"> <u></u><u></u><br></p><p style="margin-top: 0px; margin-bottom: 0px;">Please resolve the above issue or let me know the way that I can resolve this. <u></u><u></u><br></p><p style="margin-top : 0px; margin-bottom : 0px;"> <u></u><u></u><br></p><p style="margin-top: 0px; margin-bottom: 0px;">docker-compose is also attached for the reference.<u></u><u></u><br></p><p style="margin-top : 0px; margin-bottom : 0px;"><span class="colour" style="color: rgb(31, 73, 125);"> </span><u></u><u></u><br></p><p style="margin-top : 0px; margin-bottom : 0px;"><span class="colour" style="color: rgb(31, 73, 125);">Thanks.</span><u></u><u></u><br></p><p style="margin-top : 0px; margin-bottom : 0px;"><span class="colour" style="color: rgb(31, 73, 125);"> </span><u></u><u></u><br></p><p style="margin-top : 0px; margin-bottom : 0px;"><span class="colour" style="color: rgb(31, 73, 125);">Kind regards,</span><u></u><u></u><br></p><p style="margin-top : 0px; margin-bottom : 0px;"><span class="colour" style="color: rgb(31, 73, 125);">Deshak Bhatnagar</span><u></u><u></u><br></p></div></div><p style="margin-top: 0px; margin-bottom: 0px;">_______________________________________________<br> midPoint mailing list<br> <a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a><br> <a href="https://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">https://lists.evolveum.com/mailman/listinfo/midpoint</a><u></u><u></u></p></div></blockquote></div><p style="margin-top : 0px; margin-bottom : 0px;"><br><br><span>-- </span><u></u><u></u></p><div><div><div><p style="line-height : 18pt; margin-top : 0px; margin-bottom : 0px;"><b><span class="font" style="font-family:Arial, sans-serif"><span class="size" style="font-size: 9pt;">Drew Roberts</span></span></b><span class="font" style="font-family:Arial, sans-serif"><span class="size" style="font-size: 9pt;"> | <b>Systems Administrator II</b><br> IT Platform Engineering, Azusa Pacific University<br> <a href="https://apu.edu" target="_blank">apu.edu</a> <br> <br> </span></span><span class="font" style="font-family:Arial, sans-serif"><span class="size" style="font-size:9pt"><img border="0" width="9.5833in" height="2.3416in" style="width : 9.5833in; height : 2.3416in;" alt="APU logo" src=""></span></span><span class="font" style="font-family:Arial, sans-serif"><span class="size" style="font-size:9pt"><u></u><u></u></span></span></p></div></div></div></div></div></div></blockquote></div><br><br><span>-- </span><br><div dir="ltr"><div dir="ltr"><div style="font-family: sans-serif; font-size: 12px; line-height: 1.5em;"><b>Drew Roberts</b> | <b>Systems Administrator II</b><br>IT Platform Engineering, Azusa Pacific University<br><a href="https://apu.edu" target="_blank">apu.edu</a> <br><br><img style="width : 210px;" alt="APU logo" width="210" src=""></div></div></div>_______________________________________________<br>midPoint mailing list<br><a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a><br><a href="https://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">https://lists.evolveum.com/mailman/listinfo/midpoint</a><br></div></blockquote></div><div><br></div></div><br></div></blockquote></blockquote></div><div><br></div></div><br></body></html>