ContainerMessage is being sent to the client, so ContainerMessageHandler will be executed on the logical client side.
This means that you can't use server classes like EntityPlayerMP and NetHandlerPlayServer, you need to get the client player instead. I do this using a method in my proxy that takes the MessageContext and returns the player. In the client proxy, I override this to return Minecraft#player if MessageContext#side#isClient returns true or MessageContext#getServerHandler#player if it doesn't. In the server proxy, I override it to return MessageContext#getServerHandler#player if MessageContext#side#isServer returns true or throw an exception if it doesn't (because something has gone wrong if you're getting a client-side MessageContext on the dedicated server).
To be safe, you should probably send the Container's ID (Container#windowId) in the packet and check that it matches the open Container's ID in your packet handler before you update it with the packet's data. Vanilla packets like SPacketSetSlot do this.