Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.<init>(DefaultSingletonBeanRegistry.java:83)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.<init>(FactoryBeanRegistrySupport.java:43)
at org.springframework.beans.factory.support.AbstractBeanFactory.<init>(AbstractBeanFactory.java:176)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.<init>(AbstractAutowireCapableBeanFactory.java:155)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.<init>(AbstractAutowireCapableBeanFactory.java:166)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.<init>(DefaultListableBeanFactory.java:156)
at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:77)
at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:66)
at net.roseindia.Spring3HelloWorldTest.main(Spring3HelloWorldTest.java:16)
I think, the common problem is wrong location of .xml file.
WARNING! You should put this file into the root folder of the SRC, not into the package folder.
...i have solved it in this way.
In my imported jar there is a file .libd and that file give me the java.lang.NoClassDefFoundError.
Remove the import of this file and it should work.
To run this exercise you need to use the next code:
ApplicationContext context=new ClassPathXmlApplicationContext(new String[]{"SpringHelloWorld.xml"});
BeanFactory factory=context;
Spring3HelloWorld myBean=(Spring3HelloWorld)factory.getBean("Spring3HelloWorldBean");
myBean.sayHello();
}
Clicking 'Next' to view next topic or 'Prev' link for previous topi is not working. Not informative
Spring 3.0satish mahajan October 8, 2011 at 8:14 PM
Good Demo Yaar Nice One Keep it Up this demo was so good for me to start Spring 3.0 Frame Work one thing i world like to say plz kindly give littel bit more explanation about demo Thaks
Hello, I have been trying to learn spring for as long as 3 months now. But all the online tutorials didn't really help. I will read and thing I understand, but when I try same thing using my netbeans 6.9 version, it will tell me that building failed. I read some considerable chapter of Spring in Action 3 (sia3), understood some XML configurations but sia3 didn't use web based examples, they used console. I mean, up to chapter 6, its still using core POJOs for its examples. Can you please help me. I need bit by bit, step by step advice on how I can build web app (from simple to complex) using spring framework. Thank you.
Hello!
The links "<< Previous Index Next >>" near the bottom do not work, i.e. they all point to this same page. So it's hard to find "the next section" of the tutorial.
All the best,
rob
I am using 3.1.0.RC1 and getting bellow mention error.
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.<init>(DefaultSingletonBeanRegistry.java:83)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.<init>(FactoryBeanRegistrySupport.java:43)
at org.springframework.beans.factory.support.AbstractBeanFactory.<init>(AbstractBeanFactory.java:175)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.<init>(AbstractAutowireCapableBeanFactory.java:160)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.<init>(AbstractAutowireCapableBeanFactory.java:171)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.<init>(DefaultListableBeanFactory.java:158)
at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:77)
at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:66)
at springTest.Spring3HelloWorldTest.main(Spring3HelloWorldTest.java:14)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
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)
... 9 more
please help
Ratnesh Dubey
Thanks for posting this intro. It helps a lot.
With the latest spring 3.x source, I need to add the apache common-logging-1.1.x.jar file to the build to get even this simple example to run. Perhaps it's just me.
Dear Sir,
I thank you for keeping this website updated and running. I am a big fan of it.
I would just like to draw your attention towards page navigation buttons "previous", "index", "next". They are not working properly. If I click on them, they return the same page. Please have a look and get it rectified.
With best regards,
Russell
CA
Hi,
When I tried to run the code as stated by the Hello World example, I get the following error -
java.lang.NoClassDefFoundError: net/roseindia/Spring3HelloWorldTest
Caused by: java.lang.ClassNotFoundException: net.roseindia.Spring3HelloWorldTest
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
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)
Exception in thread "main"
I did everything exactly as stated in the example. please let me know what went wrong?
Firstly, I'd like to appreciate the efforts you have taken to explain this all...now coming to the feedback upon this is:
The Tutorial is not useful as it contains incomplete information about what you are trying to explain, first i think you should go through the code you are providing for download and then you must read the article you wrote in here.....
you will find that the information you have provided here is incomplete that leads to nothing but the confusion, so kindly review the articles and tutorials once again as per the latest tools and techniques and kindly provide with the proper information.
Thank You.
Hi,
It was very simple to follow and elegant to look at but when I tried running it, I got a
java.lang.NoClassDefFoundError: net/roseindia/Spring3HelloWorldTest
Caused by: java.lang.ClassNotFoundException: net.roseindia.Spring3HelloWorldTest
Please help.
Hi, I resolved the error with the classdefnotfound by removing one of the .libd files from the build path which got included along with the other jars. Now I get an error "Caused by: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'." . The only thing I changed is added ">" after <beans . I did that because the xml file complained that it required a ">" after "<beans which is not included in the xml file on the site.
Hi,
when extracting the spring-framework-3.0.0.RELEASE-with-docs.zip, I got Error 0x80010135:Path too long for the ContextConfigurationWithPropertiesExtendingPro... Type PROPERTIES File, how can I fix that
I have been attempting to learn Spring and get a java project up and running. I am using your article to get it working, I've followed all the directions, when I am at step 12, I attempt to run it but I get an error in the console.
May 14, 2012 11:52:30 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [SpringHelloWorld.xml]
Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [SpringHelloWorld.xml]; nested exception is java.io.FileNotFoundException: class path resource [SpringHelloWorld.xml] cannot be opened because it does not exist
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:341)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:78)
at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:66)
at net.roseindia.Spring3HelloWorldTest.main(Spring3HelloWorldTest.java:12)
Caused by: java.io.FileNotFoundException: class path resource [SpringHelloWorld.xml] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:158)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328)
... 4 more
I hope that you will be able to help me.
I tried following this example using spring 3.0.0 and eclipse indigo (3.7). I get an error when I try to import the file
org.springframework.spring-library-3.0.0.RELEASE.libd :
Description Resource Path Location Type
Archive for required library: 'lib/org.springframework.spring-library-3.0.0.RELEASE.libd' in project 'Spring30' cannot be read or is not a valid ZIP file.
One article I read indicated .libd files can not be used with eclipse. But you seemed to have used it? Can you tell me how to get around this?
Thanks
You should use DefaultListableBeanFactory.
something like this:
DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory(new GenericXmlApplicationContext(
"spring-config.xml"));
Spring3HelloWorld myBean = (Spring3HelloWorld) beanFactory
.getBean("Spring3HelloWorldBean");
myBean.sayHello();
result is
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.<init>(DefaultSingletonBeanRegistry.java:83)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.<init>(FactoryBeanRegistrySupport.java:43)
at org.springframework.beans.factory.support.AbstractBeanFactory.<init>(AbstractBeanFactory.java:175)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.<init>(AbstractAutowireCapableBeanFactory.java:157)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.<init>(AbstractAutowireCapableBeanFactory.java:168)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.<init>(DefaultListableBeanFactory.java:167)
at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:77)
at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:66)
at net.roseindia.Spring3HelloWorldTest.main(Spring3HelloWorldTest.java:12)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 9 more
what is apache and how to handle it?
I have tried to build this sample application using ecliose tools. I have followed all the step but getting NoClassnotfound Exception .
Solution: Common Logging jar was missing after setting this jar in class path. sample Application is running perfectly.
DifferenceRahul April 12, 2011 at 6:13 PM
How it made difference we can do it through java file also
I'm having this bug. i need help pleaseDaniel Adigun April 22, 2011 at 3:20 PM
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.<init>(DefaultSingletonBeanRegistry.java:83) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.<init>(FactoryBeanRegistrySupport.java:43) at org.springframework.beans.factory.support.AbstractBeanFactory.<init>(AbstractBeanFactory.java:176) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.<init>(AbstractAutowireCapableBeanFactory.java:155) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.<init>(AbstractAutowireCapableBeanFactory.java:166) at org.springframework.beans.factory.support.DefaultListableBeanFactory.<init>(DefaultListableBeanFactory.java:156) at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:77) at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:66) at net.roseindia.Spring3HelloWorldTest.main(Spring3HelloWorldTest.java:16)
Spring 3 Hello World Examplespring learner May 24, 2011 at 5:19 PM
Thanks very simple and efficient
doesn't worktomi May 25, 2011 at 7:52 PM
hi, if i run the code,it throughs file not found exception...can't find the xml file
spring3 example codeshyam May 27, 2011 at 10:48 PM
good! it is really helpful!
Spring3HelloWorld examplestefano cirilli June 5, 2011 at 1:10 AM
Awesome application!
Great resourcePratik Soni June 11, 2011 at 1:37 AM
A very useful page for new comers. Thanks..
Common Problem.Sky June 25, 2011 at 10:12 AM
I think, the common problem is wrong location of .xml file. WARNING! You should put this file into the root folder of the SRC, not into the package folder.
For java.lang.NoClassDefFoundError problem...deran July 5, 2011 at 5:49 PM
...i have solved it in this way. In my imported jar there is a file .libd and that file give me the java.lang.NoClassDefFoundError. Remove the import of this file and it should work.
helpful tutorialnalin August 26, 2011 at 11:43 PM
nice one!! Please upgrade the tutorial to newer versions of Spring framework. XmlBeanFactory is no longer supported in latest releases of Spring3
Good JobNico August 30, 2011 at 12:51 PM
Nice example. Loved the illustrations. This helps me thrue those tuff first steps when learning something new.
Not workingJJJ May 29, 2013 at 4:41 PM
Not working
About the demoSandeep Bansal September 29, 2011 at 7:37 PM
This is a really a good and easy demo for learners. Thanks guys.
Wrong CodeSaul October 6, 2011 at 1:50 AM
To run this exercise you need to use the next code: ApplicationContext context=new ClassPathXmlApplicationContext(new String[]{"SpringHelloWorld.xml"}); BeanFactory factory=context; Spring3HelloWorld myBean=(Spring3HelloWorld)factory.getBean("Spring3HelloWorldBean"); myBean.sayHello(); }
No proper informationMike February 7, 2013 at 5:25 AM
Clicking 'Next' to view next topic or 'Prev' link for previous topi is not working. Not informative
Spring 3.0satish mahajan October 8, 2011 at 8:14 PM
Good Demo Yaar Nice One Keep it Up this demo was so good for me to start Spring 3.0 Frame Work one thing i world like to say plz kindly give littel bit more explanation about demo Thaks
EasyMark October 9, 2011 at 2:03 PM
This is very easy. But thank you all the same.
hiaruseth October 11, 2011 at 4:14 PM
thanks alot
nice way to startsaji November 2, 2011 at 11:36 AM
Nice explanation
Learning SpringPaul Anekwe November 7, 2011 at 2:21 AM
Hello, I have been trying to learn spring for as long as 3 months now. But all the online tutorials didn't really help. I will read and thing I understand, but when I try same thing using my netbeans 6.9 version, it will tell me that building failed. I read some considerable chapter of Spring in Action 3 (sia3), understood some XML configurations but sia3 didn't use web based examples, they used console. I mean, up to chapter 6, its still using core POJOs for its examples. Can you please help me. I need bit by bit, step by step advice on how I can build web app (from simple to complex) using spring framework. Thank you.
navigation links not working?rob November 7, 2011 at 6:54 PM
Hello! The links "<< Previous Index Next >>" near the bottom do not work, i.e. they all point to this same page. So it's hard to find "the next section" of the tutorial. All the best, rob
GoodTengjiao November 7, 2011 at 7:11 PM
Nice job!
Unable to runn spring hello world exapleRatnesh Dubey November 13, 2011 at 9:23 AM
I am using 3.1.0.RC1 and getting bellow mention error. Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.<init>(DefaultSingletonBeanRegistry.java:83) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.<init>(FactoryBeanRegistrySupport.java:43) at org.springframework.beans.factory.support.AbstractBeanFactory.<init>(AbstractBeanFactory.java:175) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.<init>(AbstractAutowireCapableBeanFactory.java:160) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.<init>(AbstractAutowireCapableBeanFactory.java:171) at org.springframework.beans.factory.support.DefaultListableBeanFactory.<init>(DefaultListableBeanFactory.java:158) at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:77) at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:66) at springTest.Spring3HelloWorldTest.main(Spring3HelloWorldTest.java:14) Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) 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) ... 9 more please help Ratnesh Dubey
Needs common-logging-1.1.x.jarJoe J. November 15, 2011 at 12:32 AM
Thanks for posting this intro. It helps a lot. With the latest spring 3.x source, I need to add the apache common-logging-1.1.x.jar file to the build to get even this simple example to run. Perhaps it's just me.
Problem with page navigationRussell December 13, 2011 at 3:23 PM
Dear Sir, I thank you for keeping this website updated and running. I am a big fan of it. I would just like to draw your attention towards page navigation buttons "previous", "index", "next". They are not working properly. If I click on them, they return the same page. Please have a look and get it rectified. With best regards, Russell CA
spring hello exampleubedulla December 19, 2011 at 3:20 PM
good notes
SpringNaveed January 3, 2012 at 7:20 PM
i need a jdbc example
NoClassDefFoundErrorDalia Banerjee January 4, 2012 at 4:44 PM
Hi, When I tried to run the code as stated by the Hello World example, I get the following error - java.lang.NoClassDefFoundError: net/roseindia/Spring3HelloWorldTest Caused by: java.lang.ClassNotFoundException: net.roseindia.Spring3HelloWorldTest at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) 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) Exception in thread "main" I did everything exactly as stated in the example. please let me know what went wrong?
XmlBeanFactory is deprecatedHürol Türen January 10, 2013 at 6:48 PM
XmlBeanFactory is deprecated in Spring Franework 3.2.0. ApplicationContext is used instead of XmlBeanFactory.
Spring 3.0 TutorialAtul February 4, 2012 at 12:08 PM
Nice and easy to start on Spring 3.0.
Thanksjonathan February 5, 2012 at 4:17 AM
Thanks for this quick tutorial... just setting things up and this helped. P.S. Have you thought about using ReCaptcha?
Feedback on postMark_D February 8, 2012 at 12:38 AM
Firstly, I'd like to appreciate the efforts you have taken to explain this all...now coming to the feedback upon this is: The Tutorial is not useful as it contains incomplete information about what you are trying to explain, first i think you should go through the code you are providing for download and then you must read the article you wrote in here..... you will find that the information you have provided here is incomplete that leads to nothing but the confusion, so kindly review the articles and tutorials once again as per the latest tools and techniques and kindly provide with the proper information. Thank You.
this is a good tutorialradha February 16, 2012 at 3:15 PM
thanks...........:)
Bean file location is not properRajesh February 20, 2012 at 8:13 PM
the file should be placed on the ROOT of your CLASSPATH. If the file is in some other "directory" then it won't be found.
Error while runningAnonymous March 2, 2012 at 12:55 AM
Hi, It was very simple to follow and elegant to look at but when I tried running it, I got a java.lang.NoClassDefFoundError: net/roseindia/Spring3HelloWorldTest Caused by: java.lang.ClassNotFoundException: net.roseindia.Spring3HelloWorldTest Please help.
Error after solving classdefnotfound exceptionAnonymous March 2, 2012 at 2:19 AM
Hi, I resolved the error with the classdefnotfound by removing one of the .libd files from the build path which got included along with the other jars. Now I get an error "Caused by: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'." . The only thing I changed is added ">" after <beans . I did that because the xml file complained that it required a ">" after "<beans which is not included in the xml file on the site.
Questionhassan el-far March 9, 2012 at 1:04 PM
how can we show hello world on a web page after??
SpringShailesh March 20, 2012 at 8:22 PM
This is really good example for starters. Thanks for your help.
springshiva April 3, 2012 at 10:02 AM
yes wat ever your are said is working good. Thank u Regaurds /shiva
Spring 3 Hello World ExampleRam April 23, 2012 at 2:36 AM
Short and sweet example..very good hands on for hello word!!
re: Error 0x80010135:Path too longMagos Ho May 3, 2012 at 7:12 AM
Hi, when extracting the spring-framework-3.0.0.RELEASE-with-docs.zip, I got Error 0x80010135:Path too long for the ContextConfigurationWithPropertiesExtendingPro... Type PROPERTIES File, how can I fix that
Learning SpringManoj Kumar May 3, 2012 at 3:17 PM
Allway looking/finding for good solution from roseindia.net.
replyuMa May 9, 2012 at 5:14 PM
thanks...it worked 4 me..
thanksmohy May 10, 2012 at 6:02 PM
thanks you is very good it's help me very good
Copy and AddAlexander Püschel May 14, 2012 at 1:06 AM
Where I have to copy the commons-logging.jar file? Into the lib-folder? And do I also add this file in the Java Build Path?
Spring Hello World ExampleMorgan May 14, 2012 at 10:24 PM
I have been attempting to learn Spring and get a java project up and running. I am using your article to get it working, I've followed all the directions, when I am at step 12, I attempt to run it but I get an error in the console. May 14, 2012 11:52:30 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions INFO: Loading XML bean definitions from class path resource [SpringHelloWorld.xml] Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [SpringHelloWorld.xml]; nested exception is java.io.FileNotFoundException: class path resource [SpringHelloWorld.xml] cannot be opened because it does not exist at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:341) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:78) at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:66) at net.roseindia.Spring3HelloWorldTest.main(Spring3HelloWorldTest.java:12) Caused by: java.io.FileNotFoundException: class path resource [SpringHelloWorld.xml] cannot be opened because it does not exist at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:158) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328) ... 4 more I hope that you will be able to help me.
Spring3 exampeMike May 19, 2012 at 4:19 AM
I tried following this example using spring 3.0.0 and eclipse indigo (3.7). I get an error when I try to import the file org.springframework.spring-library-3.0.0.RELEASE.libd : Description Resource Path Location Type Archive for required library: 'lib/org.springframework.spring-library-3.0.0.RELEASE.libd' in project 'Spring30' cannot be read or is not a valid ZIP file. One article I read indicated .libd files can not be used with eclipse. But you seemed to have used it? Can you tell me how to get around this? Thanks
Eclipse IDECarl July 12, 2012 at 9:03 PM
Which of the Eclipse IDE should I download to use? There is a wide selection to choose from.
ExampleBryant Castaneda July 21, 2012 at 11:50 AM
Thank you so much for the example. I am new to the Spring community and this is a great step for newbies.
In spring 3.1 XmlBeanFactory is deprecated.Alex Zykov July 22, 2012 at 2:47 PM
You should use DefaultListableBeanFactory. something like this: DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory(new GenericXmlApplicationContext( "spring-config.xml")); Spring3HelloWorld myBean = (Spring3HelloWorld) beanFactory .getBean("Spring3HelloWorldBean"); myBean.sayHello();
spring frameworkAnand Roushan July 27, 2012 at 10:08 AM
it's really very informative
Navigation LinkRichard Strong July 27, 2012 at 6:08 PM
The Previous - Index - Next links are not working. They redisplay the screen you are currently viewing.
practicesasidhar July 29, 2012 at 3:52 PM
very useful blog for beginners....thanks lot
Good WorkAmit Singh July 29, 2012 at 5:09 PM
It worked right on first time.. You guys are just awesome bang on target!! Thanks a lot
Spring 3Deepa Mani August 11, 2012 at 12:10 AM
Good Definition. Superb
about hello world spring examplesultan August 16, 2012 at 5:09 AM
thank you for the example provided here explanation is pretty nice very informative for a beginner : )
example is incompletegluk August 17, 2012 at 1:43 AM
result is Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.<init>(DefaultSingletonBeanRegistry.java:83) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.<init>(FactoryBeanRegistrySupport.java:43) at org.springframework.beans.factory.support.AbstractBeanFactory.<init>(AbstractBeanFactory.java:175) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.<init>(AbstractAutowireCapableBeanFactory.java:157) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.<init>(AbstractAutowireCapableBeanFactory.java:168) at org.springframework.beans.factory.support.DefaultListableBeanFactory.<init>(DefaultListableBeanFactory.java:167) at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:77) at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:66) at net.roseindia.Spring3HelloWorldTest.main(Spring3HelloWorldTest.java:12) Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:423) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) ... 9 more what is apache and how to handle it?
Awesome!Rob Gravelle August 29, 2012 at 8:51 PM
This is a great tutorial. Easy to follow. Worked the first time. Good stuff! Rob Gravelle
Code Is not workingram August 31, 2012 at 3:16 PM
Code is not working dont try with this....it just work
Java,Springveeracholan September 9, 2012 at 12:08 PM
thanks for the tutorial...i 've learnt many concepts out from this site...gud goin dudes...:)
about spring farme worknaveen September 13, 2012 at 8:53 PM
it is bit difficult understand this framework plz help me how can i become expert in spring framework..
Problem in main class Nagu September 22, 2012 at 5:29 PM
Its not working properly :(
springvinay September 27, 2012 at 12:30 PM
i m new to springs i have wrote as it is the code but there is no output in the console so please help me
Sample Spring ApplicationmSandeep Gupta November 11, 2012 at 3:14 AM
I have tried to build this sample application using ecliose tools. I have followed all the step but getting NoClassnotfound Exception . Solution: Common Logging jar was missing after setting this jar in class path. sample Application is running perfectly.
Deprecated Code used hereAlexander Baggett November 13, 2012 at 11:06 AM
XmlBeanFactory is deprecated now. This needs to be updated with a different approach.
Unable to extract filesShilpa November 30, 2012 at 12:18 PM
Hi, It is showing as compressed file is invalid/corrupted when we try to open the downloded code. Please make the code readable. -Thankyou Shilpa C S
Post your Comment