1 Reply Latest reply on Apr 21, 2003 6:36 PM by ctaggart

    DTD can not be resolved without a base URI

    ctaggart

      I am able to deploy a .war file to various other containers like Tomcat without getting this error. I believe it is specefic to JBoss.

      2003-04-21 15:12:45,822 ERROR [org.jboss.web.localhost.Engine] ERROR: Error on line 2: Relative URI "an-application.dtd"; can not be resolved without a base URI.
      org.jdom.JDOMException: Error on line 2: Relative URI "an-application.dtd"; can not be resolved without a base URI.
      at org.jdom.input.SAXBuilder.build(SAXBuilder.java:367)

      ...

      Caused by: org.xml.sax.SAXParseException: Relative URI "an-application.dtd"; can not be resolved without a base URI.
      at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3182)


      I receive this error with JBoss with both Jetty and Tomcat on JBoss 3.0.4 and 3.2.0. Does JBoss 3.2.0 even use crimson anymore?

      Is JBoss trying to validate the xml file against the DTD? If so, is there anyway to keep it from doing so?

        • 1. Re: DTD can not be resolved without a base URI
          ctaggart

          I received the same error with a different xml file late last week. As a work-a-round, I modified the header as follows:

          from:

          <?xml version="1.0" encoding="UTF-8"?>
          <!DOCTYPE AnApplication SYSTEM "an-application.dtd">

          to:

          <?xml version="1.0" encoding="UTF-8"?>
          <!DOCTYPE AnApplication SYSTEM "http://www.an-application.com/an-application.dtd">

          I didn't receive any errors after I added that prefix. Unfortunately, I can't modify the new XML file I am working with.

          Does JBoss turn on XML validation somewhere?