Java
T
point
Home
Core Java
Servlet
JSP
Struts2
Mail API
Hibernate
Spring
Android
Design Pattern
Projects
Interview Q
View All Questions
Ask New Question
ClassNotFoundException while running an example(spring) from javatpoint in Eclipse
By:
anandk***
On:
Thu Jan 21 08:14:41 IST 2016
0
0
2
2
I am running a sample code given in javatpoint article "http://www.javatpoint.com/spring-JdbcTemplate-tutorial".
While running the example given for eclipse i am getting classNotFoundException while loading ApplicationContext class.
I have attached all the jars in build path,still getting this error.It is so annoying.I have checked many portals for solution, none of them helped.
Following is the error in the eclipse console.
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.springframework.context.support.AbstractApplicationContext.<init>(AbstractApplicationContext.java:159)
at org.springframework.context.support.AbstractApplicationContext.<init>(AbstractApplicationContext.java:223)
at org.springframework.context.support.AbstractRefreshableApplicationContext.<init>(AbstractRefreshableApplicationContext.java:88)
at org.springframework.context.support.AbstractRefreshableConfigApplicationContext.<init>(AbstractRefreshableConfigApplicationContext.java:58)
at org.springframework.context.support.AbstractXmlApplicationContext.<init>(AbstractXmlApplicationContext.java:61)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:136)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
at Test.main(Test.java:9)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 8 more
Kindly help me.
0
Depends on the Database need to attach jar file
0
By:
[email protected]
On:
Sat Mar 19 10:10:24 IST 2016
0
0
0
0
Are You Satisfied :
0Yes
0No