A federal judge has thrown out D.C. Mayor Marion Barry's lawsuit against former U.S. attorney Joseph E. diGenova and former attorney general Edwin Meese III, ruling that federal officials did not violate rules prohibiting the disclosure of secret grand jury information.

Barry filed suit against Justice Department officials in 1987, alleging that they had unlawfully leaked information about grand jury investigations and that the disclosures had hurt his ability to perform his official duties.

The case involved a 1987 investigation of alleged corruption in city government and a 1984 probe of Barry's relationship with convicted cocaine distributor Karen K. Johnson. It did not involve the grand jury investigation that led to Barry's indictment this year.

U.S. District Judge Aubrey E. Robinson Jr. originally dismissed the suit in July 1987, but it was reinstated by the U.S. Court of Appeals last year, with orders that Robinson hold a hearing on Barry's claims. The hearing was held May 4, and Robinson again dismissed the case last month.

D.C. Corporation Counsel Herbert O. Reid Sr. said yesterday that Barry will appeal. Robinson "ruled once before and he got reversed by the Court of Appeals," Reid said. "We do not believe he followed the strictures of the law as we think the Court of Appeals pronounced."

Robinson ruled that in each instance the news report cited by Barry either did not reveal grand jury information, proved false, was attributable to vague sources or was answered adequately by affidavits filed by the government. The government filed affidavits by 82 federal officials denying that they were the source of the leaks alleged by Barry.