mongo update query given error
More than likely there are invalid characters in your document fields/keys.
For example, you can't have a period .
or a dollar sign $
in your field names.
If you send the output from the following, I can help more.
System.out.println(data);