Bug 6933 - getParser() NullPointer Problem in Code
Summary: getParser() NullPointer Problem in Code
Status: CLOSED INVALID
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: pdf (show other bugs)
Version: 0.20.1
Hardware: PC All
: P3 blocker
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-06 20:25 UTC by Drew.Felder
Modified: 2012-04-01 13:49 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Drew.Felder 2002-03-06 20:25:05 UTC
When I try to get to use the getParser in the Fop InputHandler method it is 
throwing a null pointer somewhere in this method I believe.  This is preventing 
it from generating the pdf.  I used this code on the command line app which 
worked, but when embedding it in a java application it gets hung up at this 
point.  The version of fop being used is 0.20.1 .

//render as pdf
			 driver = new Driver();
			 driver.setRenderer(Driver.RENDER_PDF);

			 		
             //get xml file created
			 file_XML = new File(getFileLocation(XMLEXT));

             //set where userconfig.xml is located
			 Options op = new Options();
			 op.loadUserconfiguration("C:\\apachedev\\Fop-0.20.1
\\conf\\userconfig.xml");

             //get xsl file
			 file_XSLT = new File(getFileLocation(XSLEXT));

             //create the pdf
			 inputHandler = new XSLTInputHandler(file_XML, 
file_XSLT);

			 parser = inputHandler.getParser();

			 driver.setOutputStream(new FileOutputStream
(getFileLocation(PDFEXT)));

			 driver.render(parser, inputHandler.getInputSource());
Comment 1 J.Pietschmann 2002-04-22 09:20:04 UTC
The most probably reason is that there is no SAX compatible
parser in the classpath. This is a deployment/classpath problem,
not with FOP.
Comment 2 J.Pietschmann 2002-04-22 19:35:54 UTC
Most likely reason changed: It is probably a problem in the style sheet.
Xalan-2.0.0 has the nasty habit of throwing NPE for certain stylesheet
problems, in particular undeclared namespaces (there are others). This
does not rule out other problems.
Comment 3 Glenn Adams 2012-04-01 13:49:09 UTC
batch transition to closed remaining pre-FOP1.0 resolved bugs