Judge attacks barristers without law degrees