File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

class path resource [spring xml file] cannot be opened

 
sasank manohar
Ranch Hand
Posts: 186
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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 .
 
Hong Anderson
Ranch Hand
Posts: 1936
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried "sample/demo.xml"?
 
sasank manohar
Ranch Hand
Posts: 186
  • 0
  • Mark post as helpful
  • send pies
  • 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
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it being deployed?
 
Hong Anderson
Ranch Hand
Posts: 1936
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congrats. Thanks for the update.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic