cannot run JSF 1.1 application in WebSphere Application Server 8.5.5

805 views Asked by At

I have a war for a JSF 1.1 application built using Sun Java Studio Creator that runs on iPlanet that I have to run on WAS (WebSphere Application Server) 8.5.5. It fails to display welcome page due to infinite recursion. An answer to a similar question on SO stated that the JSF libraries bundled in the war should be removed to prevent conflict with the JSF runtime in WAS however it has not helped in this case. Below is the stacktrace

00000107 AdminHelper   A   ADMN1008I: An attempt is made to start the myapp_war application. (User ID = defaultWIMFileBasedRealm/myrealm)
00000107 CompositionUn A   WSVR0190I: Starting composition unit WebSphere:cuname=myapp_war in BLA WebSphere:blaname=myapp_war.
00000107 ApplicationMg A   WSVR0200I: Starting application: myapp_war
00000107 ApplicationMg A   WSVR0204I: Application: myapp_war  Application build level: Unknown
00000107 SibMessage    I   [:] CWSID0017I: Configuration reload is starting for bus SSTP Bus.
00000107 SibMessage    I   [:] CWSID0018I: Configuration reload is complete for bus SSTP Bus.
00000107 SibMessage    I   [:] CWSID0019I: Configuration reload is starting for messaging engine mycomputerNode01.bussyst1-SSTP Bus.
00000107 SibMessage    I   [:] CWSID0020I: Configuration reload is complete for messaging engine mycomputerNode01.bussyst1-SSTP Bus.
00000107 webapp        I com.ibm.ws.webcontainer.webapp.WebGroupImpl WebGroup SRVE0169I: Loading Web Module: myapp.war.
00000107 WASSessionCor I SessionContextRegistry getSessionContext SESN0176I: Will create a new session context for application key default_host/myapp
00000107 DefaultFacesC I   Reading standard config META-INF/standard-faces-config.xml
00000107 DefaultFacesC I   Reading config /WEB-INF/faces-config.xml
00000107 DefaultFacesC I   Reading config : wsjar:file:/opt/IBM/WebSphere/profiles/AppSrv01/installedApps/mycomputerNode01Cell/myapp_war.ear/myapp.war/WEB-INF/lib/appbase.jar!/META-INF/faces-config.xml
00000107 DefaultFacesC I   Reading config : wsjar:file:/opt/IBM/WebSphere/profiles/AppSrv01/installedApps/mycomputerNode01Cell/myapp_war.ear/myapp.war/WEB-INF/lib/jsfcl.jar!/META-INF/faces-config.xml
00000107 DefaultFacesC I   Reading config : wsjar:file:/opt/IBM/WebSphere/profiles/AppSrv01/installedApps/mycomputerNode01Cell/myapp_war.ear/myapp.war/WEB-INF/lib/webui.jar!/META-INF/faces-config.xml
00000107 DefaultFacesC I   Reading config /WEB-INF/navigation.xml
00000107 DefaultFacesC I   Reading config /WEB-INF/managed-beans.xml
00000107 FacesConfigur W   More than one managed bean w/ the name of 'UserDetail' - only keeping the last 
00000107 FacesConfigur W   More than one managed bean w/ the name of 'acesHeaderTabs' - only keeping the last 
00000107 ApplicationIm I   Couldn't discover the current project stage, using Production
00000107 FacesConfigur I   Serialization provider : class org.apache.myfaces.shared_impl.util.serial.DefaultSerialFactory
00000107 AbstractFaces I   ServletContext '/opt/IBM/WebSphere/profiles/AppSrv01/installedApps/mycomputerNode01Cell/myapp_war.ear/myapp.war' initialized.
00000107 Digester      W com.sun.faces.config.rules.ComponentRule end [ComponentRule]{faces-config/component} Merge(com.sun.rave.web.ui.Time)
00000107 Digester      W com.sun.faces.config.rules.ConverterRule end [ConverterRule]{faces-config/converter} Merge(null,java.math.BigDecimal)
00000107 Digester      W com.sun.faces.config.rules.ConverterRule end [ConverterRule]{faces-config/converter} Merge(null,java.math.BigInteger)
00000107 Digester      W com.sun.faces.config.rules.NavigationRuleRule end [NavigationRuleRule]{faces-config/navigation-rule} Merge(*)
00000107 Digester      W com.sun.faces.config.rules.NavigationRuleRule end [NavigationRuleRule]{faces-config/navigation-rule} Merge(*)
00000107 Digester      W com.sun.faces.config.rules.ManagedBeanRule end [ManagedBeanRule]{faces-config/managed-bean} Merge(UserDetail)
00000107 Digester      W com.sun.faces.config.rules.ManagedBeanRule end [ManagedBeanRule]{faces-config/managed-bean} Merge(acesHeaderTabs)
00000107 ServletWrappe I com.ibm.ws.webcontainer.servlet.ServletWrapper init SRVE0242I: [myapp_war] [/myapp] [Faces Servlet]: Initialization successful.
00000107 webcontainer  I com.ibm.ws.webcontainer.VirtualHostImpl addWebApplication SRVE0250I: Web Module null has been bound to default_host[*:9080,*:80,*:9443,*:5060,*:5061,*:443].
00000107 ApplicationMg A   WSVR0221I: Application started: myapp_war
00000107 CompositionUn A   WSVR0191I: Composition unit WebSphere:cuname=myapp_war in BLA WebSphere:blaname=myapp_war started.
0000010a ServletWrappe I com.ibm.ws.webcontainer.servlet.ServletWrapper init SRVE0242I: [myapp_war] [/myapp] [/JSCreator_index.jsp]: Initialization successful.
0000010a ServletWrappe E com.ibm.ws.webcontainer.servlet.ServletWrapper service Uncaught service() exception thrown by servlet Faces Servlet: java.lang.StackOverflowError
at javax.faces.context.FacesContext.getAttributes(FacesContext.java:64)
at javax.faces.context.FacesContext.getAttributes(FacesContext.java:64)
at javax.faces.context.FacesContext.getAttributes(FacesContext.java:64)
at javax.faces.context.FacesContext.getAttributes(FacesContext.java:64)
at javax.faces.context.FacesContext.getAttributes(FacesContext.java:64)
<--     many such lines -->
at org.apache.myfaces.application.ResourceHandlerImpl.isResourceRequest(ResourceHandlerImpl.java:459)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:180)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1233)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:782)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481)
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:967)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1107)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:1404)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:196)
at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:601)
at com.ibm._jsp._JSCreator_5F_index._jspService(_JSCreator_5F_index.java:83)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:99)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1233)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:782)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:122)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:220)
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:967)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1107)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:1404)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:196)
at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:681)
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:967)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1107)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:4047)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1016)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1817)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:213)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:463)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:530)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:316)
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:1892)

faces-config.xml is basically empty and the relevant parts of web.xml are

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>server</param-value>
  </context-param>
<context-param>
    <param-name>javax.faces.CONFIG_FILES</param-name>
    <param-value>/WEB-INF/navigation.xml,/WEB-INF/managed-beans.xml</param-value>
  </context-param>
<servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
<servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
  </servlet-mapping>
<welcome-file-list>
    <welcome-file>JSCreator_index.jsp</welcome-file>
  </welcome-file-list>
</web-app>
1

There are 1 answers

0
Apps On

The implementation of JSF that comes with WebSphere 8.5.x is MyFaces and version is 2.0. You need to use the SunRI as the JSF version to support JSF 1.1 in your application.

Please note that this has impact on the entire application server and not just for the application for which you are configuring it.

Refer to this link for more details Changing JSF version