session factory returns nullpointerexception