[JBoss JIRA] (RF-11093) UIDataAdaptor context variable backup broken (reentrance problem)
by Yannick Valot (JIRA)
[ https://issues.jboss.org/browse/RF-11093?page=com.atlassian.jira.plugin.s... ]
Yannick Valot commented on RF-11093:
------------------------------------
Alas, this issue is quite old and I do not have a reproducer available
Maybe this could do the trick :
1) In the repeat, include a commandLink and bind it to an action (action="#{someBean.someAction}")
2) In "someAction" :
2a) visit the componentTree by calling FacesContext.getCurrentInstance().getViewRoot().visitTree(...) (the callback does not actually need to do anything useful)
2b) After the visit, read the attribute value, without the patch, it will be null or contain some old value not related to the current row.
> UIDataAdaptor context variable backup broken (reentrance problem)
> -----------------------------------------------------------------
>
> Key: RF-11093
> URL: https://issues.jboss.org/browse/RF-11093
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-tables
> Affects Versions: 4.0.0.Final
> Environment: Windows XP, Java 6, Tomcat 6.0.24, Mojarra 2.0.2.
> Reporter: Yannick Valot
> Assignee: Yannick Valot
> Fix For: 4.5.0.Alpha3
>
> Attachments: UIDataAdaptor.java.patch
>
> Original Estimate: 1 hour
> Remaining Estimate: 1 hour
>
> I am encountering a reentrance problem with org.richfaces.component.UIDataAdaptor (using it as a dataTable).
> I need to perform a visit of the component tree while executing an action on a command link in one row of the same table.
> {code}
> <rich:dataTable value="#{listOfItems}" var="myItem" >
> ... some stuff here ...
> <commandLink here>
> ... some stuff here ...
> </rich:dataTable>
> {code}
> After the action on the command link has visited the component tree, myItem is no longer available in context.
> When the UIDataAdaptor sets or resets the "myItem" context variable, it backs up any previous value by calling captureOrigValue(FacesContext), and later restores it by calling restoreOrigValue(FacesContext), but it looks as if the visit backs the variable up twice (in a nested fashion), and it erases myItem between the two backups :
> - backup variable (old value is correctly backed up) (in visitTree(VisitContext visitContext, VisitCallback callback))
> - erase variable (setRowKey(facesContext, null) in same function)
> - erase variable (doVisitChildren(VisitContext context, boolean visitRows))
> - erase variable (visitTree(VisitContext visitContext, VisitCallback callback))
> - backup variable (erases backed up value) (walk(FacesContext faces, DataVisitor visitor, Object argument))
> - ...
> - restore value (restores null) (walk(FacesContext faces, DataVisitor visitor, Object argument))
> - restore value (restores null) (in visitTree(VisitContext visitContext, VisitCallback callback))
> etc.
> The problem can be solved by *stacking* backed up variables, instead of storing them in a simple attribute, to allow for any kind of reentrance.
> (I do not say that this is the best possible patch, but it has solved the problem for me).
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 7 months
[JBoss JIRA] (RF-13726) partialViewContext.release triggering assertNotReleased
by mel turphin (JIRA)
mel turphin created RF-13726:
--------------------------------
Summary: partialViewContext.release triggering assertNotReleased
Key: RF-13726
URL: https://issues.jboss.org/browse/RF-13726
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: core
Affects Versions: 4.3.7
Environment: JSF 2.2 Mojarra + Richfaces 4.3
Eclipse + Tomcat
Reporter: mel turphin
Priority: Critical
when the release method is called on
com.sun.faces.context.FacesContextImpl
the first thing that is done is to mark relased=true
released = true;
later on partialViewContext.release can be called
partialViewContext.release();
this is following some set of calls that ends with getAttributes and assertNotReleased raising an exception since the context was already marked as released
ExtendedPartialViewContextImpl
org.richfaces.context.ExtendedPartialViewContext.release()
setInstance(facesContext, null);
facesContext.getAttributes().put(ATTRIBUTE_NAME, instance);
getAttributes --> assertNotReleased();
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 7 months
[JBoss JIRA] (RF-13725) Showcase can not be deployed on Tomcat 7 due to IllegalAccessException
by Juraj Húska (JIRA)
Juraj Húska created RF-13725:
--------------------------------
Summary: Showcase can not be deployed on Tomcat 7 due to IllegalAccessException
Key: RF-13725
URL: https://issues.jboss.org/browse/RF-13725
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: showcase
Affects Versions: 4.5.0.Alpha3
Reporter: Juraj Húska
Showcase can not be deployed on Tomcat 7. Following exception, closely related to guava & Weld, is thrown:
{code}
SEVERE: Error configuring application listener of class org.jboss.weld.environment.servlet.Listener
java.lang.IllegalAccessError: tried to access method com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/base/Function;)Ljava/util/concurrent/ConcurrentMap; from class org.jboss.weld.logging.WeldMessageConveyor
at org.jboss.weld.logging.WeldMessageConveyor.<init>(WeldMessageConveyor.java:61)
at org.jboss.weld.logging.WeldMessageConveyerFactory.getDefaultMessageConveyer(WeldMessageConveyerFactory.java:27)
at org.jboss.weld.logging.LoggerFactory.<init>(LoggerFactory.java:37)
at org.jboss.weld.logging.LoggerFactory.loggerFactory(LoggerFactory.java:51)
at org.jboss.weld.bootstrap.WeldBootstrap.<clinit>(WeldBootstrap.java:124)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:374)
at org.jboss.weld.environment.servlet.util.Reflections.newInstance(Reflections.java:36)
at org.jboss.weld.environment.servlet.Listener.<init>(Listener.java:70)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:374)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:140)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4888)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1880)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
{code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 7 months
[JBoss JIRA] (RF-13673) Backport the plain skin fix from RF 5
by Juraj Húska (JIRA)
[ https://issues.jboss.org/browse/RF-13673?page=com.atlassian.jira.plugin.s... ]
Juraj Húska closed RF-13673.
----------------------------
Sorry I have not worked with {{plain}} skin so far. I discussed it with Pavol, and the behavior is expected.
This issue is verified. Closing.
> Backport the plain skin fix from RF 5
> -------------------------------------
>
> Key: RF-13673
> URL: https://issues.jboss.org/browse/RF-13673
> Project: RichFaces
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: skinning
> Reporter: Brian Leathem
> Assignee: Brian Leathem
> Fix For: 4.5.0.Alpha3
>
> Attachments: autocompleteInPlain.png, calendarWithPlain.png
>
> Original Estimate: 30 minutes
> Remaining Estimate: 30 minutes
>
> Backport RF-11103.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 7 months
[JBoss JIRA] (RF-13706) dequeued Ajax request not processed correctly if its source element has been updated
by Matej Novotny (JIRA)
[ https://issues.jboss.org/browse/RF-13706?page=com.atlassian.jira.plugin.s... ]
Matej Novotny commented on RF-13706:
------------------------------------
Thanks for tests in 4.5 branch [~marcelkolsteren]!
I checked the [Jenkins job|https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/RichFaces/view/...] and it's all good :)
> dequeued Ajax request not processed correctly if its source element has been updated
> ------------------------------------------------------------------------------------
>
> Key: RF-13706
> URL: https://issues.jboss.org/browse/RF-13706
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 4.3.7
> Reporter: Marcel Kolsteren
> Assignee: Marcel Kolsteren
> Fix For: 4.3.8, 4.5.0.Alpha3
>
> Attachments: queuetest-javaee6.zip, queuetest.zip, richfaces-core-4.3.8-SNAPSHOT.patch.zip
>
> Original Estimate: 1 hour
> Remaining Estimate: 1 hour
>
> I found a problem in the RichFaces Ajax queuing mechanism, which can cause all JavaScript execution to stop, leaving the end user with an unresponsive page.
> The problem occurs when a request in the queue rerenders an area that includes the source element of the next request in the queue, but does not include the form of that source element. When the next request is fetched from the queue, JSF tries to find the correct form by climbing the DOM tree, starting at the source element of the event. However, because the source element has been rerendered, the path to its form is broken, and in that case JSF falls back to the first form of the page (see JavaScript function getForm that is called by jsf.ajax.request in jsf.js). If that form is not the form belonging to the rerendered version of the element, nasty things will happen.
> To illustrate this, I created a very simple Java EE 7 web application (see attached Maven project) and deployed it in WildFly 8.1.0.Final. It contains a page with one clickable link that rerenders itself when clicked:
> {noformat}
> <!DOCTYPE html>
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:a4j="http://richfaces.org/a4j">
> <h:head/>
> <h:body>
> <form action="http://www.meandi.nl"/>
> <h:form>
> <a4j:commandLink action="#{richBean.waitThreeSeconds}" value="Click Me" render="@this"/>
> </h:form>
> </h:body>
> </html>
> {noformat}
> The method "waitThreeSeconds" does nothing but waiting for three seconds. When the link is double clicked, you'll observe that the first click is handled correctly, but that the second click results in an Ajax request posted to the URL of the first form, leading to access denied errors (because of cross domain scripting). The used RichFaces version is 4.3.7.
> The problem can be fixed by changing the RichFaces JavaScript code, so that after completion of an Ajax request, stale elements are removed from the queue. I created a patch for RichFaces 4.3.7, and verified that it works (see attachment). Another solution strategy would be to try to find the new DOM element that corresponds to the stale source of the event, and fetch the form from that element. My thought was that removing the stale request would be better, because (1) it is kind of dangerous to process a user action on an element that has already been replaced and (2) the element might have been removed from the DOM tree by the previous rerender.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 7 months
[JBoss JIRA] (RF-11093) UIDataAdaptor context variable backup broken (reentrance problem)
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-11093?page=com.atlassian.jira.plugin.s... ]
Brian Leathem commented on RF-11093:
------------------------------------
[~manovotn] you could try nesting {{a4j:repeat}} tags with the same {{var}} attribute value.
[~yvalot] do you have a reproducer for this issue you could share with our QE team?
> UIDataAdaptor context variable backup broken (reentrance problem)
> -----------------------------------------------------------------
>
> Key: RF-11093
> URL: https://issues.jboss.org/browse/RF-11093
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-tables
> Affects Versions: 4.0.0.Final
> Environment: Windows XP, Java 6, Tomcat 6.0.24, Mojarra 2.0.2.
> Reporter: Yannick Valot
> Assignee: Yannick Valot
> Fix For: 4.5.0.Alpha3
>
> Attachments: UIDataAdaptor.java.patch
>
> Original Estimate: 1 hour
> Remaining Estimate: 1 hour
>
> I am encountering a reentrance problem with org.richfaces.component.UIDataAdaptor (using it as a dataTable).
> I need to perform a visit of the component tree while executing an action on a command link in one row of the same table.
> {code}
> <rich:dataTable value="#{listOfItems}" var="myItem" >
> ... some stuff here ...
> <commandLink here>
> ... some stuff here ...
> </rich:dataTable>
> {code}
> After the action on the command link has visited the component tree, myItem is no longer available in context.
> When the UIDataAdaptor sets or resets the "myItem" context variable, it backs up any previous value by calling captureOrigValue(FacesContext), and later restores it by calling restoreOrigValue(FacesContext), but it looks as if the visit backs the variable up twice (in a nested fashion), and it erases myItem between the two backups :
> - backup variable (old value is correctly backed up) (in visitTree(VisitContext visitContext, VisitCallback callback))
> - erase variable (setRowKey(facesContext, null) in same function)
> - erase variable (doVisitChildren(VisitContext context, boolean visitRows))
> - erase variable (visitTree(VisitContext visitContext, VisitCallback callback))
> - backup variable (erases backed up value) (walk(FacesContext faces, DataVisitor visitor, Object argument))
> - ...
> - restore value (restores null) (walk(FacesContext faces, DataVisitor visitor, Object argument))
> - restore value (restores null) (in visitTree(VisitContext visitContext, VisitCallback callback))
> etc.
> The problem can be solved by *stacking* backed up variables, instead of storing them in a simple attribute, to allow for any kind of reentrance.
> (I do not say that this is the best possible patch, but it has solved the problem for me).
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 7 months
[JBoss JIRA] (RF-13719) rich.fileUpload breaks form action in portal
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13719?page=com.atlassian.jira.plugin.s... ]
Brian Leathem commented on RF-13719:
------------------------------------
[~kenfinni] is this something that you can dig into and find a resolution?
> rich.fileUpload breaks form action in portal
> --------------------------------------------
>
> Key: RF-13719
> URL: https://issues.jboss.org/browse/RF-13719
> Project: RichFaces
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: component-input
> Affects Versions: 4.3.5
> Environment: JBoss Portal 6.1.1
> Reporter: Jonáš Trantina
> Labels: gss
> Attachments: reproducer.zip, reproducer2.zip
>
>
> When a rich:fileUpload si submitted (i.e. files are uploaded) action of the form is not preserved well.
> In fileupload.js __submit method there is the following code:
> {code:JavaScript}
> var encodedURLInputs = this.form.children("input[name='javax.faces.encodedURL']");
> var originalAction = encodedURLInputs.length > 0 ? encodedURLInputs.val() : this.form.attr("action");
> {code}
> the var "originalAction" is then used to revert to the original action url of the form. However, encodedURLInputs and form action prop does not contain the same url. Because encodedURLInputs has bigger priority URL from that input is restored into the form and not the original form action. This breaks the form as the next submission fails.
> In portal the solution is
> {code:JavaScript}
> var originalFormAction =this.form.attr("action");
> {code}
> and then restore "originalFormAction" instead of "originalAction", but I am not sure if this doesn't break anything in other environments.
> Is this a bug in richfaces or is the content of input[name='javax.faces.encodedURL'] set badly?
> To reproduce you can use the reproducer attached.
> Example URLs:
> form action
> {code}
> /portal/classic/home/uploadform?portal:componentId=834fa198-ff3d-4a5c-a1c7-33c85e8a410d&interactionstate=JBPNS_rO0ABXcsABBfanNmQnJpZGdlVmlld0lkAAAAAQALL2hvbWUueGh0bWwAB19fRU9GX18*&portal:type=action
> {code}
> input[name='javax.faces.encodedURL']
> {code}
> /portal/classic/home/uploadform?portal:windowState=normal&portal:componentId=834fa198-ff3d-4a5c-a1c7-33c85e8a410d&portal:cacheLevel=PAGE&resourcestate=JBPNS_rO0ABXdAABBfanNmQnJpZGdlVmlld0lkAAAAAQALL2hvbWUueGh0bWwACF9wYnJBamF4AAAAAQAEdHJ1ZQAHX19FT0ZfXw**&portal:type=resource&portal:portletMode=view
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 7 months