Skip to main content

WEB-INF/lib/jsf_impl.jar ignored by Sun Application Server 9.1_02

4 replies [Last post]
robsta10
Offline
Joined: 2008-02-27
Points: 0

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?

Thanks in advance,
R

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
robsta10
Offline
Joined: 2008-02-27
Points: 0

Hello!

Thanks for your replies so far.

> On 01/21/10 03:16 AM, webtier@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:
>
>
> n summary, your sun-web.xml should look like this:
>
>
>
>
>

>

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@joanneum.at)]
> >
> >
> http://forums.java.net/jive/thread.jspa?messageID=3821
> 23
> >
> >
> ------------------------------------------------------
> ---------------
> > 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

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

Jan Luehe

On 01/21/10 03:16 AM, webtier@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:

In summary, your sun-web.xml should look like this:


Jan

> Thanks in advance,
> R
> [Message sent by forum member 'robsta10' (robert.moestl@joanneum.at)]
>
> http://forums.java.net/jive/thread.jspa?messageID=382123
>
> ---------------------------------------------------------------------
> 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

Jim Driscoll

Dumb question, but...

Could you also say:


?

Jim

On 1/21/10 9:46 AM, Jan Luehe wrote:
>
>
>
>

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

Jan Luehe

On 01/21/10 10:01 AM, Jim Driscoll wrote:
> Dumb question, but...
>

Not at all!

> Could you also say:
>
>
>
>
>

Yes, "useMyFaces" and "useBundledJsf" are used synonymously,
but support for the latter was only added in more recent releases
(as in v2.1.1 and v3).

Jan

>
> ?
>
> Jim
>
> On 1/21/10 9:46 AM, Jan Luehe wrote:
>>
>>
>>
>>

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