Re: NPE doing schema-aware AD searches in LDAP API 2.0
FTR, it ended to be a client trying to fetch the schema from an Active Directory. The LDAP API can't do that at the moment, it would require some specific implementation. On 11/02/2020 23:09, Emmanuel Lécharny wrote: On 11/02/2020 22:50, Lucas Raab wrote: On Tue, Feb 11, 2020, at 07:41, Emmanuel Lécharny wrote: Hi On 11/02/2020 11:55, Lucas Raab wrote: On Tue, Feb 11, 2020, at 02:42, Emmanuel Lécharny wrote: Hi On 11/02/2020 01:17, Lucas Raab wrote: On Mon, Feb 10, 2020, at 17:37, Emmanuel Lécharny wrote: Hi ! Can you provide the stack trace, and the entry you are trying to read ? I'm interested to know on which attribute it fails. Thanks ! On 10/02/2020 22:36, Lucas Raab wrote: This time with attachments :) On Mon, Feb 10, 2020 at 03:32:36PM -0600, Lucas Raab wrote: Hello, I'm getting NPE's while attempting to read from a fresh AD install with a 2012R2 level domain. If I don't load the schema (relaxed or strict), the search runs normally. if I do load the schema, then the search throws the NPE. No error is thrown when I attempted similar searches against an OpenDJ 6.5 server. It appears to come from attempting to determine if an LdapSyntax from an AttributeType is human readable or not. The LdapSyntax object looks to be null, but is visible when dumping the AttributeType. I'm not entirely sure where the schema-aware attribute loading is happening to try and fix it myself so here I am :) Attached is a log and sample source file. I can provide credentials in a private mail for any debugging. Thanks, Lucas - To unsubscribe, e-mail: api-unsubscr...@directory.apache.org For additional commands, e-mail: api-h...@directory.apache.org - To unsubscribe, e-mail: api-unsubscr...@directory.apache.org For additional commands, e-mail: api-h...@directory.apache.org Hm, the log I attached seems to have been dropped... Here's the stack trace and let me know if you need/want more 2020-02-10 15:16:24,027 DEBUG - Attribute: cn: Test Bind 2020-02-10 15:16:24,027 DEBUG - Attribute: cn: Test Bind 2020-02-10 15:16:24,027 WARN - java.lang.NullPointerException at org.apache.directory.api.ldap.model.entry.DefaultAttribute.(DefaultAttribute.java:424) at org.apache.directory.api.ldap.model.entry.DefaultEntry.(DefaultEntry.java:324) Hmmm, it seems to be older revision than the last one. DefaultAttribute.java:424 refers to a comment in the 2.0 revision. Can you check which LDAP API revision you are using ? Thanks ! - To unsubscribe, e-mail: api-unsubscr...@directory.apache.org For additional commands, e-mail: api-h...@directory.apache.org Hi Emmanuel, I'm using LDAP API 2.0.0 retrieved via Maven if that matters. Can you check the ldap-model-api.jar MANIFEST.MF file ? I'd like to know about the version in it. Thanks ! - To unsubscribe, e-mail: api-unsubscr...@directory.apache.org For additional commands, e-mail: api-h...@directory.apache.org Looks to be 2.0.0? Attached is what I pulled out of .m2` The attachement didn't made it :/ Can you use https://send.firefox.com/ and send me the link (elecharny at apache.org). Thanks ! - To unsubscribe, e-mail: api-unsubscr...@directory.apache.org For additional commands, e-mail: api-h...@directory.apache.org - To unsubscribe, e-mail: api-unsubscr...@directory.apache.org For additional commands, e-mail: api-h...@directory.apache.org
Re: NPE doing schema-aware AD searches in LDAP API 2.0
On 11/02/2020 22:50, Lucas Raab wrote: On Tue, Feb 11, 2020, at 07:41, Emmanuel Lécharny wrote: Hi On 11/02/2020 11:55, Lucas Raab wrote: On Tue, Feb 11, 2020, at 02:42, Emmanuel Lécharny wrote: Hi On 11/02/2020 01:17, Lucas Raab wrote: On Mon, Feb 10, 2020, at 17:37, Emmanuel Lécharny wrote: Hi ! Can you provide the stack trace, and the entry you are trying to read ? I'm interested to know on which attribute it fails. Thanks ! On 10/02/2020 22:36, Lucas Raab wrote: This time with attachments :) On Mon, Feb 10, 2020 at 03:32:36PM -0600, Lucas Raab wrote: Hello, I'm getting NPE's while attempting to read from a fresh AD install with a 2012R2 level domain. If I don't load the schema (relaxed or strict), the search runs normally. if I do load the schema, then the search throws the NPE. No error is thrown when I attempted similar searches against an OpenDJ 6.5 server. It appears to come from attempting to determine if an LdapSyntax from an AttributeType is human readable or not. The LdapSyntax object looks to be null, but is visible when dumping the AttributeType. I'm not entirely sure where the schema-aware attribute loading is happening to try and fix it myself so here I am :) Attached is a log and sample source file. I can provide credentials in a private mail for any debugging. Thanks, Lucas - To unsubscribe, e-mail: api-unsubscr...@directory.apache.org For additional commands, e-mail: api-h...@directory.apache.org - To unsubscribe, e-mail: api-unsubscr...@directory.apache.org For additional commands, e-mail: api-h...@directory.apache.org Hm, the log I attached seems to have been dropped... Here's the stack trace and let me know if you need/want more 2020-02-10 15:16:24,027 DEBUG - Attribute: cn: Test Bind 2020-02-10 15:16:24,027 DEBUG - Attribute: cn: Test Bind 2020-02-10 15:16:24,027 WARN - java.lang.NullPointerException at org.apache.directory.api.ldap.model.entry.DefaultAttribute.(DefaultAttribute.java:424) at org.apache.directory.api.ldap.model.entry.DefaultEntry.(DefaultEntry.java:324) Hmmm, it seems to be older revision than the last one. DefaultAttribute.java:424 refers to a comment in the 2.0 revision. Can you check which LDAP API revision you are using ? Thanks ! - To unsubscribe, e-mail: api-unsubscr...@directory.apache.org For additional commands, e-mail: api-h...@directory.apache.org Hi Emmanuel, I'm using LDAP API 2.0.0 retrieved via Maven if that matters. Can you check the ldap-model-api.jar MANIFEST.MF file ? I'd like to know about the version in it. Thanks ! - To unsubscribe, e-mail: api-unsubscr...@directory.apache.org For additional commands, e-mail: api-h...@directory.apache.org Looks to be 2.0.0? Attached is what I pulled out of .m2` The attachement didn't made it :/ Can you use https://send.firefox.com/ and send me the link (elecharny at apache.org). Thanks ! - To unsubscribe, e-mail: api-unsubscr...@directory.apache.org For additional commands, e-mail: api-h...@directory.apache.org - To unsubscribe, e-mail: api-unsubscr...@directory.apache.org For additional commands, e-mail: api-h...@directory.apache.org
Re: NPE doing schema-aware AD searches in LDAP API 2.0
On Tue, Feb 11, 2020, at 07:41, Emmanuel Lécharny wrote: > Hi > > On 11/02/2020 11:55, Lucas Raab wrote: > > On Tue, Feb 11, 2020, at 02:42, Emmanuel Lécharny wrote: > >> Hi > >> > >> On 11/02/2020 01:17, Lucas Raab wrote: > >>> On Mon, Feb 10, 2020, at 17:37, Emmanuel Lécharny wrote: > Hi ! > > > Can you provide the stack trace, and the entry you are trying to > read ? > > I'm interested to know on which attribute it fails. > > > Thanks ! > > On 10/02/2020 22:36, Lucas Raab wrote: > > This time with attachments :) > > > > On Mon, Feb 10, 2020 at 03:32:36PM -0600, Lucas Raab wrote: > >> Hello, > >> > >> I'm getting NPE's while attempting to read from a fresh AD install with > >> a 2012R2 level domain. If I don't load the schema (relaxed or strict), > >> the search runs normally. if I do load the schema, then the search > >> throws the NPE. No error is thrown when I attempted similar searches > >> against an OpenDJ 6.5 server. > >> > >> It appears to come from attempting to determine if an LdapSyntax from > >> an AttributeType is human readable or not. The LdapSyntax object looks > >> to be null, but is visible when dumping the AttributeType. I'm not > >> entirely sure where the schema-aware attribute loading is happening to > >> try and fix it myself so here I am :) > >> > >> Attached is a log and sample source file. I can provide credentials in > >> a private mail for any debugging. > >> > >> Thanks, > >> Lucas > >> > >> - > >> To unsubscribe, e-mail: api-unsubscr...@directory.apache.org > >> For additional commands, e-mail: api-h...@directory.apache.org > - > To unsubscribe, e-mail: api-unsubscr...@directory.apache.org > For additional commands, e-mail: api-h...@directory.apache.org > > > >>> Hm, the log I attached seems to have been dropped... > >>> > >>> Here's the stack trace and let me know if you need/want more > >>> > >>> 2020-02-10 15:16:24,027 DEBUG - Attribute: cn: Test Bind > >>> 2020-02-10 15:16:24,027 DEBUG - Attribute: cn: Test Bind > >>> 2020-02-10 15:16:24,027 WARN - > >>> java.lang.NullPointerException > >>> at > >>> org.apache.directory.api.ldap.model.entry.DefaultAttribute.(DefaultAttribute.java:424) > >>> at > >>> org.apache.directory.api.ldap.model.entry.DefaultEntry.(DefaultEntry.java:324) > >> > >> Hmmm, it seems to be older revision than the last one. > >> DefaultAttribute.java:424 refers to a comment in the 2.0 revision. > >> > >> > >> Can you check which LDAP API revision you are using ? > >> > >> Thanks ! > >> > >> > >> > >> - > >> To unsubscribe, e-mail: api-unsubscr...@directory.apache.org > >> For additional commands, e-mail: api-h...@directory.apache.org > >> > >> > > Hi Emmanuel, > > > > I'm using LDAP API 2.0.0 retrieved via Maven if that matters. > > > Can you check the ldap-model-api.jar MANIFEST.MF file ? I'd like to know > about the version in it. > > Thanks ! > > > > - > To unsubscribe, e-mail: api-unsubscr...@directory.apache.org > For additional commands, e-mail: api-h...@directory.apache.org > > Looks to be 2.0.0? Attached is what I pulled out of .m2 - To unsubscribe, e-mail: api-unsubscr...@directory.apache.org For additional commands, e-mail: api-h...@directory.apache.org
Re: NPE doing schema-aware AD searches in LDAP API 2.0
Hi On 11/02/2020 11:55, Lucas Raab wrote: On Tue, Feb 11, 2020, at 02:42, Emmanuel Lécharny wrote: Hi On 11/02/2020 01:17, Lucas Raab wrote: On Mon, Feb 10, 2020, at 17:37, Emmanuel Lécharny wrote: Hi ! Can you provide the stack trace, and the entry you are trying to read ? I'm interested to know on which attribute it fails. Thanks ! On 10/02/2020 22:36, Lucas Raab wrote: This time with attachments :) On Mon, Feb 10, 2020 at 03:32:36PM -0600, Lucas Raab wrote: Hello, I'm getting NPE's while attempting to read from a fresh AD install with a 2012R2 level domain. If I don't load the schema (relaxed or strict), the search runs normally. if I do load the schema, then the search throws the NPE. No error is thrown when I attempted similar searches against an OpenDJ 6.5 server. It appears to come from attempting to determine if an LdapSyntax from an AttributeType is human readable or not. The LdapSyntax object looks to be null, but is visible when dumping the AttributeType. I'm not entirely sure where the schema-aware attribute loading is happening to try and fix it myself so here I am :) Attached is a log and sample source file. I can provide credentials in a private mail for any debugging. Thanks, Lucas - To unsubscribe, e-mail: api-unsubscr...@directory.apache.org For additional commands, e-mail: api-h...@directory.apache.org - To unsubscribe, e-mail: api-unsubscr...@directory.apache.org For additional commands, e-mail: api-h...@directory.apache.org Hm, the log I attached seems to have been dropped... Here's the stack trace and let me know if you need/want more 2020-02-10 15:16:24,027 DEBUG - Attribute: cn: Test Bind 2020-02-10 15:16:24,027 DEBUG - Attribute: cn: Test Bind 2020-02-10 15:16:24,027 WARN - java.lang.NullPointerException at org.apache.directory.api.ldap.model.entry.DefaultAttribute.(DefaultAttribute.java:424) at org.apache.directory.api.ldap.model.entry.DefaultEntry.(DefaultEntry.java:324) Hmmm, it seems to be older revision than the last one. DefaultAttribute.java:424 refers to a comment in the 2.0 revision. Can you check which LDAP API revision you are using ? Thanks ! - To unsubscribe, e-mail: api-unsubscr...@directory.apache.org For additional commands, e-mail: api-h...@directory.apache.org Hi Emmanuel, I'm using LDAP API 2.0.0 retrieved via Maven if that matters. Can you check the ldap-model-api.jar MANIFEST.MF file ? I'd like to know about the version in it. Thanks ! - To unsubscribe, e-mail: api-unsubscr...@directory.apache.org For additional commands, e-mail: api-h...@directory.apache.org
Re: NPE doing schema-aware AD searches in LDAP API 2.0
On Tue, Feb 11, 2020, at 02:42, Emmanuel Lécharny wrote: > Hi > > On 11/02/2020 01:17, Lucas Raab wrote: > > On Mon, Feb 10, 2020, at 17:37, Emmanuel Lécharny wrote: > >> Hi ! > >> > >> > >> Can you provide the stack trace, and the entry you are trying to read ? > >> > >> I'm interested to know on which attribute it fails. > >> > >> > >> Thanks ! > >> > >> On 10/02/2020 22:36, Lucas Raab wrote: > >>> This time with attachments :) > >>> > >>> On Mon, Feb 10, 2020 at 03:32:36PM -0600, Lucas Raab wrote: > Hello, > > I'm getting NPE's while attempting to read from a fresh AD install with > a 2012R2 level domain. If I don't load the schema (relaxed or strict), > the search runs normally. if I do load the schema, then the search > throws the NPE. No error is thrown when I attempted similar searches > against an OpenDJ 6.5 server. > > It appears to come from attempting to determine if an LdapSyntax from > an AttributeType is human readable or not. The LdapSyntax object looks > to be null, but is visible when dumping the AttributeType. I'm not > entirely sure where the schema-aware attribute loading is happening to > try and fix it myself so here I am :) > > Attached is a log and sample source file. I can provide credentials in > a private mail for any debugging. > > Thanks, > Lucas > > - > To unsubscribe, e-mail: api-unsubscr...@directory.apache.org > For additional commands, e-mail: api-h...@directory.apache.org > >> - > >> To unsubscribe, e-mail: api-unsubscr...@directory.apache.org > >> For additional commands, e-mail: api-h...@directory.apache.org > >> > >> > > Hm, the log I attached seems to have been dropped... > > > > Here's the stack trace and let me know if you need/want more > > > > 2020-02-10 15:16:24,027 DEBUG - Attribute: cn: Test Bind > > 2020-02-10 15:16:24,027 DEBUG - Attribute: cn: Test Bind > > 2020-02-10 15:16:24,027 WARN - > > java.lang.NullPointerException > >at > > org.apache.directory.api.ldap.model.entry.DefaultAttribute.(DefaultAttribute.java:424) > >at > > org.apache.directory.api.ldap.model.entry.DefaultEntry.(DefaultEntry.java:324) > > > Hmmm, it seems to be older revision than the last one. > DefaultAttribute.java:424 refers to a comment in the 2.0 revision. > > > Can you check which LDAP API revision you are using ? > > Thanks ! > > > > - > To unsubscribe, e-mail: api-unsubscr...@directory.apache.org > For additional commands, e-mail: api-h...@directory.apache.org > > Hi Emmanuel, I'm using LDAP API 2.0.0 retrieved via Maven if that matters. Thanks for your time looking at this! Lucas - To unsubscribe, e-mail: api-unsubscr...@directory.apache.org For additional commands, e-mail: api-h...@directory.apache.org
Re: NPE doing schema-aware AD searches in LDAP API 2.0
Hi On 11/02/2020 01:17, Lucas Raab wrote: On Mon, Feb 10, 2020, at 17:37, Emmanuel Lécharny wrote: Hi ! Can you provide the stack trace, and the entry you are trying to read ? I'm interested to know on which attribute it fails. Thanks ! On 10/02/2020 22:36, Lucas Raab wrote: This time with attachments :) On Mon, Feb 10, 2020 at 03:32:36PM -0600, Lucas Raab wrote: Hello, I'm getting NPE's while attempting to read from a fresh AD install with a 2012R2 level domain. If I don't load the schema (relaxed or strict), the search runs normally. if I do load the schema, then the search throws the NPE. No error is thrown when I attempted similar searches against an OpenDJ 6.5 server. It appears to come from attempting to determine if an LdapSyntax from an AttributeType is human readable or not. The LdapSyntax object looks to be null, but is visible when dumping the AttributeType. I'm not entirely sure where the schema-aware attribute loading is happening to try and fix it myself so here I am :) Attached is a log and sample source file. I can provide credentials in a private mail for any debugging. Thanks, Lucas - To unsubscribe, e-mail: api-unsubscr...@directory.apache.org For additional commands, e-mail: api-h...@directory.apache.org - To unsubscribe, e-mail: api-unsubscr...@directory.apache.org For additional commands, e-mail: api-h...@directory.apache.org Hm, the log I attached seems to have been dropped... Here's the stack trace and let me know if you need/want more 2020-02-10 15:16:24,027 DEBUG - Attribute: cn: Test Bind 2020-02-10 15:16:24,027 DEBUG - Attribute: cn: Test Bind 2020-02-10 15:16:24,027 WARN - java.lang.NullPointerException at org.apache.directory.api.ldap.model.entry.DefaultAttribute.(DefaultAttribute.java:424) at org.apache.directory.api.ldap.model.entry.DefaultEntry.(DefaultEntry.java:324) Hmmm, it seems to be older revision than the last one. DefaultAttribute.java:424 refers to a comment in the 2.0 revision. Can you check which LDAP API revision you are using ? Thanks ! - To unsubscribe, e-mail: api-unsubscr...@directory.apache.org For additional commands, e-mail: api-h...@directory.apache.org
Re: NPE doing schema-aware AD searches in LDAP API 2.0
On Mon, Feb 10, 2020, at 17:37, Emmanuel Lécharny wrote: > Hi ! > > > Can you provide the stack trace, and the entry you are trying to read ? > > I'm interested to know on which attribute it fails. > > > Thanks ! > > On 10/02/2020 22:36, Lucas Raab wrote: > > This time with attachments :) > > > > On Mon, Feb 10, 2020 at 03:32:36PM -0600, Lucas Raab wrote: > >> Hello, > >> > >> I'm getting NPE's while attempting to read from a fresh AD install with > >> a 2012R2 level domain. If I don't load the schema (relaxed or strict), > >> the search runs normally. if I do load the schema, then the search > >> throws the NPE. No error is thrown when I attempted similar searches > >> against an OpenDJ 6.5 server. > >> > >> It appears to come from attempting to determine if an LdapSyntax from > >> an AttributeType is human readable or not. The LdapSyntax object looks > >> to be null, but is visible when dumping the AttributeType. I'm not > >> entirely sure where the schema-aware attribute loading is happening to > >> try and fix it myself so here I am :) > >> > >> Attached is a log and sample source file. I can provide credentials in > >> a private mail for any debugging. > >> > >> Thanks, > >> Lucas > >> > >> - > >> To unsubscribe, e-mail: api-unsubscr...@directory.apache.org > >> For additional commands, e-mail: api-h...@directory.apache.org > > - > To unsubscribe, e-mail: api-unsubscr...@directory.apache.org > For additional commands, e-mail: api-h...@directory.apache.org > > Hm, the log I attached seems to have been dropped... Here's the stack trace and let me know if you need/want more 2020-02-10 15:16:24,027 DEBUG - Attribute: cn: Test Bind 2020-02-10 15:16:24,027 DEBUG - Attribute: cn: Test Bind 2020-02-10 15:16:24,027 WARN - java.lang.NullPointerException at org.apache.directory.api.ldap.model.entry.DefaultAttribute.(DefaultAttribute.java:424) at org.apache.directory.api.ldap.model.entry.DefaultEntry.(DefaultEntry.java:324) at org.apache.directory.ldap.client.api.LdapNetworkConnection.searchResultEntryReceived(LdapNetworkConnection.java:2818) at org.apache.directory.ldap.client.api.LdapNetworkConnection.messageReceived(LdapNetworkConnection.java:2944) at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:1015) at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:650) at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:49) at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:1128) at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:413) at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:257) at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:650) at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:49) at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:1128) at org.apache.mina.filter.ssl.SslHandler.flushMessageReceived(SslHandler.java:330) at org.apache.mina.filter.ssl.SslFilter.messageReceived(SslFilter.java:552) at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:650) at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:49) at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:1128) at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:122) at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:650) at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:643) at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:539) at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$1200(AbstractPollingIoProcessor.java:68) at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.process(AbstractPollingIoProcessor.java:1222) at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.process(AbstractPollingIoProcessor.java:1211) at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:683) at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at
Re: NPE doing schema-aware AD searches in LDAP API 2.0
Hi ! Can you provide the stack trace, and the entry you are trying to read ? I'm interested to know on which attribute it fails. Thanks ! On 10/02/2020 22:36, Lucas Raab wrote: This time with attachments :) On Mon, Feb 10, 2020 at 03:32:36PM -0600, Lucas Raab wrote: Hello, I'm getting NPE's while attempting to read from a fresh AD install with a 2012R2 level domain. If I don't load the schema (relaxed or strict), the search runs normally. if I do load the schema, then the search throws the NPE. No error is thrown when I attempted similar searches against an OpenDJ 6.5 server. It appears to come from attempting to determine if an LdapSyntax from an AttributeType is human readable or not. The LdapSyntax object looks to be null, but is visible when dumping the AttributeType. I'm not entirely sure where the schema-aware attribute loading is happening to try and fix it myself so here I am :) Attached is a log and sample source file. I can provide credentials in a private mail for any debugging. Thanks, Lucas - To unsubscribe, e-mail: api-unsubscr...@directory.apache.org For additional commands, e-mail: api-h...@directory.apache.org - To unsubscribe, e-mail: api-unsubscr...@directory.apache.org For additional commands, e-mail: api-h...@directory.apache.org
Re: NPE doing schema-aware AD searches in LDAP API 2.0
This time with attachments :) On Mon, Feb 10, 2020 at 03:32:36PM -0600, Lucas Raab wrote: > Hello, > > I'm getting NPE's while attempting to read from a fresh AD install with > a 2012R2 level domain. If I don't load the schema (relaxed or strict), > the search runs normally. if I do load the schema, then the search > throws the NPE. No error is thrown when I attempted similar searches > against an OpenDJ 6.5 server. > > It appears to come from attempting to determine if an LdapSyntax from > an AttributeType is human readable or not. The LdapSyntax object looks > to be null, but is visible when dumping the AttributeType. I'm not > entirely sure where the schema-aware attribute loading is happening to > try and fix it myself so here I am :) > > Attached is a log and sample source file. I can provide credentials in > a private mail for any debugging. > > Thanks, > Lucas package com.example; import org.apache.directory.api.ldap.model.cursor.CursorException; import org.apache.directory.api.ldap.model.cursor.SearchCursor; import org.apache.directory.api.ldap.model.entry.Entry; import org.apache.directory.api.ldap.model.exception.LdapException; import org.apache.directory.api.ldap.model.exception.LdapURLEncodingException; import org.apache.directory.api.ldap.model.message.*; import org.apache.directory.api.ldap.model.name.Dn; import org.apache.directory.api.ldap.model.schema.*; import org.apache.directory.api.ldap.model.schema.registries.AttributeTypeRegistry; import org.apache.directory.api.ldap.model.schema.registries.ObjectClassRegistry; import org.apache.directory.api.ldap.model.schema.registries.Schema; import org.apache.directory.api.ldap.model.url.LdapUrl; import org.apache.directory.ldap.client.api.LdapConnection; import org.apache.directory.ldap.client.api.LdapNetworkConnection; import java.io.IOException; import java.util.Collection; public class Main { public static void main(String[] args) throws LdapException, IOException { LdapUrl test = new LdapUrl("ldaps://dc1.example.com/DC=example,DC=com?cn?sub?(objectClass=person)"); LdapConnection connection = new LdapNetworkConnection( "dc1.example.com", 636, true ); System.out.println("Built connection"); int i = 0; System.out.println("Attempting to bind"); try { //connection.anonymousBind(); connection.bind("user_dn", "testtest"); System.out.println("Connection bound"); connection.loadSchemaRelaxed(); System.out.println("Loaded schema"); SearchRequest req = new SearchRequestImpl(); req.setScope(test.getScope()); for (String a : test.getAttributes()) { req.addAttributes(a); } req.setTimeLimit(0); req.setBase(test.getDn()); req.setFilter(test.getFilter()); try (SearchCursor searchCursor = connection.search(req)) { while (searchCursor.next()) { i++; Response response = searchCursor.get(); if (response instanceof SearchResultEntry) { Entry resultEntry = ((SearchResultEntry) response).getEntry(); System.out.println(resultEntry.get("cn")); } } } } catch (LdapException | NullPointerException | CursorException e) { e.printStackTrace(); } finally { System.out.println(String.format("Got %d entries", i)); connection.unBind(); //connection.close(); } } } - To unsubscribe, e-mail: api-unsubscr...@directory.apache.org For additional commands, e-mail: api-h...@directory.apache.org