What is the data type ObjectIdentifier? A class of yours?
The driver and server know how to generated ObjectIds, but not instances of your own data types.
You could register an IdGenerator for your data type if you can't use the standard ObjectId for your Ids.