No. Massive has to do with perceived weight and size; vast has to do with extent. Only massive works in your first sentence; only vast works in your second (I can see massive being used of knowledge in a somewhat jocular way, however).
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.