Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config, but I included the jstl jars

 
Christopher Olbertz
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am developing a very simple example for JSF. But when I start it, I get the following error:

java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config

I searched in the internet and I found the issue. The answer was including the jstl jars. I did this, but the error still occurs.

I included the following jars:

commons-beanutils.1.8.3
commons-codec-1.3
commons-collections-3.2
commons-digester-1.8
commons-digester-1.8
commons-discovery-0.4
commons-logging-1.1.1
myfaces-api-2.0.2
myfaces-impl-2.0.2
jstl-api-1.2
jstl-impl-1.2

Did I any jars forget?

Kind regards,

Christopher
 
Alex Hurtt
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Verify by examining the contents of your jar files. Maybe you are looking for a class that is specified in JSTL 1.1 but no longer exists in JSTL 1.2 while you have clearly downloaded the JSTL 1.2 libraries or something like that.
 
Christopher Olbertz
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your answer. I will try that. But it's a very very very simple example for JSF. Therefore I don't think, thats the reason, but I will examin the jar files.
 
Alex Hurtt
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well after checking javadocs for both JSTL 1.1 and 1.2 I see that your class in question is in fact in both version of the API and so should be in the jar file regardless of which one you have so my original suggestion (which admittedly was just the first thing that came to mind) doesn't seem to hold much validity in your case. Are you using an IDE? Are you packaging in a .war file inside an .ear file or anything or just a standalone .war file? When you say you are 'including' the jars, what exactly do you mean? Putting them in WEB-INF/lib of the .war file? If you are using an ANT script or some IDE function to package your .war, have you examined the contents of the .war you are deploying to make sure it actually included the jar files?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic