Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring Hello World Error

 
Vince Kennedy
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey all, I'm a little green with Spring and having trouble getting everything set up for now. I'm working in Eclipse and created a plan old java project and followed this Hello World Example/Tutorial.

Everything in my code appears to be fine (copy pasted). I downloaded a spring framework zip and imported the jar files in to the folder and created the project and xml files.

If I try to run the main as an application in eclipse I get this error:
Exception in thread "main" java.lang.NoClassDefFoundError: org.apache.commons.logging.LogFactory at org.springframework.core.CollectionFactory.<clinit>(CollectionFactory.java:64)



This is the line it traces back too.

Thanks for your help.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have the commons-logging jar?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have downloaded Spring with full dependencies, you should have a folder called "lib" in your zip file. The Commons Logging library is in \jakarta-commons\commons-logging.jar.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic