jboss 7.1中的对象持久性

时间:2013-06-07 23:15:53

标签: java jsf java-ee ejb jboss7.x

我想用EJB和JSF框架在j2EE项目上创建对象的持久性。在jboss7.1上编译时,我遇到了这个错误。有人可以帮助我。 谢谢,曼努埃尔

javax.el.PropertyNotFoundException: /TestTce.xhtml @16,55 value="#{testBean.codeTce.libType}": Target Unreachable, identifier 'testBean' resolved to null
com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpression.java:100)
com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:95)
javax.faces.component.UIInput.getConvertedValue(UIInput.java:1030)
javax.faces.component.UIInput.validate(UIInput.java:960)
javax.faces.component.UIInput.executeValidate(UIInput.java:1233)
javax.faces.component.UIInput.processValidators(UIInput.java:698)
javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1214)
javax.faces.component.UIForm.processValidators(UIForm.java:253)
javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1214)
javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:1172)
com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)

1 个答案:

答案 0 :(得分:0)

package ctrl;

公共类TestBean {

TestDao testDaoLocal;

private CodeTce codeTce = new CodeTce();

public void CreateTce() {

}


public void createEmployee() {
    testDaoLocal.ajouter(codeTce);

}
public CodeTce getCodeTce() {
    return codeTce;
}


public void setCodeTce(CodeTce codeTce) {
    this.codeTce = codeTce;
}