It sounds to me that you are trying to export an model with ArchiMate 3 elements to ArchiMate 2 and you could be having a backward compatibility problem.
I am not too familiar with the Generate Model Exchange extension but your original post clearly states
(context->extensions->Archimate2->Generate Model Exchange file.
and your last post states
Actually I use Archimate 3 but my models historically still contain some Archimate 2 elements
Have you consider that your Archimate 3 elements are not backward compatible? Have you considered upgrading all elements to Archimate 3 stereotypes and exporting an Archimate 3 exchange file? Alternatively, you could downgrade all elements to Archimate 2.
I would not recommend mixing Archimate 2 and 3 elements, it is likely to give you a headache.