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 mi...@post.ch on 2005/08/30 16:38:11 UTC

RE : RE : Error while processing a PDF

Hi all,

I could test trunk 264777. Unfortunately, I get the (same?) following error message. The problem might stick in the FO:Table set. I "purified" an FO where the problem remains. If you remove the fo:table, it will work properly.

 <<pct_SA_Klassendiagramm_bearbeiten.fo>> 
Error Message : 

Handling row group with 1 rows...
Exception
java.lang.ClassCastException: org.apache.fop.layoutmgr.inline.KnuthInlineBox
        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:144)
        at org.apache.fop.cli.InputHandler.render(InputHandler.java:101)
        at org.apache.fop.cli.Main.startFOP(Main.java:165)
        at org.apache.fop.cli.Main.main(Main.java:195)

---------

java.lang.ClassCastException: org.apache.fop.layoutmgr.inline.KnuthInlineBox
        at org.apache.fop.layoutmgr.inline.LineLayoutManager$Paragraph.removeEle
mentsForTrailingSpaces(LineLayoutManager.java:295)
        at org.apache.fop.layoutmgr.inline.LineLayoutManager$Paragraph.endSequen
ce(LineLayoutManager.java:237)
        at org.apache.fop.layoutmgr.inline.LineLayoutManager$Paragraph.endParagr
aph(LineLayoutManager.java:229)
        at org.apache.fop.layoutmgr.inline.LineLayoutManager.collectInlineKnuthE
lements(LineLayoutManager.java:803)
        at org.apache.fop.layoutmgr.inline.LineLayoutManager.getNextKnuthElement
s(LineLayoutManager.java:610)
        at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthEleme
nts(BlockStackingLayoutManager.java:310)
        at org.apache.fop.layoutmgr.table.TableCellLayoutManager.getNextKnuthEle
ments(TableCellLayoutManager.java:153)
        at org.apache.fop.layoutmgr.table.TableContentLayoutManager.createElemen
tsForRowGroup(TableContentLayoutManager.java:448)
        at org.apache.fop.layoutmgr.table.TableContentLayoutManager.getKnuthElem
entsForRowIterator(TableContentLayoutManager.java:224)
        at org.apache.fop.layoutmgr.table.TableContentLayoutManager.getNextKnuth
Elements(TableContentLayoutManager.java:169)
        at org.apache.fop.layoutmgr.table.TableLayoutManager.getNextKnuthElement
s(TableLayoutManager.java:184)
        at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthEleme
nts(BlockStackingLayoutManager.java:310)
        at org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowL
ayoutManager.java:103)
        at org.apache.fop.layoutmgr.PageSequenceLayoutManager$PageBreaker.getNex
tKnuthElements(PageSequenceLayoutManager.java:222)
        at org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBre
aker.java:419)
        at org.apache.fop.layoutmgr.PageSequenceLayoutManager$PageBreaker.getNex
tBlockList(PageSequenceLayoutManager.java:214)
        at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.jav
a:202)
        at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(Pag
eSequenceLayoutManager.java:147)
        at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.j
ava:274)
        at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java
:156)
        at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:295)
        at org.apache.xalan.transformer.TransformerIdentityImpl.endElement(Trans
formerIdentityImpl.java:1101)
        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source
)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknow
n Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf
ormerIdentityImpl.java:484)
        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:141)
        at org.apache.fop.cli.InputHandler.render(InputHandler.java:101)
        at org.apache.fop.cli.Main.startFOP(Main.java:165)
        at org.apache.fop.cli.Main.main(Main.java:195)
 ------------

Thanks for your precious help

Please, keep me in touch during the process.

Cheers

Lawrence





-----Message d'origine-----
De : Jeremias Maerki [mailto:dev.jeremias@greenmail.ch] 
Envoy� : mardi, 30. ao�t 2005 15:02
� : fop-users@xmlgraphics.apache.org
Objet : Re: RE : Error while processing a PDF


Lawrence sent me a test file off the mailing list. The bug is now fixed
in the Trunk.

Test cases:
http://svn.apache.org/viewcvs?rev=264771&view=rev

The fix:
http://svn.apache.org/viewcvs?rev=264773&view=rev

On 30.08.2005 11:46:45 Jeremias Maerki wrote:
> Oh, no, it doesn't necessarily have to do with fo:inlines. I misread the
> stack trace. All the more reason I need an FO file.
> 
> On 30.08.2005 11:44:41 Jeremias Maerki wrote:
> > Thanks, Lawrence, but that only helps me verify that it is a problem
> > with fo:inline elements. Without an FO file that shows the problem I
> > can't do much to reproduce it. Please provide a small test case.
> > 
> > On 30.08.2005 11:27:26 michella wrote:
> > > Here is the complete error message :
> > > 
> > > -------------------
> > > 
> > > java.lang.ClassCastException: org.apache.fop.layoutmgr.inline.KnuthInlineBox
> > >         at org.apache.fop.layoutmgr.inline.LineLayoutManager$Paragraph.removeEle
> > > mentsForTrailingSpaces(LineLayoutManager.java:295)
> > >         at org.apache.fop.layoutmgr.inline.LineLayoutManager$Paragraph.endSequen
> > > ce(LineLayoutManager.java:237)
> > >         at org.apache.fop.layoutmgr.inline.LineLayoutManager$Paragraph.endParagr
> > > aph(LineLayoutManager.java:229)
> > >         at org.apache.fop.layoutmgr.inline.LineLayoutManager.collectInlineKnuthE
> > > lements(LineLayoutManager.java:803)
> > >         at org.apache.fop.layoutmgr.inline.LineLayoutManager.getNextKnuthElement
> > > s(LineLayoutManager.java:610)
> > <snip/>


Jeremias Maerki


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


Re: Error loading GIF image using JAI in FOP Trunk (was: Error while processing a PDF - OK)

Posted by Manuel Mall <mm...@arcus.com.au>.
On Wed, 31 Aug 2005 02:50 am, Jeremias Maerki wrote:
> On 30.08.2005 19:00:25 michella wrote:
> > Thank you for your support. Everything works pretty fine from now
> > on.
>
> Thanks for being brave enough to try out our new code and for telling
> us of any problems you find.
>
> > Still another question : Is it normal that GIF images aren't
> > handled anymore?
>
> The image handling has been improved considerably in the new code, at
> least in my opinion. GIF images are now supported through four
> different image sources (handled in this order):
> - JAI
> - ImageIO (only >= JDK 1.4)
> - JIMI
> - the ugly, not really working URL hack to load a GIF image. :-)
>
> > When I include "external-graphics... As gif image",I get the >
> > following error :
> >
> > I installed SDK1.5.0_04, and jai-1_1_2_01-lib-windows-i586-jdk
> > ---------------
> > Exception in thread "main" java.lang.NoClassDefFoundError:
> > com/sun/media/jai/codec/FileCacheSeekableStream at
> > java.lang.Class.forName0(Native Method)
> > 	at java.lang.Class.forName(Unknown Source)
> > 	at
> > org.apache.fop.image.ImageProvider.getImplementingClass(ImageFactor
> >y.java:589) at
> > org.apache.fop.image.ImageMimeType.getFirstImplementingClass(ImageF
> >actory.java:639)
>
> Sounds a lot like a class path problem. Are you sure you've added
> both jai_core.jar and jai_codec.jar to the classpath? Since you're
> working with a JDK >= 1.4 you could also remove JAI now with FOP
> Trunk and instead just use ImageIO which is provided by the JDK. GIF
> support is already in there. No additional libraries required.
>
It is also a bug in our image provider detection mechanism. It shouldn't 
throw an exception but simply try the next available provider.

I'll post a patch.
>
> Jeremias Maerki
>

Manuel

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


Re: Error loading GIF image using JAI in FOP Trunk (was: Error while processing a PDF - OK)

Posted by Jeremias Maerki <de...@greenmail.ch>.
On 30.08.2005 19:00:25 michella wrote:
> Thank you for your support. Everything works pretty fine from now on.

Thanks for being brave enough to try out our new code and for telling us
of any problems you find.

> Still another question : Is it normal that GIF images aren't handled
> anymore?

The image handling has been improved considerably in the new code, at
least in my opinion. GIF images are now supported through four different
image sources (handled in this order):
- JAI
- ImageIO (only >= JDK 1.4)
- JIMI
- the ugly, not really working URL hack to load a GIF image. :-)

> When I include "external-graphics... As gif image",I get the >
> following error :
> 
> I installed SDK1.5.0_04, and jai-1_1_2_01-lib-windows-i586-jdk
> ---------------
> Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/media/jai/codec/FileCacheSeekableStream
> 	at java.lang.Class.forName0(Native Method)
> 	at java.lang.Class.forName(Unknown Source)
> 	at org.apache.fop.image.ImageProvider.getImplementingClass(ImageFactory.java:589)
> 	at org.apache.fop.image.ImageMimeType.getFirstImplementingClass(ImageFactory.java:639)

Sounds a lot like a class path problem. Are you sure you've added both
jai_core.jar and jai_codec.jar to the classpath? Since you're working
with a JDK >= 1.4 you could also remove JAI now with FOP Trunk and
instead just use ImageIO which is provided by the JDK. GIF support is
already in there. No additional libraries required.


Jeremias Maerki


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


Re: RE : RE : Error while processing a PDF

Posted by Jeremias Maerki <de...@greenmail.ch>.
Same error message, different cause. This was all about constellations
of text-align, text-align-last and trailing spaces. My first fix was not
quite right. Now I think I've got it:

http://svn.apache.org/viewcvs?rev=264797&view=rev

On 30.08.2005 16:38:11 michella wrote:
> Hi all,
> 
> I could test trunk 264777. Unfortunately, I get the (same?) following
> error message. The problem might stick in the FO:Table set. I "purified"
> an FO where the problem remains. If you remove the fo:table, it will
> work properly.
> 
>  <<pct_SA_Klassendiagramm_bearbeiten.fo>> 
> Error Message : 
> 
> Handling row group with 1 rows...
> Exception
> java.lang.ClassCastException: org.apache.fop.layoutmgr.inline.KnuthInlineBox
>         at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:144)
>         at org.apache.fop.cli.InputHandler.render(InputHandler.java:101)
>         at org.apache.fop.cli.Main.startFOP(Main.java:165)
>         at org.apache.fop.cli.Main.main(Main.java:195)
> 
> ---------
> 
> java.lang.ClassCastException: org.apache.fop.layoutmgr.inline.KnuthInlineBox
>         at org.apache.fop.layoutmgr.inline.LineLayoutManager$Paragraph.removeEle
> mentsForTrailingSpaces(LineLayoutManager.java:295)
>         at org.apache.fop.layoutmgr.inline.LineLayoutManager$Paragraph.endSequen
> ce(LineLayoutManager.java:237)
<snip/>

Jeremias Maerki


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