.JIoEndpoint$Worker.run( JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
However, in all the posts I've found, no one seems to give a definitive answer for why this is happening. For instance, is there a listener or variable-resolver I'm missing in web.xml? Is something not configured in my appContext? I have followed the instructions in the swf-booking example to a T, yet I am still getting this error.
I am running ICEFaces 1.7.1 and Spring Webflow 2.0.6 on Websphere 6.1. However, this problem also occurs with ICEFaces 1.7.2 SP1 and 1.8. I am also able to get Webflow 1.0 to work in the same environment, but it is a bit buggy and I was told the integration was beefed up with the 2.0 SWF release. However, this error is occurring constantly with any SWF 2.0 release and no one has provided any real explanation as to why.
I would appreciate any help any one can give.
mon.standard.PathDispatcherServer$Matcher.serviceOnMatch(PathDispatcherServer.java:50)
at com.icesoft.faces.webapp.from.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:19)
at com.icesoft.faces.webapp.from.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
at com.icesoft.faces.webapp.from.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63)
at com.icesoft.faces.webapp.from.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:139)
at com.icesoft.faces.webapp.from.servlet.SessionDispatcher.service(SessionDispatcher.java:53)
at com.icesoft.faces.webapp.from.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
at com.icesoft.faces.webapp.from.servlet.PathDispatcher.service(PathDispatcher.java:29)
at com.icesoft.faces.webapp.from.servlet.MainServlet.service(MainServlet.java:82)
at javax.servlet.from.fromServlet.service(fromServlet.java:803)
at
Caused by: java.lang.NullPointerException
at com.icesoft.util.SeamUtilities.getSpringFlowId(SeamUtilities.java:520)
at com.icesoft.faces.renderkit.dom_html_basic.FormRenderer.encodeBegin(FormRenderer.java:156)
at com.icesoft.faces.component.ext.renderkit.FormRenderer.encodeBegin(FormRenderer.java:53)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:703)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:547)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:554)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:554)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:554)
at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:282)
... 33 more
Here is my web.xml:HTML Code:
lt;?xml version=quot;1.0quot; encoding=quot;ISO-8859-1quot;?gt;
lt;web-app xmlns=quot;xml/ns/j2eequot;
xmlns:xsi=quot;2001/XMLSchema-instancequot;
xsi:schemaLocation=quot;xml/ns/j2ee xml/ns/j2ee/web-app_2_4.xsdquot;
version=quot;2.4quot;gt;
lt;context-paramgt;
lt;param-namegt;contextConfigLocationlt;/param-namegt;
lt;param-valuegt;
/WEB-INF/applicationContext.xml
lt;/param-valuegt;
lt;/context-paramgt;
lt;!-- Use JSF view templates saved as *.xhtml, for use with Facelets --gt;
lt;context-paramgt;
lt;param-namegt;javax.faces.DEFAULT_SUFFIXlt;/param-namegt;
lt;param-valuegt;.jsplt;/param-valuegt;
lt;/context-paramgt;
lt;!-- Special Facelets Debug Output for Development --gt; lt;context-paramgt; lt;param-namegt;facelets.DEVELOPMENTlt;/param-namegt; lt;param-valuegt;truelt;/param-valuegt; lt;/context-paramgt; lt;!-- Cause Facelets to refresh templates during development --gt; lt;context-paramgt; lt;param-namegt;facelets.REFRESH_PERIODlt;/param-namegt; lt;param-valuegt;1lt;/param-valuegt; lt;/context-paramgt; lt;!-- Cause Facelets always reconstruct the component tree, cutting down on the amount of state that needs to be serialized --gt; lt;context-paramgt; lt;param-namegt;facelets.BUILD_BEFORE_RESTORElt;/param-namegt; lt;param-valuegt;falselt;/param-valuegt; lt;/context-paramgt;
lt;context-paramgt; lt;param-namegt;com.icesoft.faces.standardRequestScopelt;/param-namegt; lt;param-valuegt;falselt;/param-valuegt; lt;/context-paramgt;
lt;!-- Here so the JSF implementation can initialize, not used at runtime --gt;
lt;servletgt;
lt;servlet-namegt;Faces Servletlt;/servlet-namegt;
lt;servlet-classgt;javax.faces.webapp.FacesServletlt;/servlet-classgt;
lt;load-on-startupgt;1lt;/load-on-startupgt;
lt;/servletgt;
lt;servletgt; lt;servlet-namegt;Spring MVC Dispatcher Servletlt;/servlet-namegt; lt;servlet-classgt;org..web.servlet.DispatcherServletlt;/servlet-classgt; lt;init-paramgt; lt;param-namegt;contextConfigLocationlt;/param-namegt; lt;param-valuegt;/WEB-INF/applicationContext.xmllt;/param-valuegt; lt;/init-paramgt; lt;load-on-startupgt;1lt;/load-on-startupgt;
lt;/servletgt;
lt;servlet-mappinggt; lt;servlet-namegt;Spring MVC Dispatcher Servletlt;/servlet-namegt; lt;ucl-patterngt;/spring/*lt;/ucl-patterngt;
lt;/servlet-mappinggt;lt;!-- Dummy mapping for faces initialization --gt;
lt;servlet-mappinggt;
lt;servlet-namegt;Faces Servletlt;/servlet-namegt;
lt;ucl-patterngt;*.faceslt;/ucl-patterngt;
lt;/servlet-mappinggt;
lt;servletgt; lt;servlet-namegt ersistent Faces Servletlt;/servlet-namegt; lt;servlet-classgt;com.icesoft.faces.webapp.xmlfrom.PersistentFacesServletlt;/servlet-classgt; lt;load-on-startupgt; 1 lt;/load-on-startupgt; lt;/servletgt;
lt;servletgt; lt;servlet-namegt;Blocking Servletlt;/servlet-namegt; lt;servlet-classgt;com.icesoft.faces.webapp.xmlfrom.BlockingServletlt;/servlet-classgt; lt;load-on-startupgt; 1 lt;/load-on-startupgt; lt;/servletgt;
lt;servlet-mappinggt; lt;servlet-namegt ersistent Faces Servletlt;/servlet-namegt; lt;ucl-patterngt;*.ifacelt;/ucl-patterngt; lt;/servlet-mappinggt;
lt;servlet-mappinggt; lt;servlet-namegt ersistent Faces Servletlt;/servlet-namegt; lt;ucl-patterngt;/xmlfrom/*lt;/ucl-patterngt; lt;/servlet-mappinggt;
lt;servlet-mappinggt; lt;servlet-namegt;Blocking Servletlt;/servlet-namegt; lt;ucl-patterngt;/block/*lt;/ucl-patterngt; lt;/servlet-mappinggt;
lt;!-- The front controller of the Spring Web application, responsible for handling all application requests --gt;lt;welcome-file-listgt;
lt;welcome-filegt;intro.xhtmllt;/welcome-filegt;
lt;/welcome-file-listgt;
lt;/web-appgt;
And my appContext.xmlHTML Code:
lt;?xml version=quot;1.0quot; encoding=quot;UTF-8quot;?gt;
lt;beans xmlns=quot;schema/beansquot;
xmlns:xsi=quot;2001/XMLSchema-instancequot;
xmlns:aop=quot;schema/aopquot;
xmlns:flow=quot;schema/webflow-configquot;
xmlns:faces=quot;schema/facesquot;
xsi:schemaLocation=quot;schema/beans
schema/beans/spring-beans-2.5.xsd
schema/aop
schema/aop/spring-aop-2.5.xsd schema/webflow-config schema/webflow-config/spring-webflow-config-2.0.xsd schema/faces schema/faces/spring-faces-2.0.xsdquot;gt; lt;!-- Datasources
lt;bean
class=quot;org..beans.factory.config.PropertyPlaceholderConfigurerquot;gt;
lt;property name=quot;locationquot;gt;
lt;valuegt;/WEB-INF/environmentContext.propertieslt;/valuegt;
lt;/propertygt;
lt;/beangt;
lt;bean id=quot;dataSourcequot; class=quot;org..jndi.JndiObjectFactoryBeanquot;gt;
lt;property name=quot;jndiNamequot;gt; lt;valuegt;${datasource.jndiname}lt;/valuegt; lt;/propertygt; lt;/beangt; --gt;
lt;!-- Managed Beans --gt; lt;bean id=quot;loginBeanquot; class=quot;com.atm.backingbeans.LoginBeanquot; scope=quot;sessionquot; init-method=quot;initializequot;gt;
lt;property name=quot;loginServicequot;gt;
lt;ref local=quot;loginServicequot; /gt; lt;/propertygt; lt;/beangt; lt;!-- Services --gt; lt;bean id=quot;loginServicequot; class=quot;com.atm.service.LoginServiceImplquot;gt;
lt;/beangt;
lt;flow:flow-executor id=quot;flowExecutorquot; flow-registry=quot;flowRegistryquot;gt; lt;flow:flow-execution-attributesgt; lt;flow:always-redirect-on-pause value=quot;falsequot; /gt;
lt;/flow:flow-execution-attributesgt;
lt;/flow:flow-executorgt;
lt;!-- The registry of executable flow definitions --gt; lt;!-- This creates an XmlFlowRegistryFactory bean --gt;
lt;flow:flow-registry id=quot;flowRegistryquot; flow-builder-services=quot;facesFlowBuilderServicesquot;gt;
lt;flow:flow-location path=quot;/WEB-INF/flows/**-flow.xmlquot; /gt;
lt;/flow:flow-registrygt;
lt;!-- Configures the Spring Web Flow JSF integration --gt; lt;faces:flow-builder-services id=quot;facesFlowBuilderServicesquot; view-factory-creator=quot;viewFactoryCreatorquot; expression-parser=quot;expressionParserquot;/gt;
lt;bean id=quot;viewFactoryCreatorquot; class=quot;org..faces.webflow.JsfViewFactoryCreatorquot;gt; lt;/beangt;
lt;bean id=quot;expressionParserquot; class=quot;org..webflow.expression.WebFlowOgnlExpressionParserquot;gt; lt;/beangt;
lt;/beansgt;I've been having the exact same problem with Iceface 1.8 and Webflow 2.5.6.
I don't have a solution for you, but I think I can explain what is happening.
I don't think the Icefaces and Spring Webflow 2.0 integration is complete. Icefaces detects the presence of Spring Webflow and changes it's behavior, it has one type fo behavior for webflow 1.x and another for 2.x. Ironically everything seems to work fine with webflow 1.x!
The problem is with webflow 2.x is Icefaces assumes every resource (page) requested is going to be part of a flow, but of in most applications not every will be because that would simpy be overkill!
I've got a test application which has a simple welcome page with just some native HTML elements and icefaces elements on it, during rendering I get NPE problem because Icefaces tries to execute the following code deep in the rendering process:
value = RequestContextHolder.getRequestContext() .getFlowExecutionContext().getKey().toString();
But since my welcome page is not part of the flow the above returns Null!
Now if I enter the ucl for a flow things get even more wierd because instead of the first page of the flow being rendered, I get the welcome page that initial caused the NPE! I reckon this is some form of view stacking behavior and because there is now a flow execution going on the welcome page gets rendered.
Now if I enter by application initial by forwarding straight to a flow everything works fine because the above code can execute without throwning an exception, this is how the Icefaces port of Spring demo application works, i.e. it contains only two flows and no other types of resource, for example, static HTML pages.
In the short term I suggest making everything a flow, even simple resource requests for a single page, so I'm planning to create a welcome-flow.xml which has a single view state in it. I reckon that will solve it.
I suspect the guys and girls at Icefaces need to be made aware of this issue.
Hope this helps, if not please because I know how damn frustrating this is....
Ah, that makes a lot of sense to me. The swf-booking examples are all flow-enabled, I believe, which would make them naturally work. There doesn't seem any way to integrate SWF 2.0x into an existing ICEFaces application.
Unfortunately, this is actually exactly what I'm trying to do. We already have an enormous application that is probably 75% complete. However, the piece I'm working on is pretty conversational and flow-oriented and I thought that SWF would work well here. And it does, as long as its SWF 1.0 (which is 10x easier to config anyway).
Is there any way to fill out a JIRA for this for ICEFaces?
I've posted the following on the iceface forum:
JForum/posts/list/12928.page
and emailed production support, we'll see what happens.
It's a shame about 2.X because the features are much more advanced then 1.x!
Just read my post, you wouldn't believe english is my first language
I've exactly the same problem to integrate Iceface 1.8 and Webflow 2.5.6.
But now I'm looking go back to Iceface 1.7 and Spring Webflow 1.x.
Do you have you some examples (Iceface 1.7 + SWF 1.x) for MyEclipse witch I can build on ?
I'm didn't found swf-booking for Eclipse on the Internet.
Really appreciate some feedback.
Thanks.
I've posted the following on the iceface forum:
JForum/posts/list/12928.page
and emailed production support, we'll see what happens.
waghori,
Very nice. It looks like they just got back to you too asking to create a JIRA, which is awesome. Let me know when you create it and I will vote for it. I'm sure many others will too.
Do you have you some examples (Iceface 1.7 + SWF 1.x) for MyEclipse witch I can build on ?
I'm didn't found swf-booking for Eclipse on the Internet.
bonbhel,
I don't have any sort of MyEclipse-specific examples, but I was able to get ICEFaces 1.7.1 and SWF 1.x working rather easily. Although, I am experiencing a strange problem with flow scope variable management. If either of you could help, I would greatly appreciate it. Please see my post here. bonbhel, it also provides some config information you may find useful.
showthread.php?t=71646 |