When compiling my application I received this error from the image below, would anyone know how I could solve it?
When compiling my application I received this error from the image below, would anyone know how I could solve it?
"Check to determine if the object is null before calling the method". The program itself answers your question.
Your method tries to return a session without even checking for an initialized instance, that is, without knowing whether a session was created or not. You need to perform an exception check, and only if there is a session, then return it.