Because of the way that ApacheDSContainer creates org.apache.directory.server.protocol.shared.store.LdifFileLoader, there's no way to pass a classpath resource as the LDIF source.
The problem is the call to String ldifFile = ldifs.getFile().getAbsolutePath(). Instead, this would ideally be ldifs.getInputStream(), with ApacheDS lobbied to create a constructor for an InputStream instead of just String.
Failing that, org.apache.directory.server.protocol.shared.store.LdifFileLoader#getLdifStream already deals with classpath resources, but ApacheDSContainer needs to not fail so fast via ldifs.getFile(), maybe via ldifs.getPath().
I'd submit a patch, but I can't build with gradle. It was too much of a PITA to get set up and I swore it off, sorry.