W-2 was a minesweeper of the Imperial Japanese Navy, one of the W-1 class. Wikipedia describes the class as six purpose-built minesweepers built from 1922 to 1929 under the Eight-eight Fleet Plan, to replace converted old destroyers in the sweeping role. The sources found give no builder, launch date or individual record for W-2, and no photograph of her was found.
On the night of 28 February 1942 she was one of the minesweepers of the 1st Minesweeper Division screening the Western Java invasion convoy in Bantam Bay. The cruisers Houston and Perth came upon the convoy by chance. During the action Japanese torpedoes that missed the Allied cruisers hit the Japanese ships instead. Combinedfleet.com says torpedoes fired by the cruiser Mogami sank W-2 at about 1:35 on the morning of 1 March 1942, and Wikipedia's Sunda Strait article says the same, calling the sinking friendly fire. The loss is put down to Mogami's torpedoes, which were aimed at the Allied cruisers.
She sank in the shallows of the bay, along with the transport Sakura Maru. Houston and Perth were lost in the same action.