Summary

When using LDAP, if a file matching "*.ldif" exists on the classpath, then it should be used, if no other LDIF file is specified. However, when using "unboundid" mode, the file on the classpath is not picked up unless explicitly specified.

Sample

This issue can be demonstrated using the LDAP sample with a few modifications. Firstly, to make the application use "unboundid" mode, replace runtime apachedsDependencies with compile "com.unboundid:unboundid-ldapsdk" in the gradle file. Then, remove ldif="classpath:users.ldif" from the s:ldap-server element. The integration tests will fail.

Comment From: eleftherias

This issue occurs because UnboundIdContainer gets the LDIF file using

this.context.getResource(this.ldif)

which expects the resource name to be prefixed with "classpath:".

However, the default LDIF file used is "classpath*:*.ldif" which indicates that multiple resources are expected.

A possible solution is to use getResources instead, in UnboundIdContainer, similarly to ApacheDSContainer