eclipse-ee4j / mojarra-jsf-extensions

Other
1 stars 3 forks source link

fireAjaxTransaction does not work using JSF 1.2_02 #12

Closed glassfishrobot closed 18 years ago

glassfishrobot commented 18 years ago

When upgrading to AppServer 9.0.01 b11 or b12, using JSF 1.2.02-b03-FCS, our fireAjaxTransaction function stops working shortly after it starts. For example, in our progress bar component, we use the following code to poll every 3 seconds. However, after the first call to this function, AppServer begins throwing errors and we no longer recieve responses.

var src = document.getElementById(e.id); new DynaFaces.fireAjaxTransaction(e,

{ execute: "none", render: e.id, replaceElement: update }

);

This works fine with AppServer 9.0 b48, using JSF 1.2 b20, from the Java EE 5 Tools Bundle. However, we cannot use that version because of a duplicate id bug in JSF 1.2.

That said, I'm actually seeing two errors below; a NullPointerException from PartialTraversalLifecycle, which appears to be directly related to DynaFaces, and further down is an IOException from ResponseStateManagerImpl.

StandardWrapperValve[FacesServlet]: Servlet.service() for servlet FacesServlet threw exception java.lang.NullPointerException at com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.execute(PartialTraversalLifecycle.java:82) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244) at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184) at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:203) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566) at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239) at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667) at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574) at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844) at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287) at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212) at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)

...

Unable to set character encoding ISO-8859-1 because request parameters have already been read, or ServletRequest.getReader() has been called Not in GZIP format java.io.IOException: Not in GZIP format at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:132) at java.util.zip.GZIPInputStream.(GZIPInputStream.java:58) at java.util.zip.GZIPInputStream.(GZIPInputStream.java:68) at com.sun.faces.renderkit.ResponseStateManagerImpl.getTreeStructureToRestore(ResponseStateManagerImpl.java:159) at com.sun.faces.application.StateManagerImpl.restoreTree(StateManagerImpl.java:577) at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:88) at javax.faces.application.StateManagerWrapper.restoreView(StateManagerWrapper.java:167) at com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:312) at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:173) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:113) at com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.execute(PartialTraversalLifecycle.java:79) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244) at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184) at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:203) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566) at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239) at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667) at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574) at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844) at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287) at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212) at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252) at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75) executePhase(RESTORE_VIEW 1,com.sun.faces.context.FacesContextImpl@711d71) threw exception javax.faces.FacesException: java.io.IOException: Not in GZIP format at com.sun.faces.renderkit.ResponseStateManagerImpl.getTreeStructureToRestore(ResponseStateManagerImpl.java:180) at com.sun.faces.application.StateManagerImpl.restoreTree(StateManagerImpl.java:577) at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:88) at javax.faces.application.StateManagerWrapper.restoreView(StateManagerWrapper.java:167) at com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:312) at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:173) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:113) at com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.execute(PartialTraversalLifecycle.java:79) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244) at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184) at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:203) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566) at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239) at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667) at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574) at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844) at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287) at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212) at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252) at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75) Caused by: java.io.IOException: Not in GZIP format at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:132) at java.util.zip.GZIPInputStream.(GZIPInputStream.java:58) at java.util.zip.GZIPInputStream.(GZIPInputStream.java:68) at com.sun.faces.renderkit.ResponseStateManagerImpl.getTreeStructureToRestore(ResponseStateManagerImpl.java:159) ... 38 more

Environment

Operating System: All Platform: Sun

Affected Versions

[current]

glassfishrobot commented 5 years ago
glassfishrobot commented 18 years ago

@glassfishrobot Commented Reported by danl

glassfishrobot commented 18 years ago

@glassfishrobot Commented @edburns said: I am able to reproduce this with the jsf-simple-events example:

[#|2006-10-13T12:57:41.603-0400|SEVERE|sun-appserver-pe9.0|javax.enterprise.system.container.web|_ThreadID=14;_ThreadName=httpWorkerThread-8080-0;_RequestID=85967628-17c5-437d-849f-27c9afab0fff;|StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception java.lang.NullPointerException at com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.execute(PartialTraversalLifecycle.java:82) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244) at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)

glassfishrobot commented 18 years ago

@glassfishrobot Commented @edburns said: I have commited a small fix but I'm not convinced it will fix your problem.

I have uploaded a new release of DynaFaces. Please try it out and re-open this bug if necessary.

Ana, can you also try it on your project?

Thanks.

glassfishrobot commented 18 years ago

@glassfishrobot Commented danl said: The NullPointerException is gone, but I'm still getting the IOException below. Thus, I'm still not able to use fireAjaxTransaction with App Server 9.0.01 build 12 and JSF 1.2.02.

javax.faces.FacesException: java.io.IOException: Not in GZIP format at com.sun.faces.renderkit.ResponseStateManagerImpl.getTreeStructureToRestore(ResponseStateManagerImpl.java:180) at com.sun.faces.application.StateManagerImpl.restoreTree(StateManagerImpl.java:577) at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:88) at javax.faces.application.StateManagerWrapper.restoreView(StateManagerWrapper.java:167) at com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:312) at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:173) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:113) at com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.execute(PartialTraversalLifecycle.java:79) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244) at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184) at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:203) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566) at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239) at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667) at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574) at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844) at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287) at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212) at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252) at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75) Caused by: java.io.IOException: Not in GZIP format at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:132) at java.util.zip.GZIPInputStream.(GZIPInputStream.java:58) at java.util.zip.GZIPInputStream.(GZIPInputStream.java:68) at com.sun.faces.renderkit.ResponseStateManagerImpl.getTreeStructureToRestore(ResponseStateManagerImpl.java:159) ... 38 more

glassfishrobot commented 18 years ago

@glassfishrobot Commented @edburns said: What JSF Version string do you see in the appserver log when you start JSF?

I want to make sure we have the same version for testing.

glassfishrobot commented 18 years ago

@glassfishrobot Commented @edburns said: Ok, is there any chance you could switch this to server side state saving until I get this fixed?

Ed

glassfishrobot commented 18 years ago

@glassfishrobot Commented @edburns said: The problem is that prototype is escaping some things in the view state that it should not be escaping.

glassfishrobot commented 18 years ago

@glassfishrobot Commented @edburns said: Hello Dan,

This turned out to be a simple bug.

Sorry for the lag in fixing it. I've been busy!

Anyhow, I've just checked in a fix. Here is the changelog.

M run-time/samples/cardemo/src/main/webapp/WEB-INF/web.xml

M run-time/avatar/src/main/java/com/sun/faces/extensions/avatar/lifecycle/AsyncResponse.java

Ed

glassfishrobot commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA JSF_EXTENSIONS-12

glassfishrobot commented 18 years ago

@glassfishrobot Commented Marked as fixed on Wednesday, October 18th 2006, 2:15:34 pm