If you try to marshal a class which references a complex type that does not have a no-arg constructor, such as:
import java.sql.Date; @XmlRootElement(name =
Some enterprise and Dependency Injection frameworks use reflection Class.newInstance() to create a new instance of your classes. This method requires a public no-arg constructor to be able to instantiate the object.