According to the code this error would appear if the application cannot be found.. Please first select a database in the Domino Designer Application navigator view.. Next right click on the application (not a child of the application) and select the 'Generate XPages Registry Documentation " context menu item.
Also, please ensure that the database is open before performing the operation..
If it still fails please provide further information on the steps you are performing before getting this error.
Thanks!