This error generally occurs when the toolbox that you are using is not licensed.
Try checking out the license for the Toolbox using the "license" function as follows:
license('checkout', 'toolbox_name');
If this function returns 'ans = 1' then it means that the license is valid and has been checked out.
If it fails it will show the reason as to whether the license has already been checked out or if it has expired or if it is invalid.