hibernate missing session for XML writer tasks