There are some issues with it.
1. The biggest issue is your private static final Session.
Sessions are not thread safe. SessionFactories are.
2. config.buildSessionFactory() is deprecated as is probably evidenced by the strike through you most likely see in your
IDE.
3. What is it are you hoping to accomplish with your exception handling? You might want to throw an exception in your create session and see the message you are actually throwing out on that exception.
Try something more along these lines