Its just incredible how useful this forum is!!
I mean, I just post my problem, and in the next 10 second I found the solution! Is not this amazing! :-)))
It was caused by a bad tag in ejb-jar.xml: <prim-key-field> instead of <primkey-field>!!!!!
P.S. Why is a <prim-key-class> tag (with '-' between prim and key) and a <primkey-field> tag (no '-' between prim and key)?? Damn!
Don't get me started on the crapy metadata required by the EJB specification.