Thanks Simon for your response and sorry for my bad one (now o don't
know if use bottom or top...)
If I understood well, I don't have any problem because the JSF
implementation used by WAS does not define any faces-config.xml and
META-INF/services/.... (I'm using MyFaces and Tomahawk 1.1.5). 

So, is normal that I found the log "Both MyFaces and the RI are on your
classpath" because  org.apache.myfaces.shared_impl.config.MyfacesConfig
check existence of Sun implementation but I don't understand why is
logging an error message.

In the response you talk about
org.apache.myfaces.config.FacesConfigurator class but the lo is of
org.apache.myfaces.shared_impl.config.MyfacesConfig.

Can you help me to relax? :)  At the moment my application is working
without problems.....what can I do for check existence of any kind of
future problems?

Thanks in advance
Mario 






-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 20 maggio 2008 16.51
To: MyFaces Discussion
Subject: Re: [Tomahawk] - Both MyFaces and the RI are on your classpath

First, please read this:
  http://www.nabble.com/How-to-reply-to-emails-t3182877.html

Now re your question:

Hmm..maybe I spoke a little too soon.

The problem is that when any JSF implementation starts up, it has to
scan the classpath for various configuration files and process them.
Processing the configuration files embedded within two different JSF
implementations would be very bad. This is what I was thinking of when I
said that two implementations in the classpath is really bad.

But I see in method
org.apache.myfaces.config.FacesConfigurator.feedStandardConfig that it
just takes the first config file named "standard-faces-config.xml" that
it finds, and doesn't look any further. So as long as the classloader
policy is set right, *that particular config file* should not be a
problem.

It *will* find any "faces-config.xml" files that are anywhere in the
classpath, and process them all. But hopefully there aren't any of those
in the Sun RI (mojarra) implementation. MyFaces Core certainly doesn't
have one, just a standard-faces-config.xml.

You don't say which version of myfaces core you are using. In the case
of 1.1.x, the startup procedure does try to look up
  META-INF/services/javax.faces.application.ApplicationFactory
  META-INF/services/javax.faces.context.FacesContextFactory
  META-INF/services/javax.faces.lifecycle.LifecycleFactory
  META-INF/services/javax.faces.render.RenderKitFactory
which myfaces does not define [1] So if the sun implementation in the
"higher" classloader did define any of these, then things would get
really screwed up. There are a number of other possible dangers here.

So in short, I'm not *certain* now that things would go wrong. But it
would certainly make me nervous having a second JSF implementation still
visible in the classpath if this were my production environment...

[1] Possibly Myfaces should check whether any resource it looks up comes
from a classloader which is not the same as the classloader that the
standard-faces-config.xml comes from, and if so then ignore it. That
would solve this particular problem. But that isn't the case for the
current code (at least as far as I can see).

Regards,
Simon



[EMAIL PROTECTED] schrieb:
> Sorry Simon, but your response terrifies me!
> You are talking about of serious problem but on the WIKI there is a
> paragraph (http://wiki.apache.org/myfaces/Websphere_Installation)
> describing that the deploy on WAS can be done altering classloader
> policy. 
>
> What king of problems you are talking about? At the moment my web
> application is working well....is just lucky?
>
> Thank
> Mario 
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: 20 maggio 2008 15.59
> To: MyFaces Discussion
> Subject: Re: [Tomahawk] - Both MyFaces and the RI are on your
classpath
>
> [EMAIL PROTECTED] schrieb:
>   
>> Hi,
>> I'm using Tomahawk 1.1.6 on WebSphere 6.1 and does work correctly.
But
>> on the log I found:
>> "Both MyFaces and the RI are on your classpath. Please make sure to
>>     
> use
>   
>> only one of the two JSF-implementations."
>> I know that WAS has a JSF 1.1 implementation (Sun implementation) and
>>     
> my
>   
>> application classloader policy is PARENT-LAST. The question is:
>> The log has an "ERROR" severity, so can this cause some problem?
>>   
>>     
>
> Having both on the classpath *is* a serious problem. You do need to
> resolve this.
>
> Setting the classloader policy cannot solve this problem; that can
> change which is *first*, but cannot make one of them invisible. So you
> will need to either remove the websphere implementation, or overwrite
it
> with the myfaces one, or use some websphere-specific feature (if one
> exists) to make the "built-in" lib invisible.
>
> There is some information on the wiki about configuring various
> containers. The wiki can be found here:
>   http://wiki.apache.org/myfaces/
>
> Regards,
> Simon
>
>
>
>
> This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information.  If you have
received it in error, please notify the sender immediately and delete
the original.  Any other use of the email by you is prohibited.
>
>   




This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information.  If you have received it in 
error, please notify the sender immediately and delete the original.  Any other 
use of the email by you is prohibited.

Reply via email to