Add/Retrieve jpegPhoto Attribute from LDAP Server using ZK and Java

asked 2015-12-23 12:57:58 +0800

ifmis gravatar image ifmis
1 2


I am currently working on ZK Spring Web Application using Java, where Application user attributes reside in LDAP Server. Everything like authentication, etc ... works fine, but now I am in need of managing the user profile where the user can her/himself upload a photo (.jpeg, .png, .gif) as profile picture.

I created a user with the same attributes as in LDAP where byte[] userImage is one of them which should correspond to jpegPhoto.

I have an upload button which tries to bind the uploaded image to user Image as byte[] and the upload works fine but when I try to update the profile using Modification(anyone worked with LDAP undertand what I am saying), I am stack there as I get this error: (inappropriate matching), errorMessage='modify/add: jpegPhoto: no equality matching rule', diagnosticMessage='modify/add: jpegPhoto: no equality matching rule').

Please anyone with a simple Java ZK Ldap example working can help me.


delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2016-01-20 09:30:05 +0800

MarioVitale gravatar image MarioVitale
1 1

updated 2016-01-20 09:41:04 +0800

The problem isn't in zk but in ldap, the problem is "no equality matching rule".

You must modify the schema in ldap and add equality on attribute jpegPhoto; example: "attributeType ( NAME 'jpegPhoto' SYNTAX SINGLE-VALUE EQUALITY caseIgnoreMatch)"

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2015-12-23 12:57:58 +0800

Seen: 26 times

Last updated: Jan 20 '16

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More