[JBoss JIRA] (RF-11809) NullPointerException on clearSkinCaches
by Fab Mars (Created) (JIRA)
NullPointerException on clearSkinCaches
---------------------------------------
Key: RF-11809
URL: https://issues.jboss.org/browse/RF-11809
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 4.1.0.CR2
Environment: Win7 x86, Glassfish 3.1.2 promoted, JSK 1.6.0u29
Reporter: Fab Mars
I have a homemade "pretty URL" mechanism I've been using on JSF1.2 and RF 3.3 in the past.
It uses a phase listener that operates during RESTORE_VIEW.
At the end of its parsing, it computes the "real" viewId to display and does:
PrettyUrlRequestWrapper wrapper = new PrettyUrlRequestWrapper(request);
wrapper.setViewId(computedViewId);
context.getExternalContext().setRequest(wrapper);
When I don't use it and call directly .jsf pages, all works fine with RF 4.1.0CR2.
When I use it, I get this error:
GRAVE: null
javax.servlet.ServletException
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:606)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1542)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:174)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
at org.richfaces.skin.SkinFactoryImpl.clearSkinCaches(SkinFactoryImpl.java:94)
at org.richfaces.skin.SkinFactoryPreRenderViewListener.processEvent(SkinFactoryPreRenderViewListener.java:35)
at javax.faces.event.SystemEvent.processListener(SystemEvent.java:106)
at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2168)
at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2144)
at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:302)
at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:246)
at javax.faces.application.ApplicationWrapper.publishEvent(ApplicationWrapper.java:670)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:108)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
... 26 more
ATTENTION: StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
java.lang.NullPointerException
at org.richfaces.skin.SkinFactoryImpl.clearSkinCaches(SkinFactoryImpl.java:94)
at org.richfaces.skin.SkinFactoryPreRenderViewListener.processEvent(SkinFactoryPreRenderViewListener.java:35)
at javax.faces.event.SystemEvent.processListener(SystemEvent.java:106)
at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2168)
at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2144)
at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:302)
at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:246)
at javax.faces.application.ApplicationWrapper.publishEvent(ApplicationWrapper.java:670)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:108)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1542)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:174)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:662)
Well, clearSkinCackes uses only FacesContext.
static void clearSkinCaches(FacesContext context) {
context.getAttributes().remove(BASE_SKIN_KEY);
context.getAttributes().remove(SKIN_KEY);
}
If you check on the debugger, FC is indeed null then. That's unexpected and I'm not sure this is normal.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 2 months
[JBoss JIRA] Created: (RF-11405) showcase - rich:messages - validation does not work on Tomcats, warning is rendered
by Juraj Huska (JIRA)
showcase - rich:messages - validation does not work on Tomcats, warning is rendered
-----------------------------------------------------------------------------------
Key: RF-11405
URL: https://issues.jboss.org/browse/RF-11405
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: showcase
Affects Versions: 4.1.0.Milestone2
Environment: application: richfaces-showcase-4.1.0.20110910-M2-jee6.war
browsers: Chrome, FF
containers: Tomcat 6.0.32, Tomcat 7.0.20
Reporter: Juraj Huska
Validation in demo for rich:messages does not work. When I click on Ajax Validate no inputs are validated. Ajax request is thrown, but no validation messages are shown. In the place where validation messages should be, a warning is generated:
The form component needs to have a UIForm in its ancestry. Suggestion: enclose the necessary components within <h:form>.
However when I inspect the code, it seems to be ok:
{code:xml}
<h:form>
<rich:messages ajaxRendered="true" />
<h:panelGrid columns="2">
<h:outputText value="Name:" />
<h:inputText label="Name" id="name" required="true" value="#{userBean.name}">
<f:validateLength minimum="3" />
</h:inputText>
<h:outputText value="Job:" />
<h:inputText label="Job" id="job" required="true" value="#{userBean.job}">
<f:validateLength minimum="3" maximum="50" />
</h:inputText>
<h:outputText value="Address:" />
<h:inputText label="Address" id="address" required="true" value="#{userBean.address}">
<f:validateLength minimum="10" />
</h:inputText>
<h:outputText value="Zip:" />
<h:inputText label="Zip" id="zip" required="true" value="#{userBean.zip}">
<f:validateLength minimum="4" maximum="9" />
</h:inputText>
<f:facet name="footer">
<a4j:commandButton value="Ajax Validate" />
</f:facet>
</h:panelGrid>
</h:form>
{code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 2 months
[JBoss JIRA] Created: (RF-11389) a4j:outputPanel + rich:popupPanel + ViewScope
by Jesper Vrelits (JIRA)
a4j:outputPanel + rich:popupPanel + ViewScope
---------------------------------------------
Key: RF-11389
URL: https://issues.jboss.org/browse/RF-11389
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: component
Affects Versions: 4.0.0.Final
Environment: Richfaces 4.0.0 Final + JSF Mojarra 2.1.x + Weblogic 10.3.4
Reporter: Jesper Vrelits
When a rich:popupPanel is inside <a4j:outputPanel ajaxRendered="true"> and it is rerendered through ajax request and a4j:commandButton is called (from the popupPanel) it enters preRenderView method. As far as I know a ajax request is not supposed to do this.
If the popupPanel is not rerendered because the is no triggering ajax request the a4j:commandButton works as expected.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 2 months