11 Replies Latest reply on Feb 1, 2007 6:40 PM by jbnewb

    Deploy Seam 1.1 to websphere without EJB

    jbnewb

      Hi,
      Has anyone been able to deploy Seam to Websphere 6.0 without using EJB's - We need to support multiple app servers inlcuding tomcat. We are using JPA for persistence -
      The seam examples do not have any websphere target

        • 1. Re: Deploy Seam 1.1 to websphere without EJB
          gavin.king

          Michael is going to work on getting the Seam examples running on WebSphere sometime in the next week.

          • 2. Re: Deploy Seam 1.1 to websphere without EJB
            jbnewb

            Thanks Gavin - Look forward to the same.

            • 3. Re: Deploy Seam 1.1 to websphere without EJB
              jbnewb

              Hi Gavin,

              Would be great if you can point me to the script for Websphere once Michael has it.

              I have managed to get my WAR file "installed" in websphere 6.1 - Debugging into it, I also see that Seam's Scanner loads the seam @Name'ed components.

              However, when an attempt is made to load the page, the SeamVariableResolver is invoked and I get the following exception - It somehow seems like the application context does not get set with any value - please help.


              javax.faces.el.EvaluationException: Cannot get value for expression '#{userbean.welcomeMessage}'
              at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:402)
              at javax.faces.component.UIOutput.getValue(UIOutput.java:77)
              at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getStringValue(RendererUtils.java:217)
              at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.renderOutput(HtmlTextRendererBase.java:69)
              at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.encodeEnd(HtmlTextRendererBase.java:57)
              at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)
              at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:495)
              at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:363)
              at com.ibm._jsp._sayHello_5F_jspx._jspx_meth_h_outputText_0(_sayHello_5F_jspx.java:102)
              at com.ibm._jsp._sayHello_5F_jspx._jspx_meth_h_form_0(_sayHello_5F_jspx.java:123)
              at com.ibm._jsp._sayHello_5F_jspx._jspx_meth_f_view_0(_sayHello_5F_jspx.java:150)
              at com.ibm._jsp._sayHello_5F_jspx._jspService(_sayHello_5F_jspx.java:76)
              at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:85)
              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.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:115)
              at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:168)
              at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:308)
              at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:416)
              at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
              at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:101)
              at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:197)
              at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:59)
              at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
              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 org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
              at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
              at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
              at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:32)
              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.HttpInboundLink.ready(HttpInboundLink.java:274)
              at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
              at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
              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)
              Caused by: java.lang.IllegalStateException: No application context active
              at org.jboss.seam.Component.forName(Component.java:1559)
              at org.jboss.seam.Component.getInstance(Component.java:1609)
              at org.jboss.seam.Component.getInstance(Component.java:1592)
              at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java)
              at org.apache.myfaces.config.LastVariableResolverInChain.resolveVariable(LastVariableResolverInChain.java:42)
              at org.apache.myfaces.el.ValueBindingImpl$ELVariableResolver.resolveVariable(ValueBindingImpl.java:574)
              at org.apache.commons.el.NamedValue.evaluate(NamedValue.java:124)
              at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:140)
              at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:383)

              • 4. Re: Deploy Seam 1.1 to websphere without EJB
                gavin.king

                Its already done in CVS, and in the release tonight.

                • 5. Re: Deploy Seam 1.1 to websphere without EJB
                  jbnewb

                  Cool - thats good news. Will keep you posted.

                  • 6. Re: Deploy Seam 1.1 to websphere without EJB
                    jbnewb

                    Hi,
                    Downloaded the 1.1.5 - Was able to run the JPA example without any issues. Thanks.

                    For my app (WAR file) - I keep getting the exception below. The only way I get rid of it is to put the StartupServletContextListener line above the SeamListener line

                    My web.xml / build.xml mirrors what u have in the example - Question is

                    Questions
                    # Why is the "start" of the application so sensitive to order of the listeners in Websphere - What could I be doing wrong

                    # Mainly - Will this reordering affect Seam? Right now this is just a 2 page prototype -

                    Here is the exception (part of the trace)


                    [2/1/07 12:13:59:321 PST] 0000005e ServletWrappe E SRVE0100E: Did not realize init() exception thrown by servlet Faces Servlet: java.lang.IllegalStateException: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions!
                    If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml.
                    A typical config looks like this;

                    <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>


                    at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:90)
                    at javax.faces.webapp.FacesServlet.init(FacesServlet.java:88)
                    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)


                    • 7. Re: Deploy Seam 1.1 to websphere without EJB
                      gavin.king

                      Thats very strange.

                      • 8. Re: Deploy Seam 1.1 to websphere without EJB
                        jbnewb

                        Indeed.
                        Now - one thing changed between 1.1 and 1.1.5.

                        In 1.1 - after I put the StartupServletContextListener above the SeamListener - The app would start fine - But I would keep getting the "Application context not found" in the SeamVariableResolver.

                        In 1.1.5 - I still need to reorder the listeners - but the VariableResolver has behaved (well at least for the couple of pages)

                        Not sure if that gives u any clues.

                        • 9. Re: Deploy Seam 1.1 to websphere without EJB
                          gavin.king

                          But the end result is that it is now working for you, right?

                          • 10. Re: Deploy Seam 1.1 to websphere without EJB
                            jbnewb

                            In 1.1.5 - yes, working for this sample application.

                            Was just wondering if there would be any ramifications due to the reordering of the listeners.

                            • 11. Re: Deploy Seam 1.1 to websphere without EJB
                              jbnewb

                              In 1.1.5 - yes, working for this sample application.

                              Was just wondering if there would be any ramifications due to the reordering of the listeners