+1  A: 

There is some issue with your JRE. SortControl should be in the JRE 5.

Thomas Jung
A: 

Is your Eclipse project set up for the correct Java version? As Thomas Jung points out, javax.naming.ldap.SortControl first appeared in Java 5 / 1.5. If a project is configured to use Java 1.4 or below, you'll get the error you're currently getting.

javax.naming.ldap.Control is present in 1.3 and newer, and isn't erroring, so it definitely sounds like the project/JRE version is wrong.

R. Bemrose