-
1. Re: Upgrading from JSF 2.1.29 to 2.2.8 causes JavaScript and CSS files to not load
michpetrov Sep 16, 2014 5:03 AM (in response to thinkdev)Hi,
can you try running it with Mojarra 2.2.6? That one is supported so if it still doesn't work the issue might be in your app. The resource servlet registers itself automatically, so you don't need to have it in web.xml.
-
2. Re: Upgrading from JSF 2.1.29 to 2.2.8 causes JavaScript and CSS files to not load
thinkdev Sep 16, 2014 2:43 PM (in response to michpetrov)Using 2.2.6 does not seem to have resolved anything.
I do have a servlet filter and a few other things hooked into JSF (phase listeners and so on), so I have to debug those I imagine. It is really bizarre to me, though, to see CSS and JavaScript file names be rendered as "RESOURCE_NOT_FOUND" when I would have thought that these things would be hardcoded or something. I will have to download the source for all of these things as well, but at least IntelliJ makes that easy.
Edit: Temporarily commented out my filter and faces components, but the problem still happens. I have to investigate the rest of my configuration at this point.
-
3. Re: Upgrading from JSF 2.1.29 to 2.2.8 causes JavaScript and CSS files to not load
thinkdev Sep 16, 2014 6:48 PM (in response to thinkdev)Yeah, I removed all of the phase listeners, session listeners, configuration parameters (like the skin and everything) and I am trying to run it with as minimal of a set of configuration as possible and I still get the RESOURCE_NOT_FOUND in the references to the CSS and JavaScript files. I might just try to stand up a completely new/plain web application with the bare necessities to see if the problem happens there. I also was unable to track down who would be rendering the <head> tag where the links to CSS/JS files are. I found the resource files that contain some of the paths, but I could not track it down any further.
Edit: All right, so richfaces-core-4.5.0.Beta2-sources.jar!\org\richfaces\resource\mapping\ResourceServletMapping.java line 84 is where the string literal lives. context.getApplication().getResourceHandler().createResource(resourceKey.getResourceName(), resourceKey.getLibraryName()) return null. Will be diving into that call to figure out why it is doing this. To be clear, getResourceName() and getLibraryName() both return what look like valid values.
-
4. Re: Upgrading from JSF 2.1.29 to 2.2.8 causes JavaScript and CSS files to not load
thinkdev Sep 16, 2014 7:42 PM (in response to thinkdev)I traced the code down as much as I possibly could. RF4.5 is using the JSF resources stuff, but it seems like JSF is not returning any resources at all used by RF. I'm not sure which side is at fault, but the full library name and resource name is provided. I saw it go through several different loaders to try and find the resource. I think at this point I have to revert back to JSF 2.1 and deal with the consequences of that.
-
5. Re: Upgrading from JSF 2.1.29 to 2.2.8 causes JavaScript and CSS files to not load
ppitonak Sep 17, 2014 3:40 AM (in response to thinkdev)Hi, were you able to reproduce with a minimal application? It works fine for me with Mojarra 2.2.6. I have same web.xml configuration as you do.
Pavol
-
6. Re: Upgrading from JSF 2.1.29 to 2.2.8 causes JavaScript and CSS files to not load
thinkdev Sep 17, 2014 1:14 PM (in response to ppitonak)I have not had a chance to do that yet. I had to revert my project back to 2.1.29 for the time being. I might not have time to try that for a little bit, but I hope I can.