Andreas,

I think it's better to use the URI class to capture the location of your
file, get an InputStream from that and then pass the InputStream to the
parser rather than letting the parser find the file.  The URI class will
definitely work on different operating systems.

By the way, I would recommend that you use either JAXP or the latest SAX2
XMLReader.  You appear to be using deprecated APIs.

-Mark

-----Original Message-----
From: Andreas Wenger [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 01, 2006 8:13 AM
To: dom4j-user@lists.sourceforge.net
Subject: [dom4j-user] Error: Absolute URL required with null context


Hi!


First I have to say, that DOM4J is really great and I love it. I had 
never any problems with it!
But now somebody reported a problem with my program under linux. The log:

:26:46 ERROR   com.xenoage.bp2k6.util.language.Language threw an 
exception: Absolute URL required with null context: 
data/config/language.xml Nested exception: Absolute URL required with 
null context: data/config/language.xml
Stack Trace:
org.dom4j.DocumentException: Absolute URL required with null context: 
data/config/language.xml Nested exception: Absolute URL required with 
null context: data/config/language.xml
   at org.dom4j.io.SAXReader.read(SAXReader.java:484)
   at org.dom4j.io.SAXReader.read(SAXReader.java:321)
   at com.xenoage.bp2k6.util.ConfigFile.<init>(ConfigFile.java:51)
[...]

Everything I do is:
Document document = reader.read("data/config/language.xml");

It is called from the right path ("data/config/language.xml" really is 
in that subfolder). I could not find anything with Google's help... Any 
idea?

Thanks!


Andi


_______________________________________________
dom4j-user mailing list
dom4j-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dom4j-user


_______________________________________________
dom4j-user mailing list
dom4j-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to