The 1946 (current) Japanese constitution prohibits laws that discriminate on the basis of race. The 1889 (Meiji) constitution did not specifically prohibit racial discrimination in laws, but in fact race has never been an element in Japanese laws.
Because racialism exists everywhere in the world, including Japan, racial discrimination is a fairly common occurence in daily life. Most discrimination is of the innocent sort (waiters giving English menus to diners they assume cannot read Japanese because they do not "look" Japanese).
Some is of the "refusal of service" sort that can usually be dealt with by disarming the preconceptions behind the refusal (real estate agents or bar tenders saying "no gaijin" to walk-ins they have apprehensions of serving; most likely such refusals of service is related to expectations of problems resulting from language difficulties or unfamiliarity with customs. Generally all the walk-in has to do is speak and act in such a way that persuades the refuser to change their heart and accept.
Overt discrimination, in the form of "No Foreigners" and other such signs (in English or Japanese), is extremely rare in Japan. Whether the refusal is based on "race" (visual ) or "nationality" (legal status), most such refusals are actionable should someone who qualifies as a "victim" wish to sue the refuser. Usually, however, the refuser can be "persuaded" (including "pressured") to remove the sign and otherwise stop discriminating, without resorting to legal action.
Ideally, no would should have to experience refusal of service based on racial or national discrimination, just as no one should have to endure discrimination because of a disease or disability. Ideally, all parents and teachers instill in their children and students attitudes toward life that inspire them to accept other people regardless of their perceived race or nationality or state of health or ability.
In fact, Japanese mass media and textbooks contain quite a bit of documentary and other material that encourages people to accommodate others as equally human if not necessarily equal as people. Someone who can't walk is not equal to someone who can -- except as a human being. Someone who can't speak Japanese in Japan is not equal to someone who can -- again, accept as a human being.
People in Japan who can't speak Japanese, or who cannot otherwise indicate that they understand local customs, are like people who can't walk: they need special accommodation. And it is not unreasonable to decline service if one feels that one cannot provide such accommodation.
Laws provide that public facilities, including railway and subway stations, and certain classes of hotels and inns, accommodate wheelchairs. Should laws also penalize landlords, real estate agencies, hotels and inns, and public bath owners who are unable to accommodate people who can't speak Japanese, or who otherwise need special supervision because they do not understand Japanese customs?
A lot of anxiety about visually perceived "differences" that might result in "difficulties" -- whether engendered by the sight of a wheelchair, or seeing a "foreigner" or hearing a language other than Japanese -- is not malignant. It does not come from hatred or even disgust. Mostly it comes from insecurity and lack of confidence that one can deal with the expected "difficulties".
In this sense, a lot of "discrimination" has two faces: one selfish (it's too much trouble), the other altruistic (I want to help but I don't know how so I won't).
The burden of overcoming such "soft" discrimination -- motivated by anxiety and apprehension -- must be shared by those who qualify as "victims". Only in cases of "hard" discrimination -- motivated by hatred or disgust -- should qualified "victims" have recourse to legal measures that could result in court-meted and enforced punishment in the form of fines, imprisonment, or education and counselling.