I want to convert my pojo to json with JAXB, my pojo have one to many relation, and when i convert my pojo to json, JAXB generate error \"A cycle is detected in the object g
You have a cyclic reference problem in your definition.
Try putting @XmlTransient above the problematic definition.
@XmlTransient
Also, about XmlID and string type, see http://markmail.org/message/up6vrzjixxrvy5th.