Skip to Content.
Sympa Menu

xom-interest - Re: [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: Nils_Kilden-Pedersen AT Countrywide.Com
  • To: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] XOM problem with servlets
  • Date: Mon, 7 Apr 2003 14:50:30 -0700

Shouldn't you filename be:
"file://C:/temp/wurfl.xml" ?
It believes that c: is the protocol.





"luca passani" <passani AT eunet.no>
Sent by: xom-interest-bounces AT lists.ibiblio.org
04/07/2003 02:39 PM


To: xom <xom-interest AT lists.ibiblio.org>
cc:
Subject: [XOM-interest] XOM problem with servlets


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)



_______________________________________________
XOM-interest mailing list
XOM-interest AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/xom-interest








Archive powered by MHonArc 2.6.24.

Top of Page