• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

class path resource [spring xml file] cannot be opened

 
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hai, i have just started learning things in spring, the following is the program i am trying to execute in eclipse


//program 1



//program 2



//program 3-spring xml




but when i am doing right click on democlient.java and run as -> java application the i am getting the following error , what should i do? where have i gone i am unable to undrstand. please help me.

I have added spring.jar and commons-logging.jar, by the way i am also new to eclipse. but whatever i have done is correct i think.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The config file doesn't exist on the classpath, just like the error msg says.
 
sasank manohar
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:The config file doesn't exist on the classpath, just like the error msg says.




thank you david, but i kept the demo.xml file in the package "sample", but still i don't understand where this error is creeping from .
 
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you tried "sample/demo.xml"?
 
sasank manohar
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

but i kept the demo.xml file in the package "sample"



that's what i said in the previous reply. i kept demo.xml in sample package ie., sample/demo.xml. but no use.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it being deployed?
 
Hong Anderson
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

sasank manohar wrote:

but i kept the demo.xml file in the package "sample"



that's what i said in the previous reply. i kept demo.xml in sample package ie., sample/demo.xml. but no use.


You should use "sample/demo.xml", not "demo.xml" because demo.xml is in the sample package.
Do you understand what I mean?
 
sasank manohar
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
david, i didnot deploy this. i am not using any container, as it internally uses spring container.

yes, i understood kengkaj , i changed the code to this



but i am still getting the following error




is my dtd ok? i think nothing concerned about dtd coming in error right?
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The bean definition requires the fully-qualified class name of the implementation: you left off the package.
 
sasank manohar
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you all, its working.

in DemoClient.java,




in Demo.xml file,




the above are the changes , i have made.and the code worked. now, i can carryon with my quest with springs. thank you.>
 
Hong Anderson
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Congrats. Thanks for the update.
 
My honeysuckle is blooming this year! Now to fertilize this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic