Ensure that build works with the updated java-mwapi.

There were a few "throws" declarations missing that are now required.

Change-Id: Ie5520cf995219fbd540d6ccaf076d3313e7c61e3