Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorial:adm:systems_db_treenodes [2018/08/27 13:16]
klementm
tutorial:adm:systems_db_treenodes [2021/03/22 15:41] (current)
apeterova Fixed JDBC URL and hostname
Line 14: Line 14:
        LC_CTYPE = 'cs_CZ.UTF-8'        LC_CTYPE = 'cs_CZ.UTF-8'
        CONNECTION LIMIT = -1;        CONNECTION LIMIT = -1;
 +</code>
 +
 +<code>
 +\c jdbcTest;
 </code> </code>
 <code> <code>
Line 48: Line 52:
 {{ :tutorial:adm:sync_03.png |}} {{ :tutorial:adm:sync_03.png |}}
 Go to **Configuration** tab and fill in information about your database. Ours are as such: Go to **Configuration** tab and fill in information about your database. Ours are as such:
-<code> + 
-^ Host                 ^ jdbc:postgresql://localhost:5432/jdbcTest  ^+ 
 + 
 +Parameter            ^ Value                                      ^ 
 +Host                 localhost                                  |
 | Port                 | 5432                                       | | Port                 | 5432                                       |
 | User                 | idmadmin                                   | | User                 | idmadmin                                   |
-| User Password        | ********                                   |+| User Password        | \*\*\*\*\*\*\                            |
 | Database             | jdbcTest                                   | | Database             | jdbcTest                                   |
 | Table                | organizations                              | | Table                | organizations                              |
 | Key Column           | id                                         | | Key Column           | id                                         |
 | JDBC Driver          | org.postgresql.Driver                      | | JDBC Driver          | org.postgresql.Driver                      |
-| JDBC Connection URL  | jdbc:postgresql://localhost:5432/jdbcTest  +| JDBC Connection URL  | ``jdbc:postgresql://%h:%p/%d``          
-</code>+
 {{ :tutorial:adm:sync_04.png |}} {{ :tutorial:adm:sync_04.png |}}
 Then go to tab **Scheme** and generate scheme. Then go to tab **Scheme** and generate scheme.
Line 77: Line 84:
 Fill "code, name, parent" as in the picture: Fill "code, name, parent" as in the picture:
  
-<note warning>Attribute parent has to be type String in IDM!!!</note>+<note warning>Attribute parent has to be type String in IDM! If it's e.g. java.lang.Integer or BigDecimal in the schema, use a transformation script from the system when mapping the attribute: 
 +<code>if (attributeValue != null) { 
 + return attributeValue.toString(); 
 +
 +return attributeValue;</code></note>
  
 {{ :tutorial:adm:sync_08.png |}} {{ :tutorial:adm:sync_08.png |}}
Line 95: Line 106:
  
 <note>Thank you for trying this tutorial, I hope it was useful.</note> <note>Thank you for trying this tutorial, I hope it was useful.</note>
 +
 +===== Troubleshooting =====
 +
 +==== The number of organizations is too low (when using parents) ====
 +
 +The synchronization processes only organizations, that have consistent values in the attribute **parent**. It means, that if the value in the attribute doesn't correspond to any **identifier** of any other organizations, such organization won't be processed at all by the synchronization. The only exception is the NULL value, which means that the organization is the root organization.
 +
 +Note that the values in the parent attribute must be the identifiers of the accounts. (That may be different from the codes of organizations in IdM.)
  • by klementm