initial test sorting with ldapsearch is success, but Java code still
doesn't work.

SSS VLV OpenLDAP

moduleload sssvlv

# overlay server-side-sorting + virtual list view:
overlay sssvlv
# Sets the  maximum  number  of  concurrent  sort requests allowed
# across all connections; the default is one half of the number of
# server threads:
sssvlv-max 8
# Sets the  maximum  number of keys allowed in a sort request; the
# default is 5:
sssvlv-maxkeys 5


http://stackoverflow.com/questions/12347536/how-to-enable-virtual-listview-control-for-openldap-server


test :

http://bacedifo.blogspot.com/2009/09/server-side-sort-with-openldap2418.html

ldapsearch -h localhost -x -b dc=dev,dc=tuneeca,dc=com -E 'sss=sn'
'sn=*' sn


Note you need to add  ORDERING caseIgnoreOrderingMatch
to system.schema and core.schema (duh!)
(or make a copy)