The only 9mm I'd feel comfortable carrying for Bear Defense is the variety with ".357" in its name.
I'm aware that Bears have been successfully dropped by everything including .22LR — it's almost as if they're made of flesh and blood or something — but I'm an advocate for carrying the most powerful firearm which can be quickly deployed and fired accurately if you're headed into bear country.
So personally, I wouldn't carry a 9mm, heck I wouldn't be completely comfortable carrying a .40 either, despite the fact that it's my favorite cartridge.
If I were headed into the woods then I would either pack my H&K USP45 Elite loaded with Buffalo Bore 230gr .45 Super FMJ or my Mossberg 590 Shockwave loaded with Brenneke Black Magic Magnum Slugs.
When it comes to something as dangerous as a bear, don't mess around with what can work, choose what absolutely WILL work!
Granted, if 9mm is all you have to work with, then go with it, but at least get the hottest loads you can find and use solid ammo, no JHPs!