我有以下 XML
@XmlRootElement
@XmlType(propOrder = { "name", "transforms", "qualitycontrols"})
@XmlAccessorType(XmlAccessType.NONE)
public class Process {
@XmlElement
private String name;
@XmlElement(name = "transform")
private List<Transform> transforms = new ArrayList<Transform>();
@XmlElement(name = "qualitycontrol")
private List<QualityControl> qualitycontrols = new ArrayList<QualityControl>();
public Process() {
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public void add(Transform transform) {
transforms.add(transform);
}
public List<Transform> getTransforms() {
return transforms;
}
public List<QualityControl> getQualitycontrols() {
return qualitycontrols;
}
public void add(QualityControl qualitycontrol) {
qualitycontrols.add(qualitycontrol);
}
}
转换节点工作得很好,我添加了不工作的质量控制节点。
@XmlRootElement(name="qualitycontrol")
@XmlType(propOrder = { "template"})
public class QualityControl {
private String template;
public QualityControl() {
}
public String getTemplate() {
return template;
}
public void setTemplate(String template) {
this.template = template;
}
}
当我使用 public static main 测试此代码时,一切正常,但是当它部署到服务器时,我收到以下消息: ERROR [ProcessMDB] java.lang.NoSuchMethodError: model.Process.getQualitycontrols()Ljava/util/List;
我错过了什么??高度赞赏所有帮助。
谢谢乔伊。