There can be little doubt that last fall’s gambit of halting exports of rare earths to Japan as punishment for arresting Chinese seaman has spectacularly backfired on China. The recklessness of that action sent shock waves through the boardrooms of every Japanese company that has come to rely upon China not just for raw materials, but for intermediate parts and, of course, for finished goods.

It is hard to imagine anything more detrimental to the continuing development of Japan-China trade, as well as for Japanese investment in China in ventures producing for overseas markets. In the months following the rare earths “shock,” the Japanese press carried numerous reports of companies planning to reduce sourcing from China, reconsidering investments, and even of selecting new product technologies that do not rely on rare earths. Several sogo shosha (general trading companies–the swashbuckling global “special forces” of corporate Japanese) opening talks to invest in rare earths mining in Vietnam and other countries. Even the Japanese government responded by initiating discussions with some countries for bi-lateral sources agreements.

At the same time that the Chinese government halted rare earths shipments, a number of Japanese companies manufacturing in China, notably the auto markers, began to experience labor troubles. Workers’ representatives demanded high wages and threatened strikes. Local officials seemed eager to support the workers against their foreign, particularly Japanese, employers. Not to be outdone,Wen Jiabao, the Chinese premier, weighed in with a statement about how foreign firms should be sympathetic to the demands of local employees.

And this was before the recent rises in Chinese domestic prices and wage demands, and the increasingly severe labor shortages being experienced in the coastal provinces.

In sum, what was until last year an imperative for Japanese companies not to be left out of the rush into manufacturing and sourcing in China, is now being tempered and modified by the acute awareness and concern for the strategic business risks involved. Companies are starting to take counter-measures, including relocating manufacturing facilities to Vietnam, India, and Bangladesh and generally setting limits on China-related exposure.

An article in today’s Nihon Keizai Shimbun reports that some of the companies that were leaders in China business are taking bold actions to reduce the risk. Among the main sectors are apparel and electronics. Some 90 percent of apparel sold in Japan is now China-sourced. Uniculo, which has prospered with a China-source model for some 85 percent of its domestic market apparel sales, plans to reduce this share to 70 percent in 2012. In electronics, an example is Meiko Corporation, a leader in motherboard production. This company is re-directing in investment from China to Vietnam where its factories outside Hanoi will in a few years exceed that from those in China. The Nikkei article quotes the chairman of Hitachi, which has 103 group affiliates in China, employing some 60,000 persons, as saying that the company is re-balancing its Asian production and is increasing the role of Thailand.

Of course the China market is still a strategic imperative for Japanese firms. The Nikkei article cites Ministry of Finance statistics showing that last year Japanese companies invested some JPY 628 billion in China, a figure only slightly down from the peak of JPY 731 billion set in 2007. China is the second biggest investment destination for Japanese firms after the U.S.

And no doubt the investment will continue. But so will the awareness of China risk.