I believe that there might be some library conflict or version different in your environment. Please check all related libraries.
It seems that you have closed the stream while transformer is still doing the work. Please check that you have not closed any stream resources.