Issue #57 has been updated by J?r?me Schell.
Jonathan Clarke wrote: > Hi J?r?me, > > I had a look at your patches. Thanks for posting them. > > The first one, in BeanComparator, seems pretty clear - you're handling all > binary attributes specially, and removing the new String(<binary value>). > This looks OK, except for one thing I'm unsure about : will bug #45 reappear? > We should really write a test for that. Huum, I don't think #45 will reappear as you are now handling the binary case in AbstractBean.java. Nevertheless I don't know if you should cast every values to String here, as some can now be byte[]... > About the second one, I am unclear as to what it's trying to do. Could you > provide some explanation, maybe some comments in the code or a description in > this issue? As stated in my first post on this issue, the method setUpFromObject of the org.lsc.objects.top class doesn't handle the case when attributes are of type byte[] so these attributes are not imported into the final bean. That's why I just tried in my patch to "generalize" the way attributes are filled in the bean. Is it more clear ? ;) ---------------------------------------- Bug #57: db2ldap : Binary attribute seems to be corrupted http://tools.lsc-project.org/issues/show/57 Author: J?r?me Schell Status: New Priority: Normal Assigned to: Category: Core Target version: I am in the process of syncing a MySQL database with an openldap directory. In the MySQL table, there is a blob containing a JPEG picture of the person. The SQL field is mapped directly to the jpegPhoto LDAP attribute like that: <pre> <result property="jpegPhoto" column="photo"/> </pre> The synchronization process is working fine except that the JPEG in the LDAP directory seems to be invalid. An export of the field is not a valid JPEG file and no LDAP browser displays the picture correctly. It seems that binary attributes should be handled differently than others. See that "forum post":http://www.velocityreviews.com/forums/t139104-ldap-character-encoding.html for information about this. The parameter "java.naming.ldap.attributes.binary" should contain a list of LDAP attributes to be handled as binary. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://tools.lsc-project.org/my/account -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lsc-project.org/pipermail/lsc-dev/attachments/20090617/66087e0a/attachment.htm>

