You might check to make sure there are no records with null geometries in your map service. For example, if you are using geocoded data, and are trying to query records that are unmatched, you will get this error 1009. You would have to add something like [YOUR ORIGINAL QUERY AND Status='M'] to exclude those.