Announcement Announcement Module
Collapse
No announcement yet.
Missing base URI when parsing ClassPathXmlApplicationContext Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Missing base URI when parsing ClassPathXmlApplicationContext

    Hi,

    I'm using two application contexts while developing: one specified in web.xml for the web application and another one for standalone testing. Both use different data sources but the same DAO bean definitions.

    That's why I tried to put these DAO beans into one separate XML file (an external parsed entity) and wrote my application contexts like this:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC 
    "-//SPRING//DTD BEAN//EN" "http&#58;//www.springframework.org/dtd/spring-beans.dtd"
    &#91;
    <!ENTITY context-base SYSTEM "applicationContext-base.xml">
    &#93;>
    
    <beans>
    
    <!-- data source bean goes here -->
    
    
    &context-base;
    
    </beans>
    The problem is that the included applicationContext-base.xml won't be found because there's no base URI set when parsing the above file. A similar error happens with the web version of my context.

    (I'm still using Spring 1.1.1)

    Am I missing something?
    Thanks,
    Oliver

  • #2
    I've just encountered that Spring 1.1.2 provides an <import> element. That does the job.

    Oliver

    Comment

    Working...
    X