• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.lang.NoClassDefFoundError: javax/faces/FactoryFinder

 
J Miller
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to set up a new project to play around with at home but, for some reason, can't get it up and running. I'm using:

  • Eclipse J2EE Indigo
  • JSF 1.2
  • Richfaces 3.3.3
  • Tomcat v6.0


  • Here's the list of JAR's that I have brought into my lib folder.
  • commons-beanutils-1.7.0.jar
  • commons-collections-3.2.1.jar
  • commons-digester-1.8.jar
  • commons-logging.jar
  • jhighlight-1.0.jar
  • richfaces-api-3.3.3.Final.jar
  • richfaces-impl-3.3.3.Final.jar
  • richfaces-ui-3.3.3.Final.jar



  • When I start up my server, this is what I'm getting:



    I've done some searching around on the web, and can't find a solution. I've also tried deleting my project and creating a new one, no luck. Anyone have any ideas?
     
    J Miller
    Ranch Hand
    Posts: 80
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Ok, so just in case anybody else comes across this, I had to add:

  • jsf-api.jar
  • jsf-impl.jar


  • Once those jars were added to the project, error went away.
     
    Tim Holloway
    Saloon Keeper
    Pie
    Posts: 18098
    50
    Android Eclipse IDE Linux
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    The reason that you had to do that is because Tomcat does not implement the full JEE spec. You would not include the JSF jars if you were running JBoss AS 5, for example even though it uses an embedded Tomcat. That's because JBoss is a full-stack JEE server and has its own JSF implementation classes built in, unlike stand-alone Tomcat.
     
    J Miller
    Ranch Hand
    Posts: 80
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Ok, good to know. It's harder to find good information about getting a JSF project set up from the ground up, and almost impossible to find info on what to do if things go awry.
     
    Tim Holloway
    Saloon Keeper
    Pie
    Posts: 18098
    50
    Android Eclipse IDE Linux
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    One of the best ways to get up and running quickly is to use a Maven archetype to generate the project. That will at least ensure that the basics are all there and in the right place. Maven can also generate the support files for some of the better-known IDEs while it's at it.

    As the JSF standard firms up, we will gradually see the extra kinks that come from different server flavors and versions fade away and it can happen none too soon, as far as I am concerned.

    Of course even then we have the issues that while JSF is designed to make things as simple as possible, the simplicity only works if one has a solid grounding in the basics of JSF - especially the JSF lifecycle and don't get trapped by outdated documentation pulled from the Internet. Too many people over-complicate their JSF code because they either don't understand basic HTTP request/response and the JSF lifecycle, don't realize that the more JSF-specific the code is, the more likely it's not done well, or because they (presumably) don't think that things could be that easy.
     
    William P O'Sullivan
    Ranch Hand
    Posts: 859
    Chrome IBM DB2 Java
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    The JSF jars are needed to implement core JSF functionality.

    "faces" enhances JSF (rich, ice.. etc.)

    WP
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic