Announcement Announcement Module
Collapse
No announcement yet.
Bug? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bug?

    I have two bean definition files: datasource_beans.xml and app_beans.xml
    and I place these file names in the web.xml file and start web app
    server, it works fine.

    But, when I place the code in the program for junit testing, I got the
    errors:

    org.springframework.beans.factory.BeanDefinitionSt oreException: Line 68
    in XML document from file
    [C:\devel\webapps\awards\WEB-INF\app_beans.xml] is invalid; nested
    exception is org.xml.sax.SAXParseException: An element with the
    identifier "dataSource" must appear in the document.
    java.lang.NullPointerException
    org.springframework.beans.factory.BeanDefinitionSt oreException: Line 68
    in XML document from file
    [C:\devel\webapps\awards\WEB-INF\app_beans.xml] is invalid; nested
    exception is org.xml.sax.SAXParseException: An element with the
    identifier "dataSource" must appear in the document.

    Here is my code:

    org.springframework.context.ApplicationContext ctx = null;
    String[] paths = {"/WEB-INF/datasource_beans.xml",
    "/WEB-INF/app_beans.xml"};
    ctx = new FileSystemXmlApplicationContext(paths);

    why?

    -Henry

  • #2
    I guess the question should be posted in the 'Core Container' section.

    Comment

    Working...
    X