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 Eric Douglas <ed...@blockhouse.com> on 2011/10/19 16:46:57 UTC
Example crash
What am I missing?
I downloaded fop.jar from yesterday's snapshot and ran the example
program at
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/examples/embedding/ja
va/embedding/ExampleJava2D2PDF.java?view=markup
It crashed.
Stack trace shows:
java.lang.NullPointerException
at
org.apache.fop.svg.PDFGraphics2D.getString(PDFGraphics2D.java:290)
at
org.apache.fop.svg.PDFDocumentGraphics2D.closePage(PDFDocumentGraphics2D
.java:262)
at
org.apache.fop.svg.PDFDocumentGraphics2D.finish(PDFDocumentGraphics2D.ja
va:360)
RE: Example crash
Posted by Eric Douglas <ed...@blockhouse.com>.
It appears that test may be hiding the error.
I tried putting your main test logic into a test program I had already
created.
Now I tried creating a new class to put that directly into the main
method and I get this crash on test.
Exception in thread "main" java.lang.NoSuchMethodError:
org.apache.fop.render.PrintRendererConfigurator.buildFontListFromConfigu
ration(Lorg/apache/avalon/framework/configuration/Configuration;Ljava/la
ng/String;Lorg/apache/fop/fonts/FontResolver;ZLorg/apache/fop/fonts/Font
Cache;)Ljava/util/List;
at
org.apache.fop.svg.PDFDocumentGraphics2DConfigurator.configure(PDFDocume
ntGraphics2DConfigurator.java:56)
>From that statement
configurator.configure(g2d, cfg);
-----Original Message-----
From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
Sent: Wednesday, October 19, 2011 4:34 PM
To: fop-dev@xmlgraphics.apache.org
Subject: Re: Example crash
Works fine for me. Getting no error message is hard to believe since the
whole program is in a try..catch(Throwable t). Nothing but a JVM crash
gets around that. All assuming, of course, that you didn't change the
example program.
My console output looks like this:
FOP ExampleJava2D2PDF
Preparing...
Output: PDF (.\out\ResultJava2D2PDF.pdf)
Generating...
Success!
On 19.10.2011 22:19:35 Eric Douglas wrote:
> I found the incorrect build path reference. Now it just doesn't
finish.
> It gets to that statement:
> configurator.configure(g2d, cfg);
> Then doesn't appear to be doing anything.
> It keeps running back to the call:
> configure(g2d, createAutoFontsConfiguration()); Then jumps right to
> the finally block, then doesn't execute anything after the finally
> block.
> No error message, it just doesn't work.
>
>
> -----Original Message-----
> From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
> Sent: Wednesday, October 19, 2011 12:29 PM
> To: fop-dev@xmlgraphics.apache.org
> Subject: Re: Example crash
>
> There must be something off. Last change to PDFGraphics2D was on
> 2011-10-15. And in current Trunk the NPE in getString (if any) would
> have to happen on line 297, not 290. I'm pretty sure you've still go a
> FOP 1.0 JAR in the classpath or something like that. Please check your
> classpath.
>
> On 19.10.2011 16:46:57 Eric Douglas wrote:
> > What am I missing?
> > I downloaded fop.jar from yesterday's snapshot and ran the example
> > program at
> > http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/examples/embeddin
> > g/ ja va/embedding/ExampleJava2D2PDF.java?view=markup
> > It crashed.
> > Stack trace shows:
> > java.lang.NullPointerException
> > at
> > org.apache.fop.svg.PDFGraphics2D.getString(PDFGraphics2D.java:290)
> > at
> > org.apache.fop.svg.PDFDocumentGraphics2D.closePage(PDFDocumentGraphi
> > cs
> > 2D
> > .java:262)
> > at
> >
org.apache.fop.svg.PDFDocumentGraphics2D.finish(PDFDocumentGraphics2D.
> > ja
> > va:360)
>
>
>
>
> Jeremias Maerki
>
Jeremias Maerki
Re: Example crash
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Works fine for me. Getting no error message is hard to believe since the
whole program is in a try..catch(Throwable t). Nothing but a JVM crash
gets around that. All assuming, of course, that you didn't change the
example program.
My console output looks like this:
FOP ExampleJava2D2PDF
Preparing...
Output: PDF (.\out\ResultJava2D2PDF.pdf)
Generating...
Success!
On 19.10.2011 22:19:35 Eric Douglas wrote:
> I found the incorrect build path reference. Now it just doesn't finish.
> It gets to that statement:
> configurator.configure(g2d, cfg);
> Then doesn't appear to be doing anything.
> It keeps running back to the call:
> configure(g2d, createAutoFontsConfiguration());
> Then jumps right to the finally block, then doesn't execute anything
> after the finally block.
> No error message, it just doesn't work.
>
>
> -----Original Message-----
> From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
> Sent: Wednesday, October 19, 2011 12:29 PM
> To: fop-dev@xmlgraphics.apache.org
> Subject: Re: Example crash
>
> There must be something off. Last change to PDFGraphics2D was on
> 2011-10-15. And in current Trunk the NPE in getString (if any) would
> have to happen on line 297, not 290. I'm pretty sure you've still go a
> FOP 1.0 JAR in the classpath or something like that. Please check your
> classpath.
>
> On 19.10.2011 16:46:57 Eric Douglas wrote:
> > What am I missing?
> > I downloaded fop.jar from yesterday's snapshot and ran the example
> > program at
> > http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/examples/embedding/
> > ja va/embedding/ExampleJava2D2PDF.java?view=markup
> > It crashed.
> > Stack trace shows:
> > java.lang.NullPointerException
> > at
> > org.apache.fop.svg.PDFGraphics2D.getString(PDFGraphics2D.java:290)
> > at
> > org.apache.fop.svg.PDFDocumentGraphics2D.closePage(PDFDocumentGraphics
> > 2D
> > .java:262)
> > at
> > org.apache.fop.svg.PDFDocumentGraphics2D.finish(PDFDocumentGraphics2D.
> > ja
> > va:360)
>
>
>
>
> Jeremias Maerki
>
Jeremias Maerki
RE: Example crash
Posted by Eric Douglas <ed...@blockhouse.com>.
I found the incorrect build path reference. Now it just doesn't finish.
It gets to that statement:
configurator.configure(g2d, cfg);
Then doesn't appear to be doing anything.
It keeps running back to the call:
configure(g2d, createAutoFontsConfiguration());
Then jumps right to the finally block, then doesn't execute anything
after the finally block.
No error message, it just doesn't work.
-----Original Message-----
From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
Sent: Wednesday, October 19, 2011 12:29 PM
To: fop-dev@xmlgraphics.apache.org
Subject: Re: Example crash
There must be something off. Last change to PDFGraphics2D was on
2011-10-15. And in current Trunk the NPE in getString (if any) would
have to happen on line 297, not 290. I'm pretty sure you've still go a
FOP 1.0 JAR in the classpath or something like that. Please check your
classpath.
On 19.10.2011 16:46:57 Eric Douglas wrote:
> What am I missing?
> I downloaded fop.jar from yesterday's snapshot and ran the example
> program at
> http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/examples/embedding/
> ja va/embedding/ExampleJava2D2PDF.java?view=markup
> It crashed.
> Stack trace shows:
> java.lang.NullPointerException
> at
> org.apache.fop.svg.PDFGraphics2D.getString(PDFGraphics2D.java:290)
> at
> org.apache.fop.svg.PDFDocumentGraphics2D.closePage(PDFDocumentGraphics
> 2D
> .java:262)
> at
> org.apache.fop.svg.PDFDocumentGraphics2D.finish(PDFDocumentGraphics2D.
> ja
> va:360)
Jeremias Maerki
Re: Example crash
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
There must be something off. Last change to PDFGraphics2D was on
2011-10-15. And in current Trunk the NPE in getString (if any) would
have to happen on line 297, not 290. I'm pretty sure you've still go a
FOP 1.0 JAR in the classpath or something like that. Please check your
classpath.
On 19.10.2011 16:46:57 Eric Douglas wrote:
> What am I missing?
> I downloaded fop.jar from yesterday's snapshot and ran the example
> program at
> http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/examples/embedding/ja
> va/embedding/ExampleJava2D2PDF.java?view=markup
> It crashed.
> Stack trace shows:
> java.lang.NullPointerException
> at
> org.apache.fop.svg.PDFGraphics2D.getString(PDFGraphics2D.java:290)
> at
> org.apache.fop.svg.PDFDocumentGraphics2D.closePage(PDFDocumentGraphics2D
> .java:262)
> at
> org.apache.fop.svg.PDFDocumentGraphics2D.finish(PDFDocumentGraphics2D.ja
> va:360)
Jeremias Maerki