• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with LDAP query

 
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a simple java LDAP client that is throwing an error 'Missing 'equals'; remaining name '''. I have posted the code below. I know it must be something simple I am missing. Please advise.


NOTE: The problem appears tro be on line 34, NamingEnumeration enumeration = context.search("", query, ctrl);
 
Sheriff
Posts: 3063
12
Mac IntelliJ IDE Python VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This issue goes quite a bit beyond the beginners' level. Moving to "Java in General".
 
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't nothing about LDAP, but I was looking at your code and I saw this:

env.put(Context.SECURITY_PRINCIPAL,"CN=bi_lms_bnd,OU=System Account,



By the error message, I think that your problem is that space in System Account.
 
Greenhorn
Posts: 5
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem with your code was only the variables you were submitting...


If your not sure about the LDAP attributes, download the LDAPBrowser from Softerra, it's free and will allow you to walk the LDAP environment like folders on a computer. it also shows all the attributes available to your ID (remember that many attributes are unlocked based on security).

While I am here I would also suggest breaking out the PROVIDER_URL information and setting these values as Strings to keep things easier to find in the future
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch Chris Pare
reply
    Bookmark Topic Watch Topic
  • New Topic