• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

2 erros: Jsf can't find any images (beginer error) and ClassNotFoundException  RSS feed

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

Recently I started a jsf project by myself, I installed eclipse 3.5 --> create new project --> Dynamic web Project, selected tomcat 6.0, jsf 1.2 just like the following picture:



Add jsf capability just like the following picture:



It worked fine, at first but then I faced two problems:

First, after a while, my eclipse start to throw this error when I start tomcat:

SEVERE: Error configuring application listener of class org.apache.myfaces.webapp.StartupServletContextListener
java.lang.ClassNotFoundException: org.apache.myfaces.webapp.StartupServletContextListener
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3773)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
25/05/2010 09:22:34 org.apache.catalina.core.StandardContext listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)

The only way I found to fix it, is to select a different workspace, start it all over again coping the classes/jsf pages I already did from the last workspace

Second, I haven't been able to make a or <h:graphicImage> tag work at all, well, actually eclipse preview find the image but when I start the server and open the page, it says the image can't be found, I already copied my image everywhere in the project with all kind of / ../ ./ references but nothing so far... I'm likely missing something easy but I can't seen to find what.

thanks in advance for any help

 
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Usually the ClassNotFoundException means that you are missing a required jar file

perhaps you would list the files in your WEB-INF/lib directory so other people that's familiar with MyFace can help.

I am not familiar with MyFace, I use RichFace myself
 
Vandre Caetano
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I Just found what happened..

commons-logging, common-digester and a few other common Library were automatically loaded to classpatch when I downloaded JSF myfaces thought eclipse, I deleted then, then copied to tomcat libs and everything worked fine..

Now, about the img error, someday I woke up and it was working.. go figure..
 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, you aren't dreaming. I too have trouble with the images not showing up whenever I see ClassNotFoundExceptions crop up.
 
Vandre Caetano
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Russell Bateman wrote:No, you aren't dreaming. I too have trouble with the images not showing up whenever I see ClassNotFoundExceptions crop up.



The ClassNotFoundExceptions only happened after I closed eclipse for the first time... but then I had the img error... the img error was corrected waayy before I found out what was causing the ClassNotFoundExceptions...

Actually, about the solution.. I was mistaken, the error is still there.. sort of.. it happens once in a while..
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!