Sometimes the User.xml file is corrupted or there is a missing field. You will see the field in the database, in the User Entity object in the System Administration Webapp (with a sandbox open), maybe even in the metadata/iam-features-requestactions/model-data/ModifyUserDataset.xml and CreateUserDataset.xml files. Just missing from the User.xml file.
One way to correct this issue is to hand edit the file. When doing this, use Notepad++ so you can see everything and make sure that the file stays valid (or you can use XMLSpy).
Open the file and search for the UDF section:
find the <entity-attributes> tag. Inside this tag are a collection of <attribute name= tags.
You should (in unix) grep for 'attribute name=' and check to make sure you don't have multiple missing entities, but for this example just concentrate on the one.
Copy any <attribute tag section, all the way to the </attribute> tag, and paste it below. You may have good luck copying something that looks similar to the tag that is missing.
Then do the following:
Change the name in the initial tag name="XXX" to the new field name
Change the name where it is referenced below the <name>scim</name> tag.
Change the value below the <name>max-size</name> tag to the field width. Check the database for this value.
Next go to the <target-fields> tag and find a UDF. Copy and paste a similar <field name= tag, then edit as follows:
Change the name of the initial tag name="xxx" to the new database table field name. It should start with usr_udf.
Next find the <attribute-maps> tag and find an <attribute-map> tag to copy. Copy and then:
Change the name of the entity-attribute to match.
Change the name of the target-field to match.
Next find the <metadata-attachment> tag. Below this are all of your UDFs and several of the OOTB fields. You need to make a spreadsheet of all of the <name> attributes and the the <value> attributes for those entries with category of categories.Basic User Information.
Compile this list and then sort by name. Name is a number. Look for a gap. If there is a gap, I suggest your new entry should fill the gap. If there is no gap, add one to the last value and use it. You will copy a block from the Basic User Information section and rename the value and use the number for name.
Save the file. Import it using the procedure I have outlined in my blog - search on importMetadata
Thanks for viewing my blog on Identity Management and Engineering (mostly IDM). Please follow and check out the advertisers.
Search This Blog
Thursday, December 10, 2015
Thursday, October 29, 2015
exportWeblogicMetadata obsolete
In OIM 11gR2 PS3, the weblogic.properties file states that the exportWeblogicMetadata.sh scripts are deprecated. It recommends going to the documentation to find a better way to do this.
The documentation explains that you can use the Enterprise Manager in order to perform targeted exports. I have tried this since 2012 with very little success. I always seem to specify something incorrectly.
Here's another method from the same documentation.
My technique is as follows:
1) Create a new folder for exports. It can be anywhere. For the purposes of this blog, I will use the folder location /u01/app/mds/export
2) cd to the folder $MW_HOME/oracle_common/common/bin Alternatively you could put this in your PATH. Be sure NOT to use the wlst.sh that is in the wlserver folder.
3) execute wlst.sh either through ./wlst.sh or just wlst.sh if it's in your PATH
wlst.sh
connect()
weblogic
<password>
t3://hostname:7001 or t3://admin-vhn:7001 for a clustered install
exportMetadata(application='OIMMetadata',server='oim_server1',toLocation='/u01/app/mds/export')
disconnect()
exit()
It will export all of your data to that folder. You can review all you want.
If you want to import just reverse the process:
mkdir /u01/app/mds/import
Copy only the files that you want to change, keeping their folder structure.
Edit the files (or add files as you please)
wlst.sh
connect()
weblogic
<password>
t3://hostname:7001 or t3://admin-vhn:7001 for a clustered install
importMetadata(application='OIMMetadata',server='oim_server1',fromLocation='/u01/app/mds/import')
disconnect()
exit()
Happy exporting
The documentation explains that you can use the Enterprise Manager in order to perform targeted exports. I have tried this since 2012 with very little success. I always seem to specify something incorrectly.
Here's another method from the same documentation.
My technique is as follows:
1) Create a new folder for exports. It can be anywhere. For the purposes of this blog, I will use the folder location /u01/app/mds/export
2) cd to the folder $MW_HOME/oracle_common/common/bin Alternatively you could put this in your PATH. Be sure NOT to use the wlst.sh that is in the wlserver folder.
3) execute wlst.sh either through ./wlst.sh or just wlst.sh if it's in your PATH
wlst.sh
connect()
weblogic
<password>
t3://hostname:7001 or t3://admin-vhn:7001 for a clustered install
exportMetadata(application='OIMMetadata',server='oim_server1',toLocation='/u01/app/mds/export')
disconnect()
exit()
It will export all of your data to that folder. You can review all you want.
If you want to import just reverse the process:
mkdir /u01/app/mds/import
Copy only the files that you want to change, keeping their folder structure.
Edit the files (or add files as you please)
wlst.sh
connect()
weblogic
<password>
t3://hostname:7001 or t3://admin-vhn:7001 for a clustered install
importMetadata(application='OIMMetadata',server='oim_server1',fromLocation='/u01/app/mds/import')
disconnect()
exit()
Subscribe to:
Posts (Atom)