1

i am trying to run JSF2/PrimeFaces application on WebSphere 6.1 and my configuration is as follows:

  • Class loader order: Classes loaded with application class loader first.
  • WAR class loader policy: Class loader for each WAR file in application.

My Jars are as follows:

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

when trying to access the application, i am getting the exception:

 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)

please advise how to fix it, thanks.

Mahmoud Saleh
  • 33,303
  • 119
  • 337
  • 498

1 Answers1

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

From the JSF 2.1 specification:

Other Java™ Platform Specifications

JSF is based on the following Java API specifications:

  • JavaServer Pages™ Specification, version 2.1 (JSP™)
  • Java™ Servlet Specification, version 2.5 (Servlet)
  • Java™2 Platform, Standard Edition, version 5.0
  • Java™2 Platform, Enterprise Edition, version 5.0
  • JavaBeans™ Specification, version 1.0.1
  • JavaServer Pages™ Standard Tag Library, version 1.2 (JSTL)

Therefore, a JSF container must support all of the above specifications.

WebSphere Application Server 6.1 is a J2EE 1.4 implementation and only supports Servlet 2.4.

You should ideally move to WAS 8 as Java EE 6 platforms support JSF 2 by specification.

McDowell
  • 107,573
  • 31
  • 204
  • 267
  • can you please tell me what's the latest JSF version that can work with servlet 2.4 and WAS 6.1, also can JSF 2 works on WAS 7 ? – Mahmoud Saleh May 10 '13 at 13:15
  • 1
    JSF 1.1 is compatible with WAS6.1. JSF 1.2 requires servlet 2.5 and ships Java EE 5 (i.e. WAS 7.) Some people have reported [JSF 2 working on WAS 7 here](http://stackoverflow.com/questions/1718934). – McDowell May 10 '13 at 13:38
  • I ever got JSF 2.0 to work on Tomcat 5.5 (Servlet 2.4): http://stackoverflow.com/questions/5998447/running-jsf-2-0-on-servlet-2-4-container/ This would however likely not work on WAS 6.x. Better upgrade that prehistoric beast. – BalusC May 10 '13 at 19:20