[jdom-interest] JDom and Java 1.4 problem

Curtis Fornadley curtisf at library.ucla.edu
Thu Jun 13 09:34:39 PDT 2002


Hi
I have set Jrun to use Java 1.4.  A program using JDOM now gives this 
error:

java.lang.NullPointerException
	at org.jdom.output.XMLOutputter.output(XMLOutputter.java:787)

Here is some code. The XSLTranform runs the error occurs when the 
outputter is called.

	    // get this from a database as XML
	    org.jdom.Document jDocXml = 
		coreDB.getFullText(strDocID,conn);

	    //send this with XSLT to parser to produce HTML
            XSLTransform xslTransform = new XSLTransform(xsltURL);
            org.jdom.Document jDocHTML = xslTransform.buildHTML(jDocXml);

            response.setContentType("text/html; charset=UTF-8");
            PrintWriter out = new PrintWriter (response.getWriter());
            try {
              //org.jdom.Document jDoc = oaiDataProvider.getRecordXML();
              XMLOutputter outputter = new XMLOutputter("   ", true, "UTF-8");
              outputter.output(jDocHTML, out);
            } catch (IOException e){
              System.out.println("GetRecord JDOM IO Except: " + e);
            }

Any Ideas?
bye

Curtis Fornadley
310.206.9782
Fax: 310.206.5337




More information about the jdom-interest mailing list