My client is having an issue after upgrading from CWA 1.5 to CWA 2011 running on WebSphere. The issue is that any binary resources requested return a 404. When the request is resubmitted (i.e. the page is refreshed/reloaded), then they load.
I have no access to their environment and have to get all the config files via third party. I was wondering if anyone has any ideas off the top of their heads on what could be causing these 404s on binaries?
Starting with Websphere 6.1, IBM changed the behavior of filters and these will not be executed if the URL you're calling doesn't actually exist on the server.
This means that a request for /somefile.png that is still on the DB will result in a (technically correct) 404 but completely not what you expect with a CWA enabled web application.
The solution is to make the filter invoke on a request without a servlet mapping and you should be able to do the following in the WebSphere Admin Console:
It is a long time since I have used CWA, but IIRC it serializes the binaries to disk on request, and caches them for future requests. It sounds like that process is just taking too long, so you get a 404 the first request for a binary. I have heard of this before on WebSphere, are you sure it was not happening with the old CWA also?
If the issue continues, I suggest contacting SDL Customer Support.
In the cd_cwa_conf.xml file, you can also add the following parameter:
<configuration>
...
<!-- Number of seconds to wait for the default Servlet to pick up changes on the file-system -->
<file-synchronization delay="..." />
...
</configuration>
As Chris has said, the first time a binary is requested then the file is serialized and cached on the disk. If the process is too long then the app server will return a 404.
With this parameter, the system will wait for few seconds (ie the specified value) before accessing the file.
We had the same issue with a Tomcat server and this has fixed the pb.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With