Backport rev 47356 to the branch. Fix for GLASSFISH-16816 - On methods that are not to be called throw exception that denotes the path, not a predefined static exception. Note that some classes had this change for some time already, but not all were fixed at that time.