Importing

Import Command

Importing into uPortal3 is done with the crn-import ant comand.

 ant crn-import -Ddir=<dir>

You can also specify a pattern parameter to match certain file names.  TODO: Describe pattern param syntax.

 This same import process is used to generate the default database when you run db-import.  The data comes from the entities directory.

 Behavior Notes

The script does not care about the folder structure of the directory, only the file suffixes.  The script will scan the directory and proceed to import everything in the correct order.  You should not import in a piecemeal fashion, put all data in one directory and import everything at once; you may encounter problems otherwise.

 Properties

There is an import.properties file under uportal-impl/src/main/resources/properties/db/entities/import.properties.  The default contents look like this:

user_profile_structure_force=true
user_profile_structure_name_default=DLM Tabs and columns

user_profile_theme_force=true
user_profile_theme_name_default=DLM XHTML

user_defaultUserName_force=true
user_defaultUserName=defaultTemplateUser

As you can see, this defines the defaultTemplateUser for use during the import and whether to force all users to have that default user.  As well as defining the struture and theme names.

Troubleshooting

Here are some issues users have encountered and the solutions to them:

[java] Caused by: java.lang.Exception: Invalid entry 'appAdmitted' for group.

I encountered this issue when importing a group that referred to an appAdmitted group. This group is a PAGS group, and I had simply forgot to setup my PAGSGroupStoreConfig.xml file.  So just remember that the import scripts will use your PAGS group and do a sanity check against them.