Thanks for bothering.

 I have found a solution that suits me.

 In sun-web.xml, adds a   <class-loader delegate="false"/> so that it loads 
MyFaces classes first.

 I see that MyFaces try to load com.sun.faces.config.ConfigureListener, so I 
created a dummy com.sun.faces.config.ConfigureListener in my webapp that gets 
loaded first and does not.
And then it worked !

I don't know if it's legal to write my own com.sun.... classes, but for now it 
worked and that's all that matters to me.

  Gérard COLLIN


On Friday 12 August 2005 15:02, Martin Marinschek wrote:
> That's really a class loading issue then, what kind of configuration
> file get's loaded first.
>
> all down under is AFAIK (correct me if I'm wrong):
>
> It boils down to the fact that the API is implemented both by MyFaces
> and the Sun RI - now the implementation is somewhat 'used' by the API,
> and the API finds the files of the Sun implementation first and uses
> them.
>
> A horrible mess, and you won't be able to get around that.
>
> Your choices:
>
> 1) get rid of the Sun RI jars, as you tried
> 2) use the Sun RI with the MyFaces tomahawk.jar file as to use only
> the extensions
> 3) use another APP Server
>
> you won't like either of them ;)
>
> regards,
>
> Martin
>
> On 8/12/05, Gérard COLLIN <[EMAIL PROTECTED]> wrote:
> > Thanks for your answer.
> >
> >  In fact, SunOne 8.1 comes with jsf-ri jars bundled directly in the
> > system classpath of the app server.
> >  If I remove them, all works fine, but I can't do a modification that
> > will affect all web apps installed in this server.
> >
> >  Is there another solution ?
> >  It seems myfaces try to load the listener from the jsf-ri jars, no ?
> >
> >  Gérard COLLIN
> >
> > On Friday 12 August 2005 14:18, Martin Marinschek wrote:
> > > Oh, oh,
> > >
> > > you got some sun remaints somewhere in your path - try to get rid of
> > > anything reminding of sun, jars, tlds, etc. from every part of your
> > > web-application.
> > >
> > > regards,
> > >
> > > Martin
> > >
> > > On 8/12/05, Gérard COLLIN <[EMAIL PROTECTED]> wrote:
> > > > When trying to run a MyFaces application into SunOne, I get the
> > > > following exception.
> > > >
> > > >  Any help ? Why does it try to load
> > > > com.sun.faces.lifecycle.LifeCycleFactoryImpl ?
> > > >
> > > >  Gérard COLLIN
> > > >
> > > > [#|2005-08-12T09:34:17.010+0200|WARNING|sun-appserver-pe8.1_02|
> > > > javax.enterprise.system.stream.err|_ThreadID=10;|
> > > > javax.faces.FacesException:
> > > > com.sun.faces.lifecycle.LifecycleFactoryImpl at
> > > > javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java
> > > >:553 ) at
> > > > javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.jav
> > > >a:41 1) at
> > > > javax.faces.FactoryFinder.getFactory(FactoryFinder.java:229) at
> > > > com.sun.faces.config.ConfigureListener.configure(ConfigureListener.ja
> > > >va:7 02) at
> > > > com.sun.faces.config.ConfigureListener.configure(ConfigureListener.ja
> > > >va:3 98) at
> > > > com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureLi
> > > >sten er.java:328) at
> > > > org.apache.catalina.core.StandardContext.listenerStart(StandardContex
> > > >t.ja va:4010) at
> > > > org.apache.catalina.core.StandardContext.start(StandardContext.java:4
> > > >522) at com.sun.enterprise.web.WebModule.start(WebModule.java:241) at
> > > > org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1086)
> > > > at org.apache.catalina.core.StandardHost.start(StandardHost.java:833)
> > > > at
> > > > org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1086)
> > > > at
> > > > org.apache.catalina.core.StandardEngine.start(StandardEngine.java:483
> > > >) at org.apache.catalina.startup.Embedded.start(Embedded.java:894) at
> > > > com.sun.enterprise.web.WebContainer.start(WebContainer.java:707) at
> > > > com.sun.enterprise.web.PEWebContainer.startInstance(PEWebContainer.ja
> > > >va:5 07) at
> > > > com.sun.enterprise.web.PEWebContainerLifecycle.onStartup(PEWebContain
> > > >erLi fecycle.java:54) at
> > > > com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServ
> > > >er.j ava:300) at com.sun.enterprise.server.PEMain.run(PEMain.java:294)
> > > > at com.sun.enterprise.server.PEMain.main(PEMain.java:220) Caused by:
> > > > java.lang.ClassCastException
> > > >         at
> > > > com.sun.faces.lifecycle.RestoreViewPhase.<init>(RestoreViewPhase.java
> > > >:69) at
> > > > com.sun.faces.lifecycle.LifecycleImpl.<init>(LifecycleImpl.java:53)
> > > > at
> > > > com.sun.faces.lifecycle.LifecycleFactoryImpl.<init>(LifecycleFactoryI
> > > >mpl. java:69) at
> > > > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> > > > at
> > > > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
> > > >orAc cessorImpl.java:39) at
> > > > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
> > > >onst ructorAccessorImpl.java:27) at
> > > > java.lang.reflect.Constructor.newInstance(Constructor.java:274) at
> > > > java.lang.Class.newInstance0(Class.java:308)
> > > >         at java.lang.Class.newInstance(Class.java:261)
> > > >         at
> > > > javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java
> > > >:551 ) ... 19 more
> > > >
> > > > |#]

Reply via email to