Hi...

I am trying to use a ldif file to import schema into an embedded 1.5.0 ds.

The issue I found has to do with what is configured for the path to the ldif
directory on a windows machine. If this path contains any characters that
are possible hex values after the  file seperator ( '\' on windows) things
are totally screwed.
This is because the DefaultStringNormalizer interprets the presence of any
'\' characters as an escape for a hex sequence and tries to convert the
following 2 bytes as hex. This is not a problem if the path has no possible
hex values after the file seperator, but big problem otherwise.

For example: C:\dev\ldif\myldif.ldif willl never work.

Stack trace looks like this:
javax.naming.NamingException: Invalid value : C:?v\ldif\myldif.ldif
   at
org.apache.directory.shared.ldap.schema.DeepTrimToLowerNormalizer.normalize(
DeepTrimToLowerNormalizer.java:65)
   at org.apache.directory.shared.ldap.schema.CachingNormalizer.normalize(
CachingNormalizer.java:95)
   at org.apache.directory.shared.ldap.name.LdapDN.rdnOidToName(LdapDN.java
:1402)
   at org.apache.directory.shared.ldap.name.LdapDN.normalize(LdapDN.java
:1459)
   at
org.apache.directory.server.core.normalization.NormalizationService.add(
NormalizationService.java:116)
   at org.apache.directory.server.core.interceptor.InterceptorChain.add(
InterceptorChain.java:708)
   at org.apache.directory.server.core.partition.PartitionNexusProxy.add(
PartitionNexusProxy.java:341)
   at org.apache.directory.server.core.partition.PartitionNexusProxy.add(
PartitionNexusProxy.java:329)
   at
org.apache.directory.server.core.jndi.ServerDirContext.createSubcontext(
ServerDirContext.java:428)
   at
org.apache.directory.server.core.jndi.ServerDirContext.createSubcontext(
ServerDirContext.java:374)
   at org.apache.directory.server.jndi.ServerContextFactory.addFileEntry(
ServerContextFactory.java:258)
   at org.apache.directory.server.jndi.ServerContextFactory.loadLdifs(
ServerContextFactory.java:383)
   at org.apache.directory.server.jndi.ServerContextFactory.afterStartup(
ServerContextFactory.java:209)
   at org.apache.directory.server.core.DefaultDirectoryService.startup(
DefaultDirectoryService.java:268)
   at
org.apache.directory.server.core.jndi.AbstractContextFactory.getInitialContext
(AbstractContextFactory.java:123)


Does anyone know of a work around for this?

Thanks...

Reply via email to