1 2 Previous Next 16 Replies Latest reply on Nov 9, 2007 1:36 PM by Denis Forveille

    Run JSF RI on WebSphere 6.1

    Michael Yuan Novice

      Hi Folks,

      I am trying to run Seam 1.3 on WebSphere 6.1 server (the JPA + Seam POJO setup). One of the first tasks is to run JSF 1.2 in WebSphere (i.e., bundle jsf-*.jar and el-*.jar in the WAR). But so far I have not been able to do it. It throws the following stack trace. Does anyone have any idea? I'd really appreciate any help / clues!

      SRVE0100E: Did not realize init() exception thrown by servlet Faces Servlet: java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory
       at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:256)
       at javax.faces.webapp.FacesServlet.init(FacesServlet.java:142)
       at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:185)
       at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.init(ServletWrapper.java:316)
       at com.ibm.ws.webcontainer.servlet.ServletWrapper.initialize(ServletWrapper.java:1119)
       at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.initialize(ServletWrapper.java:149)
       at com.ibm.wsspi.webcontainer.extension.WebExtensionProcessor.createServletWrapper(WebExtensionProcessor.java:99)
       at com.ibm.ws.webcontainer.webapp.WebApp.getServletWrapper(WebApp.java:741)
       at com.ibm.ws.webcontainer.webapp.WebApp.initializeTargetMappings(WebApp.java:421)
       at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:274)
       at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:271)
       at com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:88)
       at com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:157)
       at com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:653)
       at com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:606)
       at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:333)
       at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:549)
       at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1295)
       at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1129)
       at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:567)
       at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:814)
       at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:948)
       at com.ibm.ws.runtime.component.ApplicationMgrImpl$1.run(ApplicationMgrImpl.java:1478)
       at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:3731)
       at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:3813)
       at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:245)
       at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1483)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:615)
       at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:62)
       at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:615)
       at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:265)
       at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1089)
       at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:971)
       at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:231)
       at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:238)
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:833)
       at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802)
       at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1055)
       at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
       at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:948)
       at com.ibm.ws.management.commands.AdminServiceCommands$InvokeCmd.execute(AdminServiceCommands.java:251)
       at com.ibm.ws.console.core.mbean.MBeanHelper.invoke(MBeanHelper.java:239)
       at com.ibm.ws.console.appdeployment.ApplicationDeploymentCollectionAction.execute(ApplicationDeploymentCollectionAction.java:536)
       at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
       at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
       at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1486)
       at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:528)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
       at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
       at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:907)
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:118)
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
       at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:696)
       at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:641)
       at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:475)
       at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
       at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:308)
       at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1070)
       at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:273)
       at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
       at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:319)
       at com.ibm.isclite.container.controller.InformationController.processForwardConfig(InformationController.java:159)
       at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
       at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1486)
       at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:528)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
       at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
       at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:907)
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
       at com.ibm.ws.console.core.servlet.WSCUrlFilter.continueStoringTaskState(WSCUrlFilter.java:371)
       at com.ibm.ws.console.core.servlet.WSCUrlFilter.doFilter(WSCUrlFilter.java:229)
       at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
       at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:696)
       at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:641)
       at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:475)
       at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
       at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3107)
       at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238)
       at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
       at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1425)
       at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:92)
       at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
       at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
       at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
       at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
       at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
       at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
       at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
       at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:193)
       at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:725)
       at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:847)
       at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1498)
      




        • 1. Re: Run JSF RI on WebSphere 6.1
          Stan Silvert Master

          Did you include a context listener for the RI? For some servers, you might need something like this in your web.xml:


          <listener>
           <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
          </listener>


          Also see http://forum.java.sun.com/thread.jspa?threadID=5163611&messageID=9624948

          Stan

          • 2. Re: Run JSF RI on WebSphere 6.1
            Denis Forveille Novice

            I think you should set both ear and war classloaders to PARENT_LAST to be sure that the web container picks the JSF implementation you have in WEB-INF/lib, like for MyFaces. Check the related IBM technote here: http://www-1.ibm.com/support/docview.wss?rs=180&context=SSEQTP&q1=myfaces&uid=swg21243668&loc=en_US&cs=utf-8&lang=en

            Off Topic: BTW, Michael, your book on JBoss Seam is fantastic. I greatly recommend it to everyone. That book is clear, easy to read and is a must-have for anyone developping with seam. Thanks!!

            • 3. Re: Run JSF RI on WebSphere 6.1
              Denis Forveille Novice

              Oups I forgot: To my knowledge, JSF 1.2 needs servlet 2.5 which is part of J2EE5...and websphere 6.1 only implements servlet 2.4 for J2EE 1.4
              I don't know if you'll be able to make it work in WAS v6.1

              • 4. Re: Run JSF RI on WebSphere 6.1
                Stan Silvert Master

                JSF 1.2 doesn't actually rely on Servlet 2.5 APIs - even though the spec is written agains Servlet 2.5. Many people have successfully run JSF 1.2 on Tomcat 5.5, which is Servlet 2.4. You do need Servlet 2.5 if you are using JSP with JSF 1.2. If you use Facelets you can run on Servlet 2.4.

                Stan
                http://jsf.jboss.org

                • 5. Re: Run JSF RI on WebSphere 6.1
                  Michael Yuan Novice

                  Stan, yes, I did have the ConfigureListener ...

                  titou09, yes, I did set to load the classes in the WAR first. Perhaps what I should try is to remove those IBM JSF jars altogether and replace them with JSF RI. I will try and let you know.

                  • 6. Re: Run JSF RI on WebSphere 6.1
                    Michael Yuan Novice

                    I removed the jsf-ibm.jar from the server (it was on "shared lib" path), and put the JSF RI jars into the server's lib directory. However, I am getting this error now. Since the com.ibm.ws.jsf package is in com.ibm.ws.webcontainer_2.0.0.jar file, there is no easy way to "remove" them. I tried to remove the com.ibm.ws.jsf package and then re-pack the com.ibm.ws.webcontainer_2.0.0.jar. But then the server will complain NPE when loading JSF ...

                    Extension processor failed to initialize in factory: com.ibm.ws.jsf.extprocessor.JSFExtensionFactory@5d005d0
                    java.lang.ClassCastException: org.jboss.seam.jsf.SeamApplication incompatible with com.sun.faces.application.ApplicationImpl
                     at com.ibm.ws.jsf.configuration.FacesConfigParser.createFacesFactories(FacesConfigParser.java:1019)
                     at com.ibm.ws.jsf.configuration.FacesConfigParser.initializeConfiguration(FacesConfigParser.java:354)
                     at com.ibm.ws.jsf.util.FacesConfigUtil._parseJSFConfiguration(FacesConfigUtil.java:128)
                     at com.ibm.ws.jsf.util.FacesConfigUtil.parseJSFConfiguration(FacesConfigUtil.java:82)
                     at com.sun.faces.util.Util.verifyFactoriesAndInitDefaultRenderKit(Util.java:497)
                     at com.ibm.ws.jsf.configuration.FacesConfig.initialize(FacesConfig.java:96)
                     at com.ibm.ws.jsf.extprocessor.JSFExtensionFactory.createExtensionProcessor(JSFExtensionFactory.java:107)
                     at com.ibm.ws.webcontainer.webapp.WebApp.initializeExtensionProcessors(WebApp.java:1029)
                     at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:255)
                     at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:271)
                     at com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:88)
                     at com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:157)
                     at com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:653)
                     at com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:606)
                     at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:333)
                     at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:549)
                     at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1295)
                     at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1129)
                     at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:567)
                     at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:814)
                     at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:948)
                     at com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(ApplicationMgrImpl.java:2114)
                     at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:340)
                     at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1498)
                    


                    • 7. Re: Run JSF RI on WebSphere 6.1
                      Denis Forveille Novice

                      Ok. looks similar to the problem we have with seam 1.2.1 +was v6.1.0 + JSF Implementation from WAS (not MyFaces..).
                      have a look my previous post here : http://www.jboss.com/index.html?module=bb&op=viewtopic&t=107948
                      I have open a PMR with IBM for it and still wait for an answer from IBM

                      • 8. Re: Run JSF RI on WebSphere 6.1
                        Michael Yuan Novice

                        Thanks titou09! Please let us know how your PMR w/ IBM works out. If they suggest we do anything on Seam side to fix the issue, we can probably accommodate it as well (we are open source ;)).

                        • 9. Re: Run JSF RI on WebSphere 6.1
                          Denis Forveille Novice

                          I have good news for who is using seam with WebSphere v6.1
                          After having opened a PMR with IBM, they fixed the problem that caused the ClassCastException.
                          I can now run jboss-seam 1.2.1 on WebSphere with the IBM JSF 1.1 implementation of WebSphere v6.1.0.9, with the interim fix they send me.

                          There is no need anymore of MyFaces and also no need for fancy Classloader configurations.
                          I will let you know when this fix will be publicly available,

                          I didn't test it with seam 1.3 (2.0?) but the problem were identical with both versions so I think it should work too

                          • 10. Re: Run JSF RI on WebSphere 6.1
                            Gavin King Master

                            Great, thanks for that, appreciated.

                            • 11. Re: Run JSF RI on WebSphere 6.1
                              Denis Forveille Novice

                              The fix will be in fixpack 6.1.0.11. Estimated GA: August 31 2007
                              APAR id: PK47367

                              • 12. Re: Run JSF RI on WebSphere 6.1
                                brian kelley Newbie

                                Could you post some steps or include some files as to how to get SEAM 1.2 running on WebSphere 6.1. I'm close but need more...

                                • 13. Re: Run JSF RI on WebSphere 6.1
                                  Denis Forveille Novice

                                  Seam runs fine for us on websphere 6.1.0.11 + JSF RI 1.2_04Sp2 + facelets 1.1.12.
                                  What is your specific problem?.

                                  • 14. Re: Run JSF RI on WebSphere 6.1
                                    Jan Peti Newbie

                                    Hi titou09,
                                    I am very happy to hear that seam works on websphere 6.1.0.11 but did you used seam pojo or ejb3.0?
                                    And could it be possible to share a simple ear project which definitely works on websphere 6.1.0.11 or a few step tutorial how to do it.
                                    I think a lot of people would appreciate it.
                                    If not, thx anyway for the note that it works...

                                    1 2 Previous Next