[JBoss JIRA] (RF-13731) NPE on Tomcat 7 after Ajax request
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13731?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-13731:
-------------------------------
Sprint: 4.5.0.Beta1 - Bug Fix Sprint
> NPE on Tomcat 7 after Ajax request
> ----------------------------------
>
> Key: RF-13731
> URL: https://issues.jboss.org/browse/RF-13731
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.5.0.Alpha3
> Environment: Tomcat 7 and Firefox only
> Reporter: Juraj Húska
> Fix For: 4.5.0.Beta1
>
>
> There is a NPE thrown after an AJAX request in either showcase (showcase can be deployed only when {{weld-servlet.jar}} is changed manually to higher version - RF-13725) or in Metamer:
> {code}
> SEVERE: java.lang.NullPointerException
> at org.richfaces.application.GlobalResourcesViewHandler.addSkinningResourcesToViewRoot(GlobalResourcesViewHandler.java:148)
> at org.richfaces.application.GlobalResourcesViewHandler.restoreView(GlobalResourcesViewHandler.java:179)
> at javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:353)
> at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:197)
> at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
> at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:121)
> at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
> at org.richfaces.demo.arrangeablemodel.PersistenceLifecycle.execute(PersistenceLifecycle.java:58)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
> at org.richfaces.webapp.PushFilter.doFilter(PushFilter.java:96)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
> at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
> at org.ocpsoft.rewrite.servlet.RewriteFilter.doFilter(RewriteFilter.java:172)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
> at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
> at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
> at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> Exception is being thrown only after initial page load, after refresh it works.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 3 months
[JBoss JIRA] (RF-13723) fileUpload: 'Clear All' button does not work after maxFilesQuantity reached on IE
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13723?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-13723:
-------------------------------
Sprint: 4.5.0.Beta1 - Bug Fix Sprint
> fileUpload: 'Clear All' button does not work after maxFilesQuantity reached on IE
> ---------------------------------------------------------------------------------
>
> Key: RF-13723
> URL: https://issues.jboss.org/browse/RF-13723
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-input
> Affects Versions: 4.5.0.Alpha3
> Environment: IE 11, IE 10
> Reporter: Jiří Štefek
> Priority: Minor
> Labels: IE10, IE11
> Fix For: 4.5.0.Beta1
>
>
> The 'Clear All' button does nothing when clicked after maxFilesQuantity reached by adding items using the 'Add' button. It works after items were added by DnD.
> You have to click somewhere on the page, to get the button working.
> It works fine in FF, Chrome.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 3 months
[JBoss JIRA] (RF-13720) Mobile Showcase - CSV demo with JS error and does not work
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13720?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-13720:
-------------------------------
Sprint: 4.5.0.Beta1 - Bug Fix Sprint
> Mobile Showcase - CSV demo with JS error and does not work
> ----------------------------------------------------------
>
> Key: RF-13720
> URL: https://issues.jboss.org/browse/RF-13720
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-validators
> Affects Versions: 4.5.0.Alpha3
> Environment: mobile devices
> Reporter: Juraj Húska
> Labels: mobile, regression
> Fix For: 4.5.0.Beta1
>
>
> Showcase demo for _client side validation_ is not working on mobile devices.
> There is a JS error thrown, stating:
> {code}
> TypeError: RichFaces.csv.validate is not a function
> if(clientHandler){clientHandler.call(this,event)
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 3 months
[JBoss JIRA] (RF-13722) Document CDK Maven Changes for 4.5
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13722?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-13722:
-------------------------------
Sprint: 4.5.0.Beta1 - Doc Sprint
> Document CDK Maven Changes for 4.5
> ----------------------------------
>
> Key: RF-13722
> URL: https://issues.jboss.org/browse/RF-13722
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: cdk
> Affects Versions: 4.5.0.Alpha3
> Reporter: Cody Lerum
> Fix For: 4.5.0.Beta1
>
>
> The maven build requires a 2 step process now with a set to precompile before the cdk runs
> {code}
> <plugins>
> <plugin>
> <artifactId>maven-compiler-plugin</artifactId>
> <executions>
> <execution>
> <id>precompile-sources-for-cdk</id>
> <phase>generate-sources</phase>
> <goals>
> <goal>compile</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> <plugin>
> <groupId>org.richfaces.cdk</groupId>
> <artifactId>richfaces-cdk-maven-plugin</artifactId>
> <version>${org.richfaces.cdk.version}</version>
> <executions>
> <execution>
> <id>cdk-generate-sources</id>
> <phase>process-sources</phase>
> <goals>
> <goal>generate</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> </plugins>
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 3 months
[JBoss JIRA] (RF-13729) Kitchensink archetype on Wildfly with mobile devices
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13729?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-13729:
-------------------------------
Sprint: 4.5.0.Beta1 - Bug Fix Sprint
> Kitchensink archetype on Wildfly with mobile devices
> ----------------------------------------------------
>
> Key: RF-13729
> URL: https://issues.jboss.org/browse/RF-13729
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: archetype
> Affects Versions: 4.5.0.Alpha3
> Environment: Server: Wildfly 8.1 Final (or older version)
> Archetype: kitchensink 4.5.0Alpha3
> Some mobile device (eg. smartphone)
> Reporter: Matej Novotny
> Fix For: 4.5.0.Beta1
>
>
> When you deploy kitchensink to Wildfly and access the main page via mobile device (clear browser memory and cache), it loads desktop page instead of mobile.
> If I use EAP (tried with 6.2.4 and 6.3) and load the main apge with mobile device, it loads the correct page.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 3 months
[JBoss JIRA] (RF-13674) a4j:push broken on WebLogic 12c in Chrome
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13674?page=com.atlassian.jira.plugin.s... ]
Brian Leathem commented on RF-13674:
------------------------------------
This issue should be re-checked after RF-13753 is resolved.
> a4j:push broken on WebLogic 12c in Chrome
> -----------------------------------------
>
> Key: RF-13674
> URL: https://issues.jboss.org/browse/RF-13674
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-push/poll
> Affects Versions: 4.2.0.Final
> Environment: WebLogic 12c
> Reporter: Val Blant
> Attachments: atmosphere-weblogic12c-bug-0.8.4-sources.jar, atmosphere-weblogic12c-bug-0.8.4.war, RichFacesPushFixFilter.java
>
>
> <a4j:push /> works properly on Tomcat 7, but fails on WebLogic 12c in Chrome (Firefox works fine).
> {code:title=Page.xhtml|borderStyle=solid}
> <a4j:push address="systemLinks" >
> <a4j:ajax event="dataavailable" render="systemLinksPanel" />
> </a4j:push>
>
> <a4j:outputPanel id="systemLinksPanel">
> stuff here
> </a4j:outputPanel>
> {code}
> {code:title=Java Code}
> TopicKey topicKey = new TopicKey("systemLinks");
> TopicsContext topicsContext = TopicsContext.lookup();
> topicsContext.publish(topicKey, "fly, you fools!");
> {code}
> On Tomcat 7 this work perfectly, and always refreshes '_systemLinksPanel_' when data is published.
> On Weblogic 12c the data is not flushed correctly. If you use Wireshark, you'd see the following response coming back from the server:
> {panel:title=Tomcat 7}
> 3b
> <"topic":"systemLinks","data":"fly, you fools!","number":0>
> 0
> {panel}
> {panel:title=Weblogic 12c}
> 003b
> <"topic":"systemLinks","data":"fly, you fools!","number":0>
> {panel}
> *Note the missing zero terminator line in the WebLogic response!*
> I narrowed down the problem to the following:
> {code:title=org.richfaces.application.push.impl.RequestImpl}
> public synchronized void onBroadcast(AtmosphereResourceEvent<HttpServletRequest, HttpServletResponse> event) {
> MessageDataScriptString serializedMessages = (MessageDataScriptString) event.getMessage();
> getSession().clearBroadcastedMessages(serializedMessages.getLastSequenceNumber());
> hasActiveBroadcaster = false;
> if (isPolling()) {
> event.getResource().resume(); // <= THIS LINE
> } else {
> postMessages();
> }
> }
> {code}
> There is nothing wrong with this in principle, but it does not work due to a bug in Atmosphere 0.8.4. Calling _AtmosphereResource.resume()_ at this point seems reasonable, since it is supposed to properly finish/commit the _HttpServletResponse_. However, this does not work on WebLogic 12c and leads to incorrectly flushed data demonstrated above.
> The underlying problem seems to be the fact that _AtmosphereResource.resume()_ method interrupts the thread which flushed the socket Writer before a call to _asyncContext.complete()_ is made:
> {code}
> public AtmosphereResource resume() {
> ....
> if (!b.isDestroyed()) {
> b.removeAtmosphereResource(event.getResource());
> }
> ....
> asyncSupport.action(this); // <= This is where asyncContext.complete() is called
> }
> {code}
> I have verified that calling _asyncContext.complete()_ before we clean up Atmosphere resources fixes the problem.
> Here's the fix, which needs to go into _RequestImpl.onBroadcast_:
> {code:title=org.richfaces.application.push.impl.RequestImpl}
> public synchronized void onBroadcast(AtmosphereResourceEvent<HttpServletRequest, HttpServletResponse> event) {
> ..............
> if (isPolling()) {
> // This is the workaround. Completing AsyncContext before cleaning up Atmosphere resources
> // seems to make this work everywhere.
> //
> AsyncContext asyncContext = (AsyncContext)
> event
> .getResource()
> .getRequest()
> .getAttribute("org.atmosphere.container.asyncContext");
> if ( asyncContext != null ) {
> asyncContext.complete();
> }
> event.getResource().resume();
> } else {
> postMessages();
> }
> }
> ..............
> {code}
> I am attaching a very simple WAR file that demonstrates the problem clearly. The demo app does not use Richfaces, b/c I wanted to remove all unnecessary complexity. Instead I created a couple of simple classes that mimic the behavior of _org.richfaces.webapp.PushHandlerFilter_ and _org.richfaces.application.push.impl.RequestImpl_. In the demo app, _MeteorRequest = RequestImpl_, which is where the fix needs to go.
> Please note that this issue is fixed in Atmosphere 2.1. I ran the demo jar with v2.1.5, and it works correctly, so the easiest fix on the RichFaces side could be to simply upgrade the underlying Atmosphere framework. The API differences, at least as far as the PushHandlerFilter is concerned are minimal.
> Now, the reason why only Chrome is effected has to do with processing of chunked responses by the XMLHttpRequest. Unlike other browsers, Chrome is not capable of handling improperly terminated chunked responses. So:
> {noformat}
> HTTP/1.1 200 OK
> Cache-Control: no-store, no-cache, must-revalidate
> Date: Wed, 18 Jun 2014 05:37:55 GMT
> Pragma: no-cache
> Transfer-Encoding: chunked <<--- THIS IS IMPORTANT
> Content-Type: text/plain
> Expires: -1
> Access-Control-Allow-Credentials: true
> Access-Control-Allow-Origin: *
> X-Powered-By: Servlet/3.0 JSP/2.2
> 0841
> <!-- ---------------------------------------------------------------- http://github.com/Atmosphere ------------------------------------------------------------------------ -->
> <!-- Welcome to the Atmosphere Framework. To work with all the browsers when suspending connection, Atmosphere must output some data to makes WebKit based browser working.-->
> <!-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------- -->
> <!-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------- -->
> <!-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------- -->
> <!-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------- -->
> <!-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------- -->
> <!-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------- -->
> <!-- --------------------001c
> Wed Jun 18 13:37:57 CST 201
> <<--- MISSING 0 TERMINATOR
> {noformat}
> This can be fixed by explicitly setting Content-Length in the response, as per these discussions:
> http://stackoverflow.com/questions/22219565/iis-chrome-failed-to-load-res...
> http://www.rahulsingla.com/blog/2010/06/asp-net-sets-the-transfer-encodin...
> However, that does not seem to be feasible here, since we must reply with a header of known length, followed by the data of unknown length.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 3 months
[JBoss JIRA] (RF-13674) a4j:push broken on WebLogic 12c in Chrome
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13674?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-13674:
-------------------------------
Fix Version/s: (was: 4.5.0.Beta1)
> a4j:push broken on WebLogic 12c in Chrome
> -----------------------------------------
>
> Key: RF-13674
> URL: https://issues.jboss.org/browse/RF-13674
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-push/poll
> Affects Versions: 4.2.0.Final
> Environment: WebLogic 12c
> Reporter: Val Blant
> Attachments: atmosphere-weblogic12c-bug-0.8.4-sources.jar, atmosphere-weblogic12c-bug-0.8.4.war, RichFacesPushFixFilter.java
>
>
> <a4j:push /> works properly on Tomcat 7, but fails on WebLogic 12c in Chrome (Firefox works fine).
> {code:title=Page.xhtml|borderStyle=solid}
> <a4j:push address="systemLinks" >
> <a4j:ajax event="dataavailable" render="systemLinksPanel" />
> </a4j:push>
>
> <a4j:outputPanel id="systemLinksPanel">
> stuff here
> </a4j:outputPanel>
> {code}
> {code:title=Java Code}
> TopicKey topicKey = new TopicKey("systemLinks");
> TopicsContext topicsContext = TopicsContext.lookup();
> topicsContext.publish(topicKey, "fly, you fools!");
> {code}
> On Tomcat 7 this work perfectly, and always refreshes '_systemLinksPanel_' when data is published.
> On Weblogic 12c the data is not flushed correctly. If you use Wireshark, you'd see the following response coming back from the server:
> {panel:title=Tomcat 7}
> 3b
> <"topic":"systemLinks","data":"fly, you fools!","number":0>
> 0
> {panel}
> {panel:title=Weblogic 12c}
> 003b
> <"topic":"systemLinks","data":"fly, you fools!","number":0>
> {panel}
> *Note the missing zero terminator line in the WebLogic response!*
> I narrowed down the problem to the following:
> {code:title=org.richfaces.application.push.impl.RequestImpl}
> public synchronized void onBroadcast(AtmosphereResourceEvent<HttpServletRequest, HttpServletResponse> event) {
> MessageDataScriptString serializedMessages = (MessageDataScriptString) event.getMessage();
> getSession().clearBroadcastedMessages(serializedMessages.getLastSequenceNumber());
> hasActiveBroadcaster = false;
> if (isPolling()) {
> event.getResource().resume(); // <= THIS LINE
> } else {
> postMessages();
> }
> }
> {code}
> There is nothing wrong with this in principle, but it does not work due to a bug in Atmosphere 0.8.4. Calling _AtmosphereResource.resume()_ at this point seems reasonable, since it is supposed to properly finish/commit the _HttpServletResponse_. However, this does not work on WebLogic 12c and leads to incorrectly flushed data demonstrated above.
> The underlying problem seems to be the fact that _AtmosphereResource.resume()_ method interrupts the thread which flushed the socket Writer before a call to _asyncContext.complete()_ is made:
> {code}
> public AtmosphereResource resume() {
> ....
> if (!b.isDestroyed()) {
> b.removeAtmosphereResource(event.getResource());
> }
> ....
> asyncSupport.action(this); // <= This is where asyncContext.complete() is called
> }
> {code}
> I have verified that calling _asyncContext.complete()_ before we clean up Atmosphere resources fixes the problem.
> Here's the fix, which needs to go into _RequestImpl.onBroadcast_:
> {code:title=org.richfaces.application.push.impl.RequestImpl}
> public synchronized void onBroadcast(AtmosphereResourceEvent<HttpServletRequest, HttpServletResponse> event) {
> ..............
> if (isPolling()) {
> // This is the workaround. Completing AsyncContext before cleaning up Atmosphere resources
> // seems to make this work everywhere.
> //
> AsyncContext asyncContext = (AsyncContext)
> event
> .getResource()
> .getRequest()
> .getAttribute("org.atmosphere.container.asyncContext");
> if ( asyncContext != null ) {
> asyncContext.complete();
> }
> event.getResource().resume();
> } else {
> postMessages();
> }
> }
> ..............
> {code}
> I am attaching a very simple WAR file that demonstrates the problem clearly. The demo app does not use Richfaces, b/c I wanted to remove all unnecessary complexity. Instead I created a couple of simple classes that mimic the behavior of _org.richfaces.webapp.PushHandlerFilter_ and _org.richfaces.application.push.impl.RequestImpl_. In the demo app, _MeteorRequest = RequestImpl_, which is where the fix needs to go.
> Please note that this issue is fixed in Atmosphere 2.1. I ran the demo jar with v2.1.5, and it works correctly, so the easiest fix on the RichFaces side could be to simply upgrade the underlying Atmosphere framework. The API differences, at least as far as the PushHandlerFilter is concerned are minimal.
> Now, the reason why only Chrome is effected has to do with processing of chunked responses by the XMLHttpRequest. Unlike other browsers, Chrome is not capable of handling improperly terminated chunked responses. So:
> {noformat}
> HTTP/1.1 200 OK
> Cache-Control: no-store, no-cache, must-revalidate
> Date: Wed, 18 Jun 2014 05:37:55 GMT
> Pragma: no-cache
> Transfer-Encoding: chunked <<--- THIS IS IMPORTANT
> Content-Type: text/plain
> Expires: -1
> Access-Control-Allow-Credentials: true
> Access-Control-Allow-Origin: *
> X-Powered-By: Servlet/3.0 JSP/2.2
> 0841
> <!-- ---------------------------------------------------------------- http://github.com/Atmosphere ------------------------------------------------------------------------ -->
> <!-- Welcome to the Atmosphere Framework. To work with all the browsers when suspending connection, Atmosphere must output some data to makes WebKit based browser working.-->
> <!-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------- -->
> <!-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------- -->
> <!-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------- -->
> <!-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------- -->
> <!-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------- -->
> <!-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------- -->
> <!-- --------------------001c
> Wed Jun 18 13:37:57 CST 201
> <<--- MISSING 0 TERMINATOR
> {noformat}
> This can be fixed by explicitly setting Content-Length in the response, as per these discussions:
> http://stackoverflow.com/questions/22219565/iis-chrome-failed-to-load-res...
> http://www.rahulsingla.com/blog/2010/06/asp-net-sets-the-transfer-encodin...
> However, that does not seem to be feasible here, since we must reply with a header of known length, followed by the data of unknown length.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 3 months