You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "David P. Nesbitt" <da...@yahoo.com> on 2005/06/21 08:49:14 UTC

LazyFont null pointer exception

Has anyone ever seen this exception?  Once we get this
exception, it seems we have to restart our application
container (JBoss) to remedy the problem.  The issue
seems intermittent at this point.  We get PDF files
for a while with no problem and then for no particular
reason we seem to get this exception.

Any help is greatly appreciated.

Regards,
Dave

	at
org.apache.fop.render.pdf.fonts.LazyFont.getAscender(LazyFont.java:127)
	at
org.apache.fop.layout.FontState.getAscender(FontState.java:143)
	at
org.apache.fop.layout.LineArea.<init>(LineArea.java:326)
	at
org.apache.fop.layout.BlockArea.getCurrentLineArea(BlockArea.java:164)
	at
org.apache.fop.fo.FOText.addRealText(FOText.java:263)
	at org.apache.fop.fo.FOText.addText(FOText.java:252)
	at org.apache.fop.fo.FOText.layout(FOText.java:161)
	at
org.apache.fop.fo.flow.Block.layout(Block.java:257)
	at
org.apache.fop.fo.flow.TableCell.layout(TableCell.java:326)
	at
org.apache.fop.fo.flow.TableRow.layout(TableRow.java:360)
	at
org.apache.fop.fo.flow.AbstractTableBody.layout(AbstractTableBody.java:236)
	at
org.apache.fop.fo.flow.Table.layout(Table.java:282)
	at
org.apache.fop.fo.flow.Block.layout(Block.java:257)
	at
org.apache.fop.fo.flow.AbstractFlow.layout(AbstractFlow.java:154)
	at
org.apache.fop.fo.flow.AbstractFlow.layout(AbstractFlow.java:110)
	at
org.apache.fop.fo.pagination.PageSequence.makePage(PageSequence.java:400)
	at
org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:338)
	at
org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:262)
	at
org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:223)
	at
org.apache.xalan.transformer.ResultTreeHandler.endElement(ResultTreeHandler.java:309)
	at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:716)
	at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2339)
	at
org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:435)
	at
org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:273)
	at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2339)
	at
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2160)
	at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1213)
	at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:668)
	at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1129)
	at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1107)



		
____________________________________________________ 
Yahoo! Sports 
Rekindle the Rivalries. Sign up for Fantasy Football 
http://football.fantasysports.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: LazyFont null pointer exception

Posted by "David P. Nesbitt" <da...@yahoo.com>.
Jeremias,

Thanks for your help.

It turns out this is a JBoss 3.2.6 issue.  There seems
to be no way to isolate the classloaders for two
different applications (ear files) on this version of
JBoss.  Since each application uses and initializes
FOP, the last one to initialize clobbers the first
one's initialization (even though the FOP jar is
contained in each ear file).  So it is not an FOP
issue at all.

I do thank you and J. for your assistance in tracking
down this issue.

Regards,
Dave


--- Jeremias Maerki <de...@greenmail.ch> wrote:

> Some people instantiate the Options class each time
> they run FOP
> although once would be totally sufficient since the
> configuration is
> handled through static variables (not very
> beautiful, we know, but we
> have to live with it for another few months). Now,
> if the configuration
> is set up while FOP is running in another thread, I
> can imagine that
> nasty things might happen.
> 
> See also:
>
http://xml.apache.org/fop/embedding.html#multithreading
> 
> On 22.06.2005 01:27:24 David P. Nesbitt wrote:
> > J,
> > 
> > Probably not.  How would you suggest doing it?
> > 
> > Regards,
> > Dave
> > 
> > --- "J.Pietschmann" <j3...@yahoo.de> wrote:
> > 
> > > David P. Nesbitt wrote:
> > > > Has anyone ever seen this exception?  Once we
> get
> > > this
> > > > exception, it seems we have to restart our
> > > application
> > > > container (JBoss) to remedy the problem.  The
> > > issue
> > > > seems intermittent at this point.  We get PDF
> > > files
> > > > for a while with no problem and then for no
> > > particular
> > > > reason we seem to get this exception.
> > > ...
> > > >
> > >
> >
>
org.apache.fop.render.pdf.fonts.LazyFont.getAscender(LazyFont.java:127)
> > > 
> > > It seems you have intermittent problems getting
> at
> > > the font metrics
> > > file, probably due to a problem with the font
> base
> > > URL. I'd suspect
> > > a multithreading problem. Do you set the FOP
> user
> > > configuration in
> > > a MT safe way?
> > > 
> > > J.Pietschmann
> 
> 
> Jeremias Maerki
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail:
> fop-users-help@xmlgraphics.apache.org
> 
> 



		
____________________________________________________ 
Yahoo! Sports 
Rekindle the Rivalries. Sign up for Fantasy Football 
http://football.fantasysports.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: LazyFont null pointer exception

Posted by Jeremias Maerki <de...@greenmail.ch>.
Some people instantiate the Options class each time they run FOP
although once would be totally sufficient since the configuration is
handled through static variables (not very beautiful, we know, but we
have to live with it for another few months). Now, if the configuration
is set up while FOP is running in another thread, I can imagine that
nasty things might happen.

See also: http://xml.apache.org/fop/embedding.html#multithreading

On 22.06.2005 01:27:24 David P. Nesbitt wrote:
> J,
> 
> Probably not.  How would you suggest doing it?
> 
> Regards,
> Dave
> 
> --- "J.Pietschmann" <j3...@yahoo.de> wrote:
> 
> > David P. Nesbitt wrote:
> > > Has anyone ever seen this exception?  Once we get
> > this
> > > exception, it seems we have to restart our
> > application
> > > container (JBoss) to remedy the problem.  The
> > issue
> > > seems intermittent at this point.  We get PDF
> > files
> > > for a while with no problem and then for no
> > particular
> > > reason we seem to get this exception.
> > ...
> > >
> >
> org.apache.fop.render.pdf.fonts.LazyFont.getAscender(LazyFont.java:127)
> > 
> > It seems you have intermittent problems getting at
> > the font metrics
> > file, probably due to a problem with the font base
> > URL. I'd suspect
> > a multithreading problem. Do you set the FOP user
> > configuration in
> > a MT safe way?
> > 
> > J.Pietschmann


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: LazyFont null pointer exception

Posted by "David P. Nesbitt" <da...@yahoo.com>.
J,

Probably not.  How would you suggest doing it?

Regards,
Dave

--- "J.Pietschmann" <j3...@yahoo.de> wrote:

> David P. Nesbitt wrote:
> > Has anyone ever seen this exception?  Once we get
> this
> > exception, it seems we have to restart our
> application
> > container (JBoss) to remedy the problem.  The
> issue
> > seems intermittent at this point.  We get PDF
> files
> > for a while with no problem and then for no
> particular
> > reason we seem to get this exception.
> ...
> >
>
org.apache.fop.render.pdf.fonts.LazyFont.getAscender(LazyFont.java:127)
> 
> It seems you have intermittent problems getting at
> the font metrics
> file, probably due to a problem with the font base
> URL. I'd suspect
> a multithreading problem. Do you set the FOP user
> configuration in
> a MT safe way?
> 
> J.Pietschmann
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail:
> fop-users-help@xmlgraphics.apache.org
> 
> 



		
____________________________________________________ 
Yahoo! Sports 
Rekindle the Rivalries. Sign up for Fantasy Football 
http://football.fantasysports.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: LazyFont null pointer exception

Posted by "J.Pietschmann" <j3...@yahoo.de>.
David P. Nesbitt wrote:
> Has anyone ever seen this exception?  Once we get this
> exception, it seems we have to restart our application
> container (JBoss) to remedy the problem.  The issue
> seems intermittent at this point.  We get PDF files
> for a while with no problem and then for no particular
> reason we seem to get this exception.
...
> org.apache.fop.render.pdf.fonts.LazyFont.getAscender(LazyFont.java:127)

It seems you have intermittent problems getting at the font metrics
file, probably due to a problem with the font base URL. I'd suspect
a multithreading problem. Do you set the FOP user configuration in
a MT safe way?

J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org