aspose file tools*
The moose likes Spring and the fly likes Spring Hello World Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring Hello World Error" Watch "Spring Hello World Error" New topic
Author

Spring Hello World Error

Vince Kennedy
Greenhorn

Joined: Aug 26, 2009
Posts: 20
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

Joined: Sep 29, 2008
Posts: 12617

Do you have the commons-logging jar?
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

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.


[My Blog]
All roads lead to JavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring Hello World Error