Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How is this not work?  RSS feed

 
Davie Lin
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

please advise



I get classDefNotFoundException, richfaces jar files are in Eclipse build path, how so?

 
Tom Fulton
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may need to add the .jar file to the deployable unit, or the server. Here is the reason:

Eclipse will use the .jars included within the project for compilation. This is why you don't get a compilation error...the richfaces .jars are available for the compiler to check types, etc. But the server runtime will also need the .jars for when the specified line actually runs. This can be done by including the .jars in the lib folder of WEB-INF, or by copying them to the server's lib folder.

Bottom line: there is a difference between compile-time and run-time. A ClassNotFoundException is a runtime error, not a compile-time error.
 
Davie Lin
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for clearing that for me. Makes a lot of sense. I will look into it
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!