• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tomcat 5.5.28 JSF exception

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello there:

I've been trying to render a jsf page in my web application but when i send the request from the browser i got the following error:

6/06/2010 04:04:02 PM org.apache.catalina.core.StandardContext listenerStart
GRAVE: Error configurando escuchador de aplicaciĆ³n de clase com.sun.faces.config.ConfigureListener
java.lang.NoClassDefFoundError: javax/faces/FacesException



I'm completly sure that the jsf-api.jar and jsf-impl.jar are in the build path and inside the WAR file.

Anyone had this error before?

I'll appreciate the help.
 
Ranch Hand
Posts: 470
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Camilo Diaz wrote:I'm completly sure that the jsf-api.jar and jsf-impl.jar are in the build path and inside the WAR file.



What is the build path and where exactly you keep jar files in WAR file?
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's always a good idea in cases like this to remove any copies of the webapp (both WAR file and directory) from the TOMCAT_HOME webapps directory. Also purge the corresponding files from the TOMCAT_HOME/work directory.

However, if my memory fails me not, your actual problem is something that wouldn't seem so obvious.

JSF needs EL to function, but EL is not included as part of the basic library jarset in the Tomcat 5.5 server. It's in Tomcat6, but not Tomcat 5.5. For Tomcat 5.5, you'll need to explicitly include the el.jar file.
 
Camilo Diaz
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for the answers:

Misha Ver wrote:
where exactly you keep jar files in WAR file?



the jars are in the WEB-INF/lib directory of my webapp.

Do i have to put them in another directory??


JSF needs EL to function, but EL is not included as part of the basic library jarset in the Tomcat 5.5 server. It's in Tomcat6, but not Tomcat 5.5. For Tomcat 5.5, you'll need to explicitly include the el.jar file.



I also have the el.jar in my WEB-INF/lib. Any other jars that i must have and i'm not aware?

Could be a bug in tomcat 5.5.28 ??


I'll appreciate the help.

 
Tim Holloway
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There's no bug. I've run JSF 1.1 in Tomcat 5.5, although I recommend Tomcat6.

Memory is hazy, but I think you have to copy the el.jar into TOMCAT_HOME/lib. In any event, don't put a copy in both Tomcat and the WAR - that's a sure guarantee of trouble. This stuff gets accessed from several different classpaths, and you'll end up with a great big jumble. Which is, in fact, what I think did happen.
 
Camilo Diaz
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:There's no bug. I've run JSF 1.1 in Tomcat 5.5, although I recommend Tomcat6.

Memory is hazy, but I think you have to copy the el.jar into TOMCAT_HOME/lib. In any event, don't put a copy in both Tomcat and the WAR - that's a sure guarantee of trouble. This stuff gets accessed from several different classpaths, and you'll end up with a great big jumble. Which is, in fact, what I think did happen.



I'm trying to run jsf 1.2.14, not the 1.1...
could that be the problem?

I'll appreciate the help
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tomcat 5.5 already has EL built in so you don't normally have to add it.

As with servlet-api.jar and jsp-api.jar, I wouldn't recommend adding el.jar to you web application as it could clash with the ones already loaded by Tomcat.
Try removing it from your WEB-INF/lib directory.

 
Tim Holloway
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ben Souther wrote:Tomcat 5.5 already has EL built in so you don't normally have to add it.

As with servlet-api.jar and jsp-api.jar, I wouldn't recommend adding el.jar to you web application as it could clash with the ones already loaded by Tomcat.
Try removing it from your WEB-INF/lib directory.



Hmmm. I could have sworn that EL didn't become a standard part of Tomcat until Tomcat6. Time flies where you're having fun.

If there was a TOMCAT_HOME/lib/commons-el.jar file in the original Tomcat5 installation, that's the only EL that should be needed, I think.

I'm not entirely sure about JSF1.2 in Tomcat5, however. I think that 1.2 required a later version of JSP than Tomcat5 supplies. That can be dodged by using Facelets instead of JSP, however.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:Hmmm. I could have sworn that EL didn't become a standard part of Tomcat until Tomcat6. Time flies where you're having fun.


There as of Tomcat's support of JSP 2.0 with Tomcat 5.0.

Perhaps it's the JSTL you are thinking of?
 
Tim Holloway
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:

Tim Holloway wrote:Hmmm. I could have sworn that EL didn't become a standard part of Tomcat until Tomcat6. Time flies where you're having fun.


There as of Tomcat's support of JSP 2.0 with Tomcat 5.0.

Perhaps it's the JSTL you are thinking of?



Naw. Actually, I think it's because I was working with JSF in Tomcat4, which definitely didn't include EL in the base package.

Although a lot of noise is made about JSTL upgrades, I think it's overblown in many cases unless you're actually using JSTL itself, and I don't recommend mixing JSTL code and JSF code anyway. I think, however, that one or 2 specific tagset implementations may invoke JSTL under cover, but that's more conjecture than something I'm certain of.
 
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JSF 1.2 doesn't work on Tomcat 5.5

I have tried it before
 
Tim Holloway
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Davie Lin wrote:JSF 1.2 doesn't work on Tomcat 5.5

I have tried it before



I'm almost certain that JSF 1.2 requires a higher level of JSP version than Tomcat 5.5 provides. As I said, I think you can get around that by using Facelets.

On the other hand, Tomcat 7 just came out with Release Candidate 4. Tomcat 5 is getting pretty long in the tooth now.
 
Camilo Diaz
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello there:

Well, i tried removing the el-jar from my WEB-INF/lib directory and put in my TOMCAT_HOME/lib and....... didn't work

Also I tried to downgrade the jsf version from 1.2 to 1.1 and........ it didn't work either.

I decided to use tomcat 6 for my application
reply
    Bookmark Topic Watch Topic
  • New Topic