Just to clarify: "jsf-api.jar" and "jsf-impl.jar" are the Sun implementation of JSF. You must EITHER use these (the Sun RI implementation) OR the "myfaces-api.jar"/"myfaces-impl.jar" pair.

Mixing the Sun and MyFaces jars does not work.

J2EE appservers typically bundle one or the other implementation in their "shared" dirs which can cause problems. If you're using an appserver that bundles the Sun implementation then either:
(a) remove the sun jars and replace with the myfaces ones instead, or
(b) set "child first" classloading then put the myfaces jars into your webapp so that they override the "shared" ones for that particular webapp.

Option (a) is the least error-prone...

And as Mike says the web.xml config stuff needs to refer to the right implementation...

Regards,

Simon


Mike Kienenberger wrote:
Remove the web.xml listener line pointing to the Sun JSF RI.

It probably looks something like this:

<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>

If there's no "<listener-class>com.sun.faces..." line in your web.xml
file, that means you've somewhere got the JSF RI jar files in your
classpath and it's picking up the listener entry from the jar file
tld's listener configuration.


On 4/24/07, Bailey Peng <[EMAIL PROTECTED]> wrote:

Hi all,

I'm new to JSF and would like a few pointers to get started. After
downloading the examples, I saw no reference to jsf-api.jar and jsf-impl.jar
in WEB-INF/lib, which is what the myfaces website tutorial suggests.
However, I'm unable to use myfaces-api-1.1.5.jar and myfaces-impl-1.1.5.jar
in my web application without jsf-api.jar and jsf-impl.jar. I'm currently
using Eclipse with Tomcat 5.5.x integrated into the development environment. When jsf-api.jar and jsf-impl.jar are not in my WEB-INF/lib, starting Tomcat
would get me this error:

pr 24, 2007 7:23:27 PM
org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class
com.sun.faces.config.ConfigureListener
java.lang.ClassNotFoundException:
com.sun.faces.config.ConfigureListener
    at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1355)
    at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1201) With both of them in WEB-INF/lib, I don't get any problems. What do I need
to do to make this work solely with myfaces libraries?

Bailey

Reply via email to