Announcement Announcement Module
No announcement yet.
Tests can't find schemas Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Tests can't find schemas

    I work behind a firewall. I have proxies defined in my browser and Eclipse, which are ok.

    I'm trying to build a unit test using SpringJUnit4ClassRunner. I managed to get it to start loading the application context, but it fails when it tries to load schemas referenced in the application context. I've tried running the test directly from maven on the command line, and also executing the test class in Eclipse. At least it fails the same way using both strategies.

    If it matters, here's an excerpt from the log:
    [main] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [applicationContext.xml]
    [main] WARN org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Ignored XML validation warning
    org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document '', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
    I must be missing something simple.

    I've verified that there is a valid schema there. I can get to it both from my browser and my command line. I have proxy settings in both.

    Here are the annotations I've put on the test class:

  • #2
    I guess this must be a Maven Surefire problem. I've tried to set the proxy in Surefire, but it's not working. I'm pursuing this on another forum.