[jdom-interest] JDom and Java 1.4 problem

Nott, Matthias mnott at vignette.com
Thu Jun 13 11:09:38 PDT 2002


off topic, but I made something similar these days - why
do you use an XMLOutputter to output things you've apparently
converted to HTML just before? you could perhaps just out.println.

M

-----Original Message-----
From: Curtis Fornadley [mailto:curtisf at library.ucla.edu]
Sent: Thursday, June 13, 2002 6:35 PM
To: jdom-interest at jdom.org
Subject: [jdom-interest] JDom and Java 1.4 problem


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

_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
t.com



More information about the jdom-interest mailing list