andrew222
September 13th, 2009, 11:40 PM
Hello,
I am trying to run a program from the source code for the book "Spring Into Action". The program is from ch. 1 and we can download the code from www.manning/walls3
The code is basically an example of using dependency injection.
I recreated the package structure
I added the .xml config files
I included the spring.jar file
I am not getting any 'red block' errors from Eclipse.
When I compile the code, I get a NoClassDefFoundError with this additional output
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.springframework.util.ClassUtils.<clinit>(ClassUtils.java:72)
at org.springframework.core.io.DefaultResourceLoader.<init>(DefaultResourceLoader.java:52)
at org.springframework.context.support.AbstractApplic ationContext.<init>(AbstractApplicationContext.java:184)
at org.springframework.context.support.AbstractRefres hableApplicationContext.<init>(AbstractRefreshableApplicationContext.java:80)
at org.springframework.context.support.AbstractXmlApp licationContext.<init>(AbstractXmlApplicationContext.java:58)
at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationContext.java:119)
at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationContext.java:66)
at com.springinaction.chapter01.knight.KnightApp.main (KnightApp.java:9)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java: 200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 07)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 52)
at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:320)
... 8 more
What could I be doing wrong?
What things should i try?
any help is welcome!
I am trying to run a program from the source code for the book "Spring Into Action". The program is from ch. 1 and we can download the code from www.manning/walls3
The code is basically an example of using dependency injection.
I recreated the package structure
I added the .xml config files
I included the spring.jar file
I am not getting any 'red block' errors from Eclipse.
When I compile the code, I get a NoClassDefFoundError with this additional output
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.springframework.util.ClassUtils.<clinit>(ClassUtils.java:72)
at org.springframework.core.io.DefaultResourceLoader.<init>(DefaultResourceLoader.java:52)
at org.springframework.context.support.AbstractApplic ationContext.<init>(AbstractApplicationContext.java:184)
at org.springframework.context.support.AbstractRefres hableApplicationContext.<init>(AbstractRefreshableApplicationContext.java:80)
at org.springframework.context.support.AbstractXmlApp licationContext.<init>(AbstractXmlApplicationContext.java:58)
at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationContext.java:119)
at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationContext.java:66)
at com.springinaction.chapter01.knight.KnightApp.main (KnightApp.java:9)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java: 200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 07)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 52)
at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:320)
... 8 more
What could I be doing wrong?
What things should i try?
any help is welcome!