On 2/1/12 6:16 AM, Christoph Czurda wrote:
Hello!
Hi,
I came accross a strange issue in a unit test. (server ApacheDS 2.0)
Testing connection.exists(Dn dn) returns false.
When I test the String overload with the same dn I get true.
The code can probably explain better than words:
Dn dn;
//dn is initialized with an existing Dn.
//this test passes:
assertThat(connection.exists(dn.getName()), is(true));
//this fails. AssertionError: expected true, got false
assertThat(connection.exists(dn), is(true));
Its likely that your connection is not schema aware. Try to load the
schemas when defining your connection :
connection.loadSchema();
(note that we changed the name of this function in trunk, it's now
connection.loadDefaultSchema() :
https://issues.apache.org/jira/browse/DIRAPI-58
);
Maybe I should mention that I get lots of these messages:
2012-02-01 05:56:00,730 [NioProcessor-2] WARN
org.apache.directory.shared.asn1.ber.Asn1Decoder -
ERR_00043_REMAINING_BYTES_FOR_DECODED_PDU The PDU has been fully decoded
but there are still bytes in the buffer.
There is a bug that has been fixed yesterday :
https://issues.apache.org/jira/browse/DIRAPI-70
We will most certainly vote a new release this week.
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com