What version of the driver are you using? And what version of MongoDB? You should probably check the current driver documentation to see the recommended way to do that. As far as I can tell, that's not the way to do it with the 3.0.0 version of the Java driver. And yes, the value for "$all" should be an array. The driver might take a list though. Give it a try.
I'm taking the course at MongoDB university right now and we are using version 3.0.0. I just completed an exercise where we had to do something similar. If you want to use $all, you have to do something like this: