Sure, I observed some of these things and didn't always feel comfortable about it. But I wouldn't consider them hostile. The way I was told, some of the things about bars not allowing foreigners is more that they get booked for post-work drinking parties. Maybe that's not always the real explanation, but I realized it wasn't a big deal. If you're in a large city like Tokyo, Sapporo, or Kyoto, there are bars and restaurants everywhere, just move on to the next one.
As far as people coming and going out of trains or not sitting next to you, yeah, I had that happen. But I'd be lying if I said I've never observed or even done the same thing here in the US.