webtier@glassfish.java.net

Re: [webtier] WEB-INF/lib/jsf_impl.jar ignored by Sun Application Server 9.1_02

From: <webtier_at_javadesktop.org>
Date: Fri, 22 Jan 2010 00:57:52 PST

Hello!

Thanks for your replies so far.

> On 01/21/10 03:16 AM, webtier_at_javadesktop.org wrote:
> > Hello everybody!
> >
> > I have a problem using Mojarra 1.2_13-b01-FCS on
> Sun Java System Application Server 9.1_02 (which is
> included in Java EE 5 SDK Update 6). I already
> created the necessary sun-web.xml with 'useMyFaces'
> parameter set to true and added jsf_api.jar and
> jsf_impl.jar to WEB-INF/lib.
> > But the application server log entry "Initializing
> Sun's JavaServer Faces implementation
> (1.2_04-b20-p03) for context '/foo'" indicates that
> JSF 1.2_04 is still loaded for my application. BUT
> WEB-INF/lib/jsf_impl.jar (which is 1.2_13) seems to
> be loaded in some way because calls to the JSF API
> apply to bug fixes introduced with 1.2_13. By the way
> when setting useMyFaces to false in sun-web.xml those
> API calls do not conform to bug fixes done in 1.2_13.
> Thus I conclude that useMyFaces=true causes that
> 1.2_13 is loaded for some parts of the application
> although the log still indicates that 1.2_04 is
> loaded. However the application does not work with
> this configuration. The only way I managed to run the
> application was to delete jsf_impl.jar from the
> server's lib directory. Doing that also the log
> indicates that 1.2_13 is loaded for my application.
> >
> > It seems that Sun Java System Application Server
> 9.1_02 always uses the jsf-impl.jar in its lib
> directory. Is there a way to change this behavior
> despite of deleteing the the jar in the lib
> directory?
> >
>
> In addition to setting "useMyFaces" to true, you also
> need to disable
> classloader delegation, by adding this line to your
> sun-web.xml:
>
> <class-loader delegate="false"/>
> n summary, your sun-web.xml should look like this:
>
> <sun-web-app>
> <class-loader delegate="false"/>
> <property name="useMyFaces" value="true"/>
> </sun-web-app>
>

This is exactly how my sun-web.xml looks like. The described behavior I tried to explain in my initial post is based on this sun-web.xml.

>
> Jan
>
> > Thanks in advance,
> > R
> > [Message sent by forum member 'robsta10'
> (robert.moestl_at_joanneum.at)]
> >
> >
> http://forums.java.net/jive/thread.jspa?messageID=3821
> 23
> >
> >
> ------------------------------------------------------
> ---------------
> > To unsubscribe, e-mail:
> webtier-unsubscribe_at_glassfish.dev.java.net
> > For additional commands, e-mail:
> webtier-help_at_glassfish.dev.java.net
> >
> >
>
>
> ------------------------------------------------------
> ---------------
> To unsubscribe, e-mail:
> webtier-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail:
> webtier-help_at_glassfish.dev.java.net


Yesterday I tried out Glassfish V2.1.1, which is bundled in Java EE 5 SDK Update 8. Glassfish V2.1.1 includes Mojarra 1.2_13. Then I substituted the 1.2_13 jars with 1.2_12 jars in WEB-INF/lib just for the heck of it. When deploying the app the log still said that 1.2_13 was loaded. Although 1.2_12 was also loaded. I know this because UISelectBoolean#getSubmittedValue() returns a String in 1.2_12 while in 1.2_13 it returns a Boolean. I guess this is related to bug fix https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=904.
Could it be that for some packages Glassfish uses another classloader which relies on GF_HOME/libs/jsf-impl.jar? If the answer is yes, is there a way to tell Glassfish to only use the applications's JSF implementation?

Kind Regards,
R
[Message sent by forum member 'robsta10' (robert.moestl_at_joanneum.at)]

http://forums.java.net/jive/thread.jspa?messageID=382326