Solution:make sure you use the -dtd optionxjc item.dtd -dtdyou will have to download dom4j.jar and put it in your lib directory (but it will tell you this)