You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Kevin O'Neill <ke...@rocketred.com.au> on 2002/07/30 02:07:17 UTC

Getting the tests to run

Help :),

I'm trying to get build test target to run, but I get a
NullPointerException when each time the driver is created.

  [runTest] java.lang.NullPointerException
  [runTest]     at
org.apache.fop.apps.Driver.getContentHandler(Driver.java:461)
  [runTest]     at org.apache.fop.apps.Driver.render(Driver.java:474)
  [runTest]     at
org.apache.fop.tools.TestConverter.runTest(TestConverter.java:252)

The offending line (461) in
org.apache.fop.apps.Driver.getContentHandler()
contains

_treeBuilder.setLogger(getLogger());

Can someone shed some light my way?

-k.




---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: Getting the tests to run

Posted by Keiron Liddle <ke...@aftexsw.com>.
On Tue, 2002-07-30 at 06:53, Peter Kullmann wrote:
> If you are using the MAIN branch there's one thing that could help:
> 
> in org.apache.fop.tools.TestConverter.java the following line 232 is
> missing in the cvs revision 1.18 (i.e. the driver isn't initialized):
> 
>      226             XMLReader parser = inputHandler.getParser();
>      227             setParserFeatures(parser);
>      228 
>      229             Logger logger = log.getChildLogger("fop");
>      230             Driver driver = new Driver();
>      231             driver.setLogger(logger);
>      232             driver.initialize();
>      233             if (outputPDF) {
>      234                 driver.setRenderer(Driver.RENDER_PDF);
>      235             } else {
>      236                 driver.setRenderer(Driver.RENDER_XML);
>      237             }
>      238 
> 
> With this I did manage to run the test/createpdf.sh. I didn't mange to
> run the test target in build.xml, though.
> 
> Besides: The fo files in test/xml/bugtests and others are not always in
> the correct fo version, i.e. they use <fo:page-sequence
> master-name="simplePM"> instead of <fo:page-sequence
> master-reference="simplePM">.

Thanks for the pointers, these issues should be fixed.

> Peter



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: Getting the tests to run

Posted by Peter Kullmann <p....@arenae.ch>.
If you are using the MAIN branch there's one thing that could help:

in org.apache.fop.tools.TestConverter.java the following line 232 is
missing in the cvs revision 1.18 (i.e. the driver isn't initialized):

     226             XMLReader parser = inputHandler.getParser();
     227             setParserFeatures(parser);
     228 
     229             Logger logger = log.getChildLogger("fop");
     230             Driver driver = new Driver();
     231             driver.setLogger(logger);
     232             driver.initialize();
     233             if (outputPDF) {
     234                 driver.setRenderer(Driver.RENDER_PDF);
     235             } else {
     236                 driver.setRenderer(Driver.RENDER_XML);
     237             }
     238 

With this I did manage to run the test/createpdf.sh. I didn't mange to
run the test target in build.xml, though.

Besides: The fo files in test/xml/bugtests and others are not always in
the correct fo version, i.e. they use <fo:page-sequence
master-name="simplePM"> instead of <fo:page-sequence
master-reference="simplePM">.

Peter

On Tue, 2002-07-30 at 02:07, Kevin O'Neill wrote:
> Help :),
> 
> I'm trying to get build test target to run, but I get a
> NullPointerException when each time the driver is created.
> 
>   [runTest] java.lang.NullPointerException
>   [runTest]     at
> org.apache.fop.apps.Driver.getContentHandler(Driver.java:461)
>   [runTest]     at org.apache.fop.apps.Driver.render(Driver.java:474)
>   [runTest]     at
> org.apache.fop.tools.TestConverter.runTest(TestConverter.java:252)
> 
> The offending line (461) in
> org.apache.fop.apps.Driver.getContentHandler()
> contains
> 
> _treeBuilder.setLogger(getLogger());
> 
> Can someone shed some light my way?
> 
> -k.
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org