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 Eric Vought <ev...@pobox.com> on 2007/04/10 00:47:23 UTC
IndexOutOfBoundsException Help
I have a relatively large (~40 page) DocBook document I am converting
to FO using the XSL 1.72.0 stylesheets and then using FOP 0.93 to
produce PDF on Mac OS X with JDK 1.5.0. Suddenly, my build is failing
due to a FOP exception and I am having a hell of a time isolating
the specific fo input causing it.
I am getting the following errors:
[fop] Apr 9, 2007 5:11:09 PM org.apache.fop.cli.InputHandler
error
[fop] SEVERE: javax.xml.transform.TransformerException: Index:
14, Size: 12
javax.xml.transform.TransformerException:
java.lang.IndexOutOfBoundsException: Index: 14, Size: 12
I also have a warning:
[fop] WARNING: Line 1 of a paragraph overflows the available area.
(fo:block, location: 731/-1)
which I have had for days to no ill effect.
The various documents (the DocBook 4.5 input, the fo input to Fop)
all validate. I have no problem producing HTML from the same source.
I was able to produce PDF yesterday and added a large amount of
content in between. I build html most of the time and check the PDF
only periodically. I spent several hours commenting out parts of the
new content in the DocBook source to see what triggered the error.
I narrowed it down to one paragraph and the end of a line, no markup,
just text; it looked like FOP might have had trouble finding a good
point to break the line. This is not, however, at line 731 of the .fo
output (from the warning) or anywhere near it.
OK, now for the screwy part. I started removing other parts of the
document to trim it down to just the section causing the error--- and
it went away. I can remove any of several arbitrary sections of the
document (that have been there for days without issue) and the error
stops. I am having an extremely difficult time producing a small .fo
sample that causes the bug.
Any suggestions? How do I track this down?
Sincerely,
Eric Vought
There are four boxes in the defense of Liberty:
1) Soap Box
2) Ballot Box
3) Jury Box
4) Ammo Box
Use in that order.
Re: IndexOutOfBoundsException Help
Posted by HLeonardi <le...@free.fr>.
Hugues Leonardi wrote:
>
>
> I don't know if I can help you, but when you build your xsl-fo file, does
> your xsl stylesheet have this line:
> <xsl:output method="xml" indent="yes"/> ?
> Sometimes, if indent="yes", FOP produce this kind of error. Then, to fix
> it, I built a xsl-fo file not indented with indent="no"
>
> Perhaps, this tip will help you.
>
> Regards,
>
> Hugues Leonardi
>
Eric Vought wrote:
>
> I have a relatively large (~40 page) DocBook document I am converting
> to FO using the XSL 1.72.0 stylesheets and then using FOP 0.93 to
> produce PDF on Mac OS X with JDK 1.5.0. Suddenly, my build is failing
> due to a FOP exception and I am having a hell of a time isolating
> the specific fo input causing it.
>
> I am getting the following errors:
>
> [fop] Apr 9, 2007 5:11:09 PM org.apache.fop.cli.InputHandler
> error
> [fop] SEVERE: javax.xml.transform.TransformerException: Index:
> 14, Size: 12
>
> javax.xml.transform.TransformerException:
> java.lang.IndexOutOfBoundsException: Index: 14, Size: 12
>
> I also have a warning:
>
> [fop] WARNING: Line 1 of a paragraph overflows the available area.
> (fo:block, location: 731/-1)
>
> which I have had for days to no ill effect.
>
> The various documents (the DocBook 4.5 input, the fo input to Fop)
> all validate. I have no problem producing HTML from the same source.
> I was able to produce PDF yesterday and added a large amount of
> content in between. I build html most of the time and check the PDF
> only periodically. I spent several hours commenting out parts of the
> new content in the DocBook source to see what triggered the error.
>
> I narrowed it down to one paragraph and the end of a line, no markup,
> just text; it looked like FOP might have had trouble finding a good
> point to break the line. This is not, however, at line 731 of the .fo
> output (from the warning) or anywhere near it.
>
> OK, now for the screwy part. I started removing other parts of the
> document to trim it down to just the section causing the error--- and
> it went away. I can remove any of several arbitrary sections of the
> document (that have been there for days without issue) and the error
> stops. I am having an extremely difficult time producing a small .fo
> sample that causes the bug.
>
> Any suggestions? How do I track this down?
>
> Sincerely,
>
> Eric Vought
>
> There are four boxes in the defense of Liberty:
> 1) Soap Box
> 2) Ballot Box
> 3) Jury Box
> 4) Ammo Box
> Use in that order.
>
>
>
>
>
--
View this message in context: http://www.nabble.com/IndexOutOfBoundsException-Help-tf3550079.html#a10021105
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: IndexOutOfBoundsException Help
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Not necessarily. The IndexOutOfBoundsException might have bubbled up
through the XSLT processor while it sends FOP its SAX events.
Eric, please post the full stack trace (including nested exceptions).
That way, we can identify whether the problem is in FOP or in XSLT. At
any rate we will also need an FO file to reproduce the problem in case
the problem really lies in FOP.
On 10.04.2007 10:25:58 Pascal Sancho wrote:
> Hi,
>
> Your exception seems to occur during the XSLT transformation, before FOP
> does it job.
>
> You should have a look on your XSLT engine.
>
> Pascal
>
> > -----Message d'origine-----
> > De : Eric Vought [mailto:evought@pobox.com]
> > Envoye : mardi 10 avril 2007 00:47
> >
> > I have a relatively large (~40 page) DocBook document I am
> > converting to FO using the XSL 1.72.0 stylesheets and then
> > using FOP 0.93 to produce PDF on Mac OS X with JDK 1.5.0.
> > Suddenly, my build is failing due to a FOP exception and I am
> > having a hell of a time isolating the specific fo input causing it.
> >
> > I am getting the following errors:
> >
> > [fop] Apr 9, 2007 5:11:09 PM
> > org.apache.fop.cli.InputHandler error
> > [fop] SEVERE: javax.xml.transform.TransformerException:
> > Index: 14, Size: 12
> >
> > javax.xml.transform.TransformerException:
> > java.lang.IndexOutOfBoundsException: Index: 14, Size: 12
> >
> > I also have a warning:
> >
> > [fop] WARNING: Line 1 of a paragraph overflows the available
> > area. (fo:block, location: 731/-1)
> >
> > which I have had for days to no ill effect.
> >
> > The various documents (the DocBook 4.5 input, the fo input to
> > Fop) all validate. I have no problem producing HTML from the
> > same source. I was able to produce PDF yesterday and added a
> > large amount of content in between. I build html most of the
> > time and check the PDF only periodically. I spent several
> > hours commenting out parts of the new content in the DocBook
> > source to see what triggered the error.
> >
> > I narrowed it down to one paragraph and the end of a line, no
> > markup, just text; it looked like FOP might have had trouble
> > finding a good point to break the line. This is not, however,
> > at line 731 of the .fo output (from the warning) or anywhere near it.
> >
> > OK, now for the screwy part. I started removing other parts
> > of the document to trim it down to just the section causing
> > the error--- and it went away. I can remove any of several
> > arbitrary sections of the document (that have been there for
> > days without issue) and the error stops. I am having an
> > extremely difficult time producing a small .fo sample that
> > causes the bug.
> >
> > Any suggestions? How do I track this down?
> >
> > Sincerely,
> >
> > Eric Vought
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org