aspose file tools*
The moose likes JSF and the fly likes Start-up errors in JSF project Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Start-up errors in JSF project" Watch "Start-up errors in JSF project" New topic
Author

Start-up errors in JSF project

Russell Bateman
Ranch Hand

Joined: Feb 26, 2008
Posts: 69
I've been plagued with start-up errors despite over a week of Googling, resetting up servers (Tomcat) in Eclipse, libraries, build paths, refreshing, bouncing Eclipse, closing irrelevant projects, etc., etc., etc. Just one or more small, stupid things I haven't figured out? While I'm doing this in Eclipse, I don't think it's necessarily Eclipse-related (although it might be).

I'm hoping that what's coming out in red in this short illustration will clue an experienced on-looker into a terse, but very informative answer.

I am grateful for any help here.

Russ Bateman
Davie Lin
Ranch Hand

Joined: Aug 05, 2007
Posts: 294
I saw "ClassNotFoundException"

you're missing a certain Jar file
Max Katz
Ranch Hand

Joined: Aug 03, 2009
Posts: 72
Here is a template project to start with JSF (it also includes RichFaces): http://mkblog.exadel.com/ria/richfaces-ria/the-easiest-way-to-start-with-richfaces/
Russell Bateman
Ranch Hand

Joined: Feb 26, 2008
Posts: 69
(Max: Thanks, I wasn't going to walk the RichFaces path, but I will soon especially if it leads me to success, meanwhile...)

Davie,

Yeah, everything I can see encourages me to believe that this class isn't missing from my project since it resides in myfaces-impl-1.2.8.jar which, along with myfaces-api-1.2.8.jar and several commons- JARs is there and is also checked in Java EE Module Dependencies. And, of course, Eclipse put a reference to it in the autogenerated web.xml when I created the project (at the bottom of this file).



So, I do have the JAR that contains this class in my project. Why isn't this helping?

Russ
Max Katz
Ranch Hand

Joined: Aug 03, 2009
Posts: 72
You can easily take out RichFaces and just have a plain JSF project.
Russell Bateman
Ranch Hand

Joined: Feb 26, 2008
Posts: 69
I did the RichFaces thing, which worked, of course. However, my real goal is to understand at the deepest level in order always to be able to sort out such issues. And I've had a myriad of them besides this one.

Tutorials gloss over what you really have to have to do JSF (and a lot of other things in our industry). In this case, no one lists all the JARs (the closest one to doing that was The Definitive Guide to Apache MyFaces and Facelets--on Google Books), or says where and how to lay them down in the project (my own experimentation), which ones promote which symbol and which dependencies will product which error (trial and error, baby), etc. I am in the business of developing software, but I also have a hobby of dropping bread crumbs for poor, frustrated schmucks like myself to follow. A lot of this stuff is much harder than it should be (or I'm stupid, but, hehehe, I already know that). Hence my very low-level tutorials.

Thanks, guys. You gave me a piece of the puzzle and following up on your answers (and the preceding week of mystification) led me to the answer, I think. There will be a tutorial posted on my webpage soon. Maybe I can give a little bigger piece of the puzzle to the next person to Google this thread.

JavaRanch rocks!

Best,

Russ
Russell Bateman
Ranch Hand

Joined: Feb 26, 2008
Posts: 69
In the end, there's no hard solution and I don't know if this is Tomcat's or Eclipse's fault (or somehow mine). I have had to:

1) Stop and restart the server (usually doesn't work)
2) Bounce Eclipse (usually doesn't help)
3) Bounce Eclipse with -clean option (sometimes helps)
4) Delete the server in the Server view (pane) and from the Project Explorer view (pane) including subdirectories, then re-create a Tomcat 6.0 server (usually works)
5) Both #3 and #4 (almost always works)

Once it works at all, it usually keeps on working for the duration of my productive morning or afternoon, though not always. However, when I come in in the morning or go home at night (I use this both at work and at home), I almost always have to perform this work-around.

This is sad, but as we're dealing with 5+ year-old technology no one uses anymore but me, it's no big deal.

Onward and upward...

Russ
Max Katz
Ranch Hand

Joined: Aug 03, 2009
Posts: 72
I use Eclipse with WTP and JBoss Tools all the time. Although once in a while the deployment stops working (most likely Eclipse stops pushing the changes), I would say that 97% of time everything works as expected.

Max
http://mkblog.exadel.com
Russell Bateman
Ranch Hand

Joined: Feb 26, 2008
Posts: 69
Yes, I more or less meant that JBoss Seam, Spring, etc. have replaced mere JSF and Tomcat. I could skip ahead to full modernity myself except that

1) I haven't had good experiences trying to run Seam or Spring

2) I tend to drown in new technology unless I build my bases from scratch

I'm back putting the finishing touches on JSF after having been defeated by it a couple of years back at which time I found Eclipse and, to some extent, Java itself still too much to handle. I happen to need * * something * * and decided I'd just use JSF so I can join the old guys' club.

Someday, I hope to grow up to be a man. In the meantime, I have tried to leave some good breadcrumbs for the next guy.



Best regards,

Russ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Start-up errors in JSF project