The MongoInputStream#read() returns '0' which causes an infiity loop when EMF Edit Framework makes a HEAD request. returning -1 solves the problem