WebSphere Portal 8.5上的Portlet中的PrimeFaces 5.0日历NullPointerException

时间:2014-07-03 10:25:01

标签: primefaces portlet websphere-portal

我试图在IBM WebSphere Portal 8.5上部署一个带有PrimeFaces 5.0 Calendar的简单Portlet。它有效,但没有显示日历上的箭头,我在WAS控制台中收到NullPointerException。

JSF的portlet-代码:

<!-- jsf:pagecode language="java" location="/src/pagecode/TestPortletView.java" --><!-- /jsf:pagecode -->
<div xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:portlet="http://java.sun.com/portlet_2_0"
    xmlns:p="http://primefaces.org/ui">

    <h:head></h:head>

     <h:form>

        <p:calendar value="#{pc_TestPortletView.date}" />
        <p:commandButton update="display" value="Submit" />
        <h:outputText id="display" value="#{testBean.date}" />

    </h:form>
</div>

支持bean:

package pagecode;

import java.util.Date;

public class TestPortletView extends PageCodeBase {

    private Date date = new Date();

    public Date getDate() { return date; }

    public void setDate(Date date) { this.date = date; }
}

堆栈跟踪:

[03.07.14 12:03:19:806 CEST] 00000120 ErrorPageWrit E   An exception occurred
                                 java.lang.NullPointerException
    at org.apache.myfaces.application.ResourceHandlerImpl.getWrappedResourceName(ResourceHandlerImpl.java:670)
    at org.apache.myfaces.application.ResourceHandlerImpl.getWrappedResourceName(ResourceHandlerImpl.java:678)
    at org.apache.myfaces.application.ResourceHandlerImpl._getContentType(ResourceHandlerImpl.java:650)
    at org.apache.myfaces.application.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:380)
    at javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:62)
    at org.primefaces.application.PrimeResourceHandler.handleResourceRequest(PrimeResourceHandler.java:132)
    at javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:62)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:183)
    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.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:79)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:960)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1064)
    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3837)
    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:981)
    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:459)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:526)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:312)
    at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:88)
    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:1864)

知道导致此错误的原因吗? &#34;正常&#34;中的相同代码JSF-Page(不在portlet中)就像魅力......

感谢您的帮助!

0 个答案:

没有答案