Hi Emmanuel, Thanks for your reply. I'm sure your suggestion solves my problem, however there is more to it.
I have a question about connection.loadSchema() but I asked it in another email (header is Re: custom schema objects) because it does not fit this topic. kind regards, Christoph On 02/01/2012 09:57 AM, Emmanuel Lecharny wrote: > 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. >
