没有意识到servlet Faces Servlet抛出的init()异常:java.lang.NullPointerException

时间:2013-05-08 11:36:50

标签: jsf jsf-2 websphere websphere-6.1

我正在尝试在 WebSphere 6.1 上运行 JSF2 / PrimeFaces 应用程序 我的配置如下:

  • 类加载器顺序:首先使用应用程序类加载器加载的类。
  • WAR类加载器策略:应用程序中每个WAR文件的类加载器。

我的 Jars 如下:

all-themes-1.0.9
aopalliance-1.0
com.springsource.org.apache.commons.logging-1.1.1
commons-beanutils-1.8.3
commons-codec-1.3
commons-collections-3.2
commons-io-1.3.2
commons-lang-2.3
commons-logging-1.1.1
jsf-api-2.1.20
jsf-impl-2.1.20
jstl-1.2
log4j-1.2.16
org.springframework.binding-2.3.1.RELEASE
org.springframework.faces-2.3.1.RELEASE
org.springframework.js-2.3.1.RELEASE
org.springframework.web.servlet-3.1.1.RELEASE
org.springframework.webflow-2.3.1.RELEASE
primefaces-4.0-20130427.150835-5
slf4j-api-1.6.4
slf4j-log4j12-1.6.4
spring-aop-3.1.2.RELEASE
spring-asm-3.1.2.RELEASE
spring-beans-3.1.2.RELEASE
spring-context-3.1.2.RELEASE
spring-context-support-3.1.2.RELEASE
spring-core-3.1.2.RELEASE
spring-expression-3.1.2.RELEASE
spring-jdbc-3.1.2.RELEASE
spring-orm-3.1.2.RELEASE
spring-oxm-3.1.2.RELEASE
spring-tx-3.1.2.RELEASE
spring-web-3.1.2.RELEASE
spring-webmvc-3.1.2.RELEASE
spring-webmvc-portlet-3.1.2.RELEASE
standard-1.1.2

在尝试访问应用程序时,我得到了例外:

 SRVE0100E: Did not realize  init() exception thrown by servlet Faces Servlet: java.lang.NullPointerException
    at javax.faces.webapp.FacesServlet.init(FacesServlet.java:144)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:199)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.init(ServletWrapper.java:319)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:393)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:321)
    at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:581)
    at com.ibm.ws.wswebcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:113)
    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3391)
    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
    at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:115)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
    at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
    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:136)
    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)

[5/8/13 14:25:37:291 AST] 0000002c ServletWrappe E   Deregister the mbean because of uncaught init() exception thrown by servlet Faces Servlet: javax.servlet.ServletException: SRVE0207E: Uncaught initialization exception thrown by servlet
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:251)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.init(ServletWrapper.java:319)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:393)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:321)
    at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:581)
    at com.ibm.ws.wswebcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:113)
    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3391)
    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
    at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:115)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
    at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
    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:136)
    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
---- Begin backtrace for Nested Throwables
java.lang.NullPointerException
    at javax.faces.webapp.FacesServlet.init(FacesServlet.java:144)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:199)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.init(ServletWrapper.java:319)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:393)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:321)
    at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:581)
    at com.ibm.ws.wswebcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:113)
    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3391)
    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
    at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:115)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
    at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
    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:136)
    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
, 
[5/8/13 14:25:37:322 AST] 0000002c WebApp        E   [Servlet Error]-[SRVE0207E: Uncaught initialization exception thrown by servlet]: java.lang.NullPointerException
    at javax.faces.webapp.FacesServlet.init(FacesServlet.java:144)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:199)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.init(ServletWrapper.java:319)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:393)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:321)
    at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:581)
    at com.ibm.ws.wswebcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:113)
    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3391)
    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
    at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:115)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
    at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
    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:136)
    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)

请告知如何修理它,谢谢。

1 个答案:

答案 0 :(得分:1)

> jsf-api-2.1.20
> jsf-impl-2.1.20

来自JSF 2.1规范:

  

其他Java™平台规范

     

JSF基于以下Java API规范:

     
      
  • JavaServer Pages™规范,版本2.1(JSP™)
  •   
  • Java™Servlet规范,版本2.5(Servlet)
  •   
  • Java™2平台,标准版,5.0版
  •   
  • Java™2平台企业版5.0版
  •   
  • JavaBeans™规范,版本1.0.1
  •   
  • JavaServer Pages™标准标记库,版本1.2(JSTL)
  •   
     

因此,JSF容器必须支持以上所有内容   规格。

WebSphere Application Server 6.1是J2EE 1.4实现,仅supports Servlet 2.4

理想情况下,您应该转到WAS 8,因为Java EE 6平台通过规范支持JSF 2。