[jdom-interest] Base vs. Relative URI?

Steve Beech JBeech at dmu.ac.uk
Mon Mar 11 01:26:09 PST 2002

Dear All,

I'm running a server app and using JDOM to parse my configuration file. This
works fine from inside my IDE but when I try to run from the command line I
get the following error:

Exception in thread "main" java.io.IOException: Error on line 2: Relative
URI "C:\User_Manager\UM_config.dtd"; can not be resolved without a base URI.
        at User_Manager.UM_configuration.<init>(UM_configuration.java:49)
        at User_Manager.UM_configuration.<init>(UM_configuration.java:40)
        at User_Manager.UM_multiServer.main(UM_multiServer.java:35)

My xml config file contains the following dtd reference:

<?xml version="1.0"?>
<!DOCTYPE angel:um_config SYSTEM "c:\User_Manager\UM_config.dtd">

In my code I create a validating SAXBuilder using:

	SAXBuilder builder = new SAXBuilder(true);
	System.out.println("SAXBuilder created ok");
	Document doc = builder.build(in);

I get the 'SAXBuilder created ok' message but the doc never gets built.

The URI given appears to me to be a base URI and not relative - so does
anyone know why I might be getting this error?

Thanks in advance,

Steve Beech

More information about the jdom-interest mailing list