我想用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)
答案 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;
}