0

我在 Windows 7 上使用 WebSphere Application Server 8.0 和 PrimeFaces 3.5。

我的 Eclipse IDE Juno 或 Rational Application Developer 中有一些动态 Web 项目。项目工作了一段时间。但是现在没有初始化 ManagedBean(无论是 ApplicationScoped、SessionScoped、ViewScoped 还是 RequestScoped)。

一个具体的例子如下所示。异常发生在每一页上。

JSF:

<h:form>
  <p:inputTextarea value="#{defaultComments.test}">
    <p:ajax event="keyup" update="out"/>
  </p:inputTextarea>
  <h:outputText value="#{defaultComments.test}" id="out"/>
</h:form>

豆:

@ManagedBean
public class DefaultComments implements Serializable {
    private static final long serialVersionUID = 1L;

    private String test = "test";

    public String getTest() {
        return test;
    }

    public void setTest(String test) {
        this.test = test;
    }
}

例外:

0000001c ErrorPageWrit E   An exception occurred
                                 javax.faces.FacesException: javax.el.PropertyNotFoundException: /control/index.xhtml at line 15 and column 55 value="#{defaultComments.test}": Target Unreachable, identifier 'defaultComments' resolved to null
    at org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.wrap(ExceptionHandlerImpl.java:241)
    at org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.handle(ExceptionHandlerImpl.java:156)
    at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:191)
    at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:189)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1147)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:722)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:449)
    at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1020)
    at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:886)
    at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1655)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:195)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
    at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
    at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1650)
Caused by: javax.el.PropertyNotFoundException: /control/index.xhtml at line 15 and column 55 value="#{defaultComments.test}": Target Unreachable, identifier 'defaultComments' resolved to null
    at org.apache.myfaces.view.facelets.el.TagValueExpression.getType(TagValueExpression.java:73)
    at org.primefaces.renderkit.InputRenderer.findImplicitConverter(InputRenderer.java:170)
    at org.primefaces.renderkit.InputRenderer.findConverter(InputRenderer.java:190)
    at org.primefaces.renderkit.InputRenderer.getConvertedValue(InputRenderer.java:196)
    at javax.faces.component.UIInput.getConvertedValue(UIInput.java:624)
    at javax.faces.component.UIInput.validate(UIInput.java:556)
    at javax.faces.component.UIInput.processValidators(UIInput.java:247)
    at org.apache.myfaces.context.servlet.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:533)
    at org.apache.myfaces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:207)
    at javax.faces.component.UIComponent.visitTree(UIComponent.java:773)
    at javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:991)
    at javax.faces.component.UIForm.visitTree(UIForm.java:269)
    at javax.faces.component.UIComponent.visitTree(UIComponent.java:793)
    at javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:991)
    at javax.faces.component.UIComponent.visitTree(UIComponent.java:793)
    at javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:991)
    at org.apache.myfaces.context.servlet.PartialViewContextImpl.processPartialExecute(PartialViewContextImpl.java:362)
    at org.apache.myfaces.context.servlet.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:342)
    at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:88)
    at javax.faces.component.UIViewRoot$ProcessValidatorPhaseProcessor.process(UIViewRoot.java:1394)
    at javax.faces.component.UIViewRoot._process(UIViewRoot.java:1282)
    at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:758)
    at org.apache.myfaces.lifecycle.ProcessValidationsExecutor.execute(ProcessValidationsExecutor.java:34)
    at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:171)

似乎是 WebSphere Application Server 的问题。有谁知道这个问题?

4

0 回答 0