Announcement Announcement Module
Collapse
No announcement yet.
Eclipse Plugin Dev and loading AppContext - problem1 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Eclipse Plugin Dev and loading AppContext - problem1

    I am developing a standalone application using eclipse as a rich client.
    I tried many ways to load my application context .xml file, but could only succeed using FileSystemXmlApplicationContext, with which I have to use the whole filesystem path as input : "e:/workspace/com/xyz/myapplication/appContext.xml"

    If I use
    Code:
    ClassPathResource res = new ClassPathResource("appContext.xml");
    XmlBeanFactory factory = new XmlBeanFactory(res);
    the error is:
    java.io.FileNotFoundException: Could not open class path resource [appContext.xml]

    Same thing happens even if I state the whole classpath:
    Code:
    ClassPathResource res = new ClassPathResource("com/xyz/myapplication/appContext.xml");
    XmlBeanFactory factory = new XmlBeanFactory(res);
    the error is:
    java.io.FileNotFoundException: Could not open class path resource [com/xyz/myapplication/appContext.xml]

    Please help!!

  • #2
    It seems that you are not alone with your classloader issues while using Spring within Eclipse :-(

    Maybe you can find help in one of the other forums, e.g. http://forum.springframework.org/showthread.php?t=9581 or http://forum.springframework.org/showthread.php?t=9850

    Spring IDE uses spring-core.jar only for parsing the Spring beans config files. No beans are instantiated - so no bean classloading happens in Spring IDE. Sorry, can't help with Eclipse classloading issues.

    Cheers,
    Torsten
    Last edited by robyn; May 14th, 2006, 11:25 AM.

    Comment

    Working...
    X