By default OpenDJ requires that LDIF data you import respect standards.
In particular, OpenDJ is set to check that entries to import match the
schema defined for the server. You can temporarily bypass this check by using
the --skipSchemaValidation with the
import-ldif command.
OpenDJ also ensures by default that entries have only one structural
object class. You can relax this behavior by using the advanced global
configuration property,
single-structural-objectclass-behavior. This can be useful
when importing data exported from Sun Directory Server. For example, to
warn when entries have more than one structural object class instead of
reject such entries being added, set
single-structural-objectclass-behavior:warn as
follows.
$ dsconfig set-global-configuration-prop --port 4444 --hostname `hostname` --bindDN "cn=Directory Manager" --bindPassword password --set single-structural-objectclass-behavior:warn --trustAll --no-prompt
By default, OpenDJ also checks syntax for a number of attribute types.
You can relax this behavior as well by using the dsconfig
set-attribute-syntax-prop command. See the list of attribute
syntaxes and use the --help option for further
information.
When running import-ldif, you can use the -R
option to capture entries that
could not be imported, and the rejectFile--countRejects option to
return the number of rejected entries as the import-ldif
exit code.
Once you work through the issues with your LDIF data, reinstate the default behavior to ensure automated checking.

