Maik, thank you for your attention.
My code is pratically the same of you, and when i commit the transaction all documents are succesfully added. And I don't know if it makes any difference but the document type i'm having problem is "BoObjectTypes.oOrders".
I'm using SAP 9 PL10 64bits, could you please test in the same environment?