JSF 2.0 and Websphere Application Server 7 bug report
Following my last post, I investigated the bug mentionned in http://forums.java.net/jive/thread.jspa?threadID=75112&tstart=0
I was going to submit the bug and a fix, but couldn't find the place to do that (http://bugreport.sun.com/bugreport/submit_intro.do is limited to JSF 1.1). So here it is.
The bug comes from the library not being found while using the IBM JVM version bundled with WAS 7 (mandatory). This JVM doesn't behave exactly like others. In that case a call to ClassLoader.getResource(resource) while looking for a library, i.e. a directory, fails because of not including the trailing slash '/', returning null.
To fix that, I've created and tested successfully the following patch to com.sun.faces.application.resource.ClasspathResourceHelper:
< basePath = getBaseResourcePath() + '/' + libraryName;
> basePath = getBaseResourcePath() + '/' + libraryName + '/';
< + libraryName;
> + libraryName + '/';
All it does is adding the missing trailing slash for the library.
This corrects the bug appearing with jsf.js and the one I mentionned with missing components, i.e. the false JSF1064 error.
The tests i ran didn't show any other problem with this patch on Glassfish, while correcting the problems on WAS 7.
I really hope this can go in mojarra 2.0.3, as this bug is critical to our business.