[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
java.lang.NullPointerException
- From: Alexey Skoblikov <lesha@parameter.spb.ru>
- To: xml-dev <xml-dev@lists.xml.org>
- Date: Tue, 31 Jul 2001 13:50:07 +0400
Dear colleagues. I am a newbie.
I hope to be helped here. My java-code doesn't work.
public class XGLanls {
public void analyse(String filename) {
try {
File f = new File(filename);
InputSource is = new InputSource(f.toURL().toString());
HandlerBase h = new MyHandler();
Parser p = ParserFactory.makeParser("org.apache.xerces.parsers.SAXParser");
p.setDocumentHandler(h);
p.setErrorHandler(h);
p.parse(is);
} catch (Exception e) {
e.printStackTrace(System.err);
}
}
}
It gives the exception
java.lang.NullPointerException
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1094)
at com.wolf.tra.xglanls.XGLanls.analyse(XGLanls.java:32)