Websphere Application Server 8.0 上的错误如下:
javax.faces.FacesException: java.lang.NullPointerException
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:192)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:119)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:189)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1230)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:779)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1071)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:909)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:453)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:515)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:306)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:84)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
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:1700)
Caused by: java.lang.NullPointerException
at java.lang.Class.isAssignableFrom(Native Method)
at org.apache.el.util.ReflectionUtil.isAssignableFrom(ReflectionUtil.java:308)
at org.apache.el.util.ReflectionUtil.getMethod(ReflectionUtil.java:181)
at org.apache.el.parser.AstValue.invoke(AstValue.java:257)
该页面仅查找在用户输入的 from 和 to 之间具有联系日期的所有对象。我正在使用 primefaces 设置日期选择器和 jsf 重复以显示结果。相同的代码在 WAS 8.554 自由服务器上运行良好。我什至不确定如何开始查找,因为堆栈跟踪没有指向我的代码:(。谢谢。
xhtml:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>title</title>
</h:head>
<h:body>
<h1>Occupational Wellness Next Contact</h1>
<h:outputText value="All models"/>
<br/>
<br/>
<h:form>
<p:calendar id="fromDate" binding="#{startDateComponent}" value="#{contactBean.fromDate}" showOn="button" />
<p:calendar id="toDate" value="#{contactBean.toDate}" showOn="button">
<f:validator validatorId="dateRangeValidator" />
<f:attribute name="startDateComponent" value="#{startDateComponent}" />
</p:calendar>
<br/>
<h:message for="toDate" class="error"/>
<br/><br/>
<p:commandButton value="Search" id="search" action="#{contactBean.getModelsWithContactDateBetween(fromDate, toDate)}" ajax="false" />
</h:form>
<br/>
<br/>
<table border="1">
<tr>
<th>
Participant Name
</th>
<th>
Primary Phone
</th>
<th>
Next Contact Date
</th>
</tr>
<ui:repeat var="model" value="#{contactBean.displayModels}">
<tr>
<td>
<h:outputText value="#{model.participantName}"/>
</td>
<td>
<h:outputText value="#{model.primaryPhone}"/>
</td>
<td>
<h:outputText id="toDate" value="#{model.nextContactDate}">
<f:convertDateTime pattern="MM/dd/yyyy" />
</h:outputText>
</td>
</tr>
</ui:repeat>
</table>
</h:body>
</html>