• 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

How to stop getting ClassNotFound Error ?  RSS feed

 
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have set up my pom.xml but somehow the jar files are not made available in my build path.

Previously, I did not have to put everything on the build path manually since all my Maven dependencies are already showing in the build path.

But, I kept getting many ClassNotFound error and I have to keep adding them manually.

One example of this ClassNotFound is here in the attachment.

I hope someone can tell me how to make the Eclipse IDE Neon aware of all the dependencies in my Maven.

Tks.
keeps-getting-classNotFoundError.jpg
[Thumbnail for keeps-getting-classNotFoundError.jpg]
 
Saloon Keeper
Posts: 4747
117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is a runtime error message, not a build time message. Be aware that there are two different classpaths in play: one for the build, and one for use at runtime. Both need to include all required libraries.
 
tangara goh
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Moores wrote:That is a runtime error message, not a build time message. Be aware that there are two different classpaths in play: one for the build, and one for use at runtime. Both need to include all required libraries.




Hello Tim,

I have searched the internet for an answer but just can't find one which shows me the step to include the jars in my pom.xml to be available at runtime.

Could you tell me how-to?

So far, I have include maven library which contains all the jars needed in deployment assemblies.

I am not sure where I can include it in runtime.
 
Tim Moores
Saloon Keeper
Posts: 4747
117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That depends on how you run this code. Does Maven create a war file? If so, does it include all jar files? If not, how is the code being run?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!