Sounds like a bug.
Post it at http://www.sf.net/projects/jboss
The dtd says
The primkey-field element is not used if the primary key maps to
multiple container-managed fields (i.e. the key is a compound key). In
this case, the fields of the primary key class must be public, and
their names must correspond to the field names of the entity bean
class that comprise the key.
The problem is that String has no public fields
so it should fail. But this check is not present :-(