jsfwebspheremyfaces

JSF App: Second server request not submitted to server after upgrade from WAS 8.5 to 9.0


Caveat: I haven't used JSF since college, and that was longer ago than I care to admit, so pretend I'm brand new with the technology.

Background: We are upgrading from Java 1.7 and WAS 8.5 with My Faces 2.2.4. We are upgrading to Java 1.8 and WAS 9.0.

MF version is staying the same, and we're using the same library files that are found on 8.5. We are using a Shared Library for the files, as recommended by IBM.

Everything works fine under WAS 8.5. The application works as expected on my local machine, and all functionality seems good.

When running under the upgraded server the JSF application exhibits some unusual behavior.

When clicking any button that results in a server call, the first time the button is clicked, everything works fine. After that, every button you click, regardless of its actual function, no matter if it's an action, or action listener, performs the same function with the same server response as the first button click.

Even if you change the criteria from the server call, the response from the server remains the same. I did validate that the updated criteria makes it into the request by looking at the request and response objects, but no matter what I click (even if it calls a completely different server side function), the response is the same and the screen state resets itself to match the moment the first button click was made. Meaning all fields on the screen are reset to contain the data that was in them at the time of that click, even if that data has been updated.

I'm absolutely flummoxed. I've been trying to research this issue, but frankly, I don't even know what questions to ask.

Update: We've done some additional testing, and determined the second request isn't actually hitting the server at all (we don't see the added debug lines after the first attempt). So what we're seeing isn't so much a second postback as it is the first one being repeated.

Additionally, we're seeing the same behavior in multiple browsers.


Solution

  • Posting our findings for posterity.

    It turns out this was a compatibility issue with the version of PrimeFaces we were using (3.3.1). We upgraded Primefaces to 5.3 (still a really old version) and functionality returned as expected, with the exception of command links not working at all (I expect a coding issue brought on by the upgrade). However, the problem of all buttons doing the same thing, and returning the same results over and over again has been corrected. We're seeing our debug logs from the server being actively generated which a step forward.

    For the record, I would always recommend using the newest version of Primefaces (or any component) you can, as there could be vulnerabilities in older versions (as pointed out in the comments).