Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] XOM problem with servlets

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: luca passani <passani AT eunet.no>
  • To: xom <xom-interest AT lists.ibiblio.org>
  • Subject: [XOM-interest] XOM problem with servlets
  • Date: Mon, 07 Apr 2003 23:39:03 +0200

Elliotte,

I am working on the WURFL library. What I see is that while I can use XOM
no problem in a command line test application, I get an error when I start the parsing
from within a servlet:

Here is the servlet line that gives a problem,
UAManager uam = ObjectsManager.getUAManagerInstance();

which invokes:

public static UAManager getUAManagerInstance() throws IOException {
synchronized (lock) {
if (wurflInstance==null)
wurflInstance = new Wurfl ();
if (UAManagerInstance==null)
UAManagerInstance = new UAManager(wurflInstance);
return UAManagerInstance;
}
}

which invokes:

Wurfl() throws IOException {
this("C:/temp/wurfl.xml");
}
which invokes:

Wurfl(String fileName) throws IOException {
try {
Builder parser = new Builder();
Document doc = parser.build(fileName);
//System.out.println("Wurfl: parsing "+ fileName + " succesful!");

//String rootname = root.getLocalName();
//System.out.print(rootname);
Element root = doc.getRootElement();
Element devices_elem = root.getFirstChildElement("devices");
:

here is the error I get. Any idea? thank you -luca

java.net.MalformedURLException: unknown protocol: c
at java.net.URL.(URL.java:586)
at java.net.URL.(URL.java:476)
at java.net.URL.(URL.java:425)
at
org.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.java:807)
at
org.apache.xerces.impl.XMLEntityManager.startDocumentEntity(XMLEntityManager.java:753)
at
org.apache.xerces.impl.XMLDocumentScannerImpl.setInputSource(XMLDocumentScannerImpl.java:260)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:499)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1175)
at nu.xom.Builder.build(Builder.java:550)
at nu.xom.Builder.build(Builder.java:347)
at it.passani.wurflapi.Wurfl.(Wurfl.java:46)
at it.passani.wurflapi.Wurfl.(Wurfl.java:99)
at
it.passani.wurflapi.ObjectsManager.getUAManagerInstance(ObjectsManager.java:45)






Archive powered by MHonArc 2.6.24.

Top of Page