• 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
  • paul wheaton
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Ron McLeod
  • Tim Moores
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Vijitha Kumara

How to stop getting ClassNotFound Error ?  RSS feed

 
Ranch Hand
Posts: 486
  • 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: 5327
143
  • 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: 486
  • 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: 5327
143
  • 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?
 
Why am I so drawn to cherry pie? I can't seem to stop. Save me tiny ad!
global solutions you can do in your home or backyard
https://coderanch.com/t/708587/global-solutions-home-backyard
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!