Skip to main content

JSF 2.0 and Websphere Application Server 7 bug report

7 replies [Last post]
coupelon
Offline
Joined: 2007-11-26
Points: 0

Hello,

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:

135c135
< basePath = getBaseResourcePath() + '/' + libraryName;
---
> basePath = getBaseResourcePath() + '/' + libraryName + '/';
141c141
< + 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.

Olivier COUPELON

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
rdean400
Offline
Joined: 2010-01-23
Points: 0

It worked for me as well.

Any idea on timeline for FCS?

rdean400
Offline
Joined: 2010-01-23
Points: 0

IBM just published an APAR that looks like this issue:

http://www-01.ibm.com/support/docview.wss?uid=swg1PM03656&myns=swgws&myn...

Fix is due in the 7.0.0.11 fixpack. Based on current patterns, that would be July/August. Hopefully it'll be available in ifix form, also.

Jason Lee

I just committed this change. Please test again with the nightlies and
verify that your issue has been resolved.

Thanks, again, for the investigation work. :)

On 3/1/10 10:51 AM, webtier@javadesktop.org wrote:
> Hello,
>
> 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:
>
> 135c135
> < basePath = getBaseResourcePath() + '/' + libraryName;
> ---
>
>> basePath = getBaseResourcePath() + '/' + libraryName + '/';
>>
> 141c141
> < + 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.
>
> Olivier COUPELON
> [Message sent by forum member 'coupelon' (olivier.coupelon@wanadoo.fr)]
>
> http://forums.java.net/jive/thread.jspa?messageID=389446
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: webtier-help@glassfish.dev.java.net
>
>

--
Jason Lee
Senior Member of Technical Staff
GlassFish Administration Console

Oracle Corporation
Phone x31197/+1 405-343-1964
Email jasondlee@sun.com
Blog http://blogs.steeplesoft.com

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net

coupelon
Offline
Joined: 2007-11-26
Points: 0

Ok this is working flawlessly now with the projects we have here, thanks for your fast support !

Ryan Lubke

On 3/1/10 8:51 AM, webtier@javadesktop.org wrote:
> Hello,
>
> 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.
>
Thanks for the report. For future reference, you can log issues here [1].

[1] https://javaserverfaces.dev.java.net
> 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:
>
> 135c135
> < basePath = getBaseResourcePath() + '/' + libraryName;
> ---
>
>> basePath = getBaseResourcePath() + '/' + libraryName + '/';
>>
> 141c141
> < + 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.
>
> Olivier COUPELON
> [Message sent by forum member 'coupelon' (olivier.coupelon@wanadoo.fr)]
>
> http://forums.java.net/jive/thread.jspa?messageID=389446
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: webtier-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net

Jason Lee

On 3/1/10 10:51 AM, webtier@javadesktop.org wrote:
> I really hope this can go in mojarra 2.0.3, as this bug is critical to
> our business.
Thanks for the grunt work, Olivier. I'll talk to Ed and Ryan about this
this morning. I don't see why we couldn't get that in. I'll get back
to you on it.

--
Jason Lee
Senior Member of Technical Staff
GlassFish Administration Console

Oracle Corporation
Phone x31197/+1 405-343-1964
Email jasondlee@sun.com
Blog http://blogs.steeplesoft.com

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net

Jason Lee

On 3/1/10 10:58 AM, Jason Lee wrote:
> On 3/1/10 10:51 AM, webtier@javadesktop.org wrote:
>> I really hope this can go in mojarra 2.0.3, as this bug is critical
>> to our business.
> Thanks for the grunt work, Olivier. I'll talk to Ed and Ryan about
> this this morning. I don't see why we couldn't get that in. I'll get
> back to you on it.
>
FYI: https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1571

--
Jason Lee
Senior Member of Technical Staff
GlassFish Administration Console

Oracle Corporation
Phone x31197/+1 405-343-1964
Email jasondlee@sun.com
Blog http://blogs.steeplesoft.com

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net