BERLIN (AP) _ The roof leaks in a main courtroom in Dresden, legal documents are piling up across former East Germany, and judges are preoccupied with investigating their own past.

Justice delayed is justice denied. But for those who shook off 40 years of Communist rule, justice is now in danger of grinding to a complete halt.

One frequently heard word is ''chaos'' in this legal system that is struggling to adopt a whole new set of laws and way of thinking.

Alexander Prechtel, chief prosecutor in the state of Mecklenburg-Lower Pomerania, says the criminal justice system is ''still not functioning at all.''

Prechtel says mistakes, unfamiliarity with the new laws adopted with German unification, and staff shortages have made court proceedings ''so chaotic that the question comes up sometimes whether it is legally justifiable.''

Such problems couldn't come at worse time.

Tens of thousands of cases have been filed by people trying to get back their nationalized property. Rulings are needed to clear the way for desperately needed outside investment.

Eviction cases - unknown during the Communist regime - are now flooding the courts as tenants fail to meet rising rents. Courts are also clogged with asylum-seekers as well as unemployed workers seeking more state help.

''In the six weeks that I have been here, I've been unable to attend a full-fledged trial in the district court because there aren't any such proceedings,'' says Guenther Hertweck, acting chief prosecutor in the state of Sachsen.

Hertweck was sent from the western German state of Baden-Wuerttemberg to help get the East's justice system on its feet.

During the hard-line Communist era, the legal system was a farce. Under the watchful eye of the omnipresent Communist secret police, many judges routinely exploited the old laws' ''rubber paragraphs'' to lock up undesirables and troublemakers.

As a result, many eastern Germans are still habitually suspicious toward authority. ''They didn't trust and still don't trust the government,'' Justice Minister Klaus Kinkel said in a television interview Friday.

The task of weeding out the judges and prosecutors who were zealous extensions of the hard-line Communist regime has been assigned to special commissions investigating each individual's past.

''But it is difficult. The proceedings are just getting under way,'' Kinkel added. He made clear that those who are cleared will have to commit themselves to a legal system ''in our sense of the word.''

The justice minister got an earful when he toured the Sachsen state capital of Dresden on Thursday. The local registry of deeds alone had a backlog of 9,569 applications, with the excess growing every day.

District court Chief Judge Klaus Kampmann, during a presentation in a large courtroom with a leaky roof, said preliminary criminal hearings have stopped for lack of judges.

Some accused criminals have filed legal objections to avoid appearing before judges who served in the old regime.

Justice officials from the five new states in eastern Germany will meet with Justice Minister Kinkel on Friday in hopes of working out the problems. But they're already saying Bonn will have to commit huge sums of money to clear up the mess.