Bug 44965 - NPE in FopPDFImage
NPE in FopPDFImage
Status: NEW
Product: Fop - Now in Jira
Classification: Unclassified
Component: pdf
0.94
PC Linux
: P3 normal
: ---
Assigned To: fop-dev
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2008-05-10 05:35 UTC by Ronny Standtke
Modified: 2012-04-07 01:52 UTC (History)
0 users



Attachments
Make the desc checking more flexible (599 bytes, patch)
2010-03-24 17:06 UTC, Robin Bramley
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ronny Standtke 2008-05-10 05:35:34 UTC
I wanted to use fop for creating a PDF from a (validated) docbook file. So I called xsltproc with /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl to create the .fo file. Then I called "fop file.fop file.pdf". All I got was this  exception:

$ /home/archiv/fop/fop-0.94/fop Pauker.fo Pauker.pdf
10.05.2008 14:21:46 org.apache.fop.hyphenation.Hyphenator getHyphenationTree
SCHWERWIEGEND: Couldn't find hyphenation pattern de
10.05.2008 14:21:49 org.apache.fop.layoutmgr.inline.LineLayoutManager$LineBreakingAlgorithm updateData2
WARNUNG: Line 1 of a paragraph overflows the available area. (fo:block, location: 86/37)
10.05.2008 14:21:49 org.apache.fop.layoutmgr.inline.LineLayoutManager$LineBreakingAlgorithm updateData2
WARNUNG: Line 1 of a paragraph overflows the available area. (fo:block, location: 167/52)
10.05.2008 14:21:49 org.apache.fop.layoutmgr.inline.LineLayoutManager$LineBreakingAlgorithm updateData2
WARNUNG: Line 1 of a paragraph overflows the available area. (fo:block, location: 194/37)
10.05.2008 14:21:49 org.apache.fop.layoutmgr.inline.LineLayoutManager$LineBreakingAlgorithm updateData2
WARNUNG: Line 1 of a paragraph overflows the available area. (fo:block, location: 248/37)
10.05.2008 14:21:49 org.apache.fop.layoutmgr.inline.LineLayoutManager$LineBreakingAlgorithm updateData2
WARNUNG: Line 1 of a paragraph overflows the available area. (fo:block, location: 364/45)
10.05.2008 14:21:49 org.apache.fop.layoutmgr.inline.LineLayoutManager$LineBreakingAlgorithm updateData2
WARNUNG: Line 1 of a paragraph overflows the available area. (fo:block, location: 379/45)
10.05.2008 14:21:49 org.apache.fop.layoutmgr.inline.LineLayoutManager$LineBreakingAlgorithm updateData2
WARNUNG: Line 1 of a paragraph overflows the available area. (fo:block, location: 389/45)
10.05.2008 14:21:49 org.apache.fop.layoutmgr.inline.LineLayoutManager$LineBreakingAlgorithm updateData2
WARNUNG: Line 1 of a paragraph overflows the available area. (fo:block, location: 417/45)
10.05.2008 14:21:49 org.apache.fop.layoutmgr.inline.LineLayoutManager$LineBreakingAlgorithm updateData2
WARNUNG: Line 1 of a paragraph overflows the available area. (fo:block, location: 436/45)
10.05.2008 14:21:49 org.apache.fop.layoutmgr.inline.LineLayoutManager$LineBreakingAlgorithm updateData2
WARNUNG: Line 1 of a paragraph overflows the available area. (fo:block, location: 454/41)
10.05.2008 14:21:49 org.apache.fop.layoutmgr.inline.LineLayoutManager$LineBreakingAlgorithm updateData2
WARNUNG: Line 1 of a paragraph overflows the available area. (fo:block, location: 457/41)
10.05.2008 14:21:49 org.apache.fop.layoutmgr.inline.LineLayoutManager$LineBreakingAlgorithm updateData2
WARNUNG: Line 1 of a paragraph overflows the available area. (fo:block, location: 462/41)
10.05.2008 14:21:49 org.apache.fop.layoutmgr.inline.LineLayoutManager$LineBreakingAlgorithm updateData2
WARNUNG: Line 1 of a paragraph overflows the available area. (fo:block, location: 464/41)
10.05.2008 14:21:49 org.apache.fop.layoutmgr.inline.LineLayoutManager$LineBreakingAlgorithm updateData2
WARNUNG: Line 1 of a paragraph overflows the available area. (fo:block, location: 471/41)
10.05.2008 14:21:50 org.apache.fop.layoutmgr.inline.LineLayoutManager$LineBreakingAlgorithm updateData2
WARNUNG: Line 1 of a paragraph overflows the available area. (fo:block, location: 493/41)
10.05.2008 14:21:50 org.apache.fop.layoutmgr.inline.LineLayoutManager$LineBreakingAlgorithm updateData2
WARNUNG: Line 1 of a paragraph overflows the available area. (fo:block, location: 536/41)
10.05.2008 14:21:50 org.apache.fop.layoutmgr.inline.LineLayoutManager$LineBreakingAlgorithm updateData2
WARNUNG: Line 1 of a paragraph overflows the available area. (fo:block, location: 567/41)
10.05.2008 14:21:50 org.apache.fop.layoutmgr.inline.LineLayoutManager$LineBreakingAlgorithm updateData2
WARNUNG: Line 1 of a paragraph overflows the available area. (fo:block, location: 585/37)
10.05.2008 14:21:50 org.apache.fop.layoutmgr.inline.LineLayoutManager$LineBreakingAlgorithm updateData2
WARNUNG: Line 1 of a paragraph overflows the available area. (fo:block, location: 591/37)
10.05.2008 14:21:50 org.apache.fop.cli.Main startFOP
SCHWERWIEGEND: Exception
java.lang.NullPointerException
        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168)
        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
        at org.apache.fop.cli.Main.startFOP(Main.java:166)
        at org.apache.fop.cli.Main.main(Main.java:197)

---------

java.lang.NullPointerException
        at org.apache.fop.render.pdf.FopPDFImage.setup(FopPDFImage.java:144)
        at org.apache.fop.pdf.PDFDocument.addImage(PDFDocument.java:794)
        at org.apache.fop.render.pdf.PDFRenderer.putImage(PDFRenderer.java:1725)
        at org.apache.fop.render.pdf.PDFRenderer.renderImage(PDFRenderer.java:1652)
        at org.apache.fop.render.AbstractRenderer.renderViewport(AbstractRenderer.java:748)
        at org.apache.fop.render.AbstractPathOrientedRenderer.renderViewport(AbstractPathOrientedRenderer.java:541)
        at org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.java:631)
        at org.apache.fop.render.pdf.PDFRenderer.renderInlineArea(PDFRenderer.java:1316)
        at org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.java:606)
        at org.apache.fop.render.pdf.PDFRenderer.renderLineArea(PDFRenderer.java:1307)
        at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:532)
        at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:582)
        at org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1300)
        at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:522)
        at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:568)
        at org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1300)
        at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:522)
        at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:582)
        at org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1300)
        at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:522)
        at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:582)
        at org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1300)
        at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:522)
        at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:582)
        at org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1300)
        at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:522)
        at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:582)
        at org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1300)
        at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:522)
        at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:582)
        at org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1300)
        at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:522)
        at org.apache.fop.render.AbstractRenderer.renderFlow(AbstractRenderer.java:427)
        at org.apache.fop.render.AbstractRenderer.renderMainReference(AbstractRenderer.java:406)
        at org.apache.fop.render.AbstractRenderer.renderBodyRegion(AbstractRenderer.java:340)
        at org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractRenderer.java:285)
        at org.apache.fop.render.AbstractRenderer.renderPageAreas(AbstractRenderer.java:258)
        at org.apache.fop.render.AbstractRenderer.renderPage(AbstractRenderer.java:232)
        at org.apache.fop.render.pdf.PDFRenderer.renderPage(PDFRenderer.java:757)
        at org.apache.fop.area.RenderPagesModel.addPage(RenderPagesModel.java:120)
        at org.apache.fop.layoutmgr.PageSequenceLayoutManager.finishPage(PageSequenceLayoutManager.java:424)
        at org.apache.fop.layoutmgr.PageSequenceLayoutManager.makeNewPage(PageSequenceLayoutManager.java:377)
        at org.apache.fop.layoutmgr.PageBreaker.handleBreakTrait(PageBreaker.java:492)
        at org.apache.fop.layoutmgr.PageBreaker.startPart(PageBreaker.java:398)
        at org.apache.fop.layoutmgr.AbstractBreaker.addAreas(AbstractBreaker.java:420)
        at org.apache.fop.layoutmgr.AbstractBreaker.addAreas(AbstractBreaker.jav
        at org.apache.fop.layoutmgr.PageBreaker.doPhase3(PageBreaker.java:262)
        at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.jav
        at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.jav
        at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(Pag
        at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.j
        at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java
        at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilde
        at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:194)
        at org.apache.xalan.transformer.TransformerIdentityImpl.endElement(Trans
        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknow
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
        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
        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
        at org.apache.fop.cli.Main.startFOP(Main.java:166)
        at org.apache.fop.cli.Main.main(Main.java:197)
Comment 1 Jeremias Maerki 2008-05-13 00:05:54 UTC
We've switched to a different image loading framework since 0.94. Can you please retry the same using FOP 0.95beta?
Comment 2 Ronny Standtke 2008-05-13 12:29:55 UTC
OK, I tried with 0.95beta. Now I get another Exception:


13.05.2008 21:27:59 org.apache.fop.fonts.FontInfo notifyFontReplacement
WARNUNG: Font 'Symbol,normal,700' not found. Substituting with 'Symbol,normal,400'.
13.05.2008 21:27:59 org.apache.fop.fonts.FontInfo notifyFontReplacement
WARNUNG: Font 'ZapfDingbats,normal,700' not found. Substituting with 'ZapfDingbats,normal,400'.
13.05.2008 21:27:59 org.apache.fop.hyphenation.Hyphenator getHyphenationTree
SCHWERWIEGEND: Couldn't find hyphenation pattern de
Exception in thread "main" java.lang.ExceptionInInitializerError
        at org.apache.fop.render.pdf.ImageRenderedAdapter.<init>(ImageRenderedAdapter.java:67)
        at org.apache.fop.render.pdf.PDFImageHandlerRenderedImage.generateImage(PDFImageHandlerRenderedImage.java:57)
        at org.apache.fop.render.pdf.PDFRenderer.putImage(PDFRenderer.java:1745)
        at org.apache.fop.render.pdf.PDFRenderer.renderImage(PDFRenderer.java:1679)
        at org.apache.fop.render.AbstractRenderer.renderViewport(AbstractRenderer.java:734)
        at org.apache.fop.render.AbstractPathOrientedRenderer.renderViewport(AbstractPathOrientedRenderer.java:557)
        at org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.java:617)
        at org.apache.fop.render.pdf.PDFRenderer.renderInlineArea(PDFRenderer.java:1345)
        at org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.java:592)
        at org.apache.fop.render.pdf.PDFRenderer.renderLineArea(PDFRenderer.java:1336)
        at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:529)
        at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:564)
        at org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1329)
        at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:519)
        at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:564)
        at org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1329)
        at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:519)
        at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:564)
        at org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1329)
        at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:519)
        at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:564)
        at org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1329)
        at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:519)
        at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:564)
        at org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1329)
        at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:519)
        at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:564)
        at org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1329)
        at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:519)
        at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:564)
        at org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1329)
        at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:519)
        at org.apache.fop.render.AbstractRenderer.renderFlow(AbstractRenderer.java:424)
        at org.apache.fop.render.AbstractRenderer.renderMainReference(AbstractRenderer.java:403)
        at org.apache.fop.render.AbstractRenderer.renderBodyRegion(AbstractRenderer.java:337)
        at org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractRenderer.java:282)
        at org.apache.fop.render.AbstractRenderer.renderPageAreas(AbstractRenderer.java:255)
        at org.apache.fop.render.AbstractRenderer.renderPage(AbstractRenderer.java:229)
        at org.apache.fop.render.pdf.PDFRenderer.renderPage(PDFRenderer.java:801)
        at org.apache.fop.area.RenderPagesModel.addPage(RenderPagesModel.java:113)
        at org.apache.fop.layoutmgr.AbstractPageSequenceLayoutManager.finishPage(AbstractPageSequenceLayoutManager.java:312)
        at org.apache.fop.layoutmgr.PageSequenceLayoutManager.finishPage(PageSequenceLayoutManager.java:167)
        at org.apache.fop.layoutmgr.AbstractPageSequenceLayoutManager.makeNewPage(AbstractPageSequenceLayoutManager.java:284)
        at org.apache.fop.layoutmgr.PageBreaker.handleBreakTrait(PageBreaker.java:494)
        at org.apache.fop.layoutmgr.PageBreaker.startPart(PageBreaker.java:398)
        at org.apache.fop.layoutmgr.AbstractBreaker.addAreas(AbstractBreaker.java:421)
        at org.apache.fop.layoutmgr.AbstractBreaker.addAreas(AbstractBreaker.java:371)
        at org.apache.fop.layoutmgr.PageBreaker.doPhase3(PageBreaker.java:262)
        at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:346)
        at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:264)
        at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:106)
        at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:234)
        at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:123)
        at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:340)
        at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:169)
        at org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1101)
        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
        at org.apache.xerces.xinclude.XIncludeHandler.endElement(Unknown Source)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 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.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
        at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:214)
        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125)
        at org.apache.fop.cli.Main.startFOP(Main.java:166)
        at org.apache.fop.cli.Main.main(Main.java:197)
Caused by: java.lang.IllegalArgumentException: Can't load standard profile: LINEAR_RGB.pf
        at java.awt.color.ICC_Profile$2.run(ICC_Profile.java:912)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.color.ICC_Profile.getStandardProfile(ICC_Profile.java:905)
        at java.awt.color.ICC_Profile.getInstance(ICC_Profile.java:886)
        at java.awt.color.ColorSpace.getInstance(ColorSpace.java:347)
        at org.apache.xmlgraphics.ps.ImageEncodingHelper.<clinit>(ImageEncodingHelper.java:40)
        ... 71 more
Comment 3 Jeremias Maerki 2008-06-02 08:14:59 UTC
Sorry for the delay. I've been away for a few days. Can you please tell me what Java VM you are using (java -version)? The error here is something I've never seen before. It almost looks like your JVM installation is incomplete and lacks one of the standard color profiles (LINEAR_RGB) returned by the following code:
ColorSpace.getInstance(ColorSpace.CS_LINEAR_RGB)
This color space should (if I don't read the class library javadocs incorrectly) always be available. In a Sun JVM 1.4.2/1.5/6.0, LINEAR_RGB.pf is normally located in the "<jre>/lib/cmm" directory together with the other built-in color profiles. The same applies to Apache Harmony.

(In reply to comment #2)
> OK, I tried with 0.95beta. Now I get another Exception:
<snip/>
> Caused by: java.lang.IllegalArgumentException: Can't load standard profile:
> LINEAR_RGB.pf
>         at java.awt.color.ICC_Profile$2.run(ICC_Profile.java:912)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.awt.color.ICC_Profile.getStandardProfile(ICC_Profile.java:905)
>         at java.awt.color.ICC_Profile.getInstance(ICC_Profile.java:886)
>         at java.awt.color.ColorSpace.getInstance(ColorSpace.java:347)
>         at
> org.apache.xmlgraphics.ps.ImageEncodingHelper.<clinit>(ImageEncodingHelper.java:40)
>         ... 71 more
> 

Comment 4 Ronny Standtke 2008-06-02 09:11:59 UTC
$ java -version
java version "1.6.0"
OpenJDK Runtime Environment (build 1.6.0-b09)
OpenJDK Client VM (build 1.6.0-b09, mixed mode, sharing)

$ ll /usr/lib/jvm/java-6-openjdk/jre/lib/cmm/
insgesamt 16
-rw-r--r-- 1 root root  784 2008-04-17 11:39 CIEXYZ.pf
-rw-r--r-- 1 root root  554 2008-04-17 11:39 GRAY.pf
-rw-r--r-- 1 root root 6876 2008-04-17 11:39 sRGB.pf
Comment 5 Jeremias Maerki 2008-06-02 09:18:28 UTC
(In reply to comment #4)
> $ java -version
> java version "1.6.0"
> OpenJDK Runtime Environment (build 1.6.0-b09)
> OpenJDK Client VM (build 1.6.0-b09, mixed mode, sharing)
> 
> $ ll /usr/lib/jvm/java-6-openjdk/jre/lib/cmm/
> insgesamt 16
> -rw-r--r-- 1 root root  784 2008-04-17 11:39 CIEXYZ.pf
> -rw-r--r-- 1 root root  554 2008-04-17 11:39 GRAY.pf
> -rw-r--r-- 1 root root 6876 2008-04-17 11:39 sRGB.pf
> 

Interesting. Looks like OpenJDK 1.6.0 is incomplete, then. Searching the net revealed this: http://bugs.sun.com/view_bug.do?bug_id=6523403
I guess you'll have to switch to a different JVM.
Comment 6 Ronny Standtke 2008-06-03 13:30:36 UTC
Thank you very much for the info. I just switched to the "not so open" JDK and everything is back to normal.
Thanks again.
Comment 7 Max Berger 2008-06-19 01:40:38 UTC
Just as a note: I am currently doing experiments with openjdk 1.6.0b10 and fop runs fine there, the missing color profile is added there.

Max
Comment 8 Robin Bramley 2010-03-24 17:06:11 UTC
Created attachment 25178 [details]
Make the desc checking more flexible

We were encountering the same NPE issue with FOP 0.94 and OpenJDK 1.6.0-b09 (although the stack trace was obscured and listed as org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1408)).

After stepping through the code with jdb it turns out that the default sRGB ICCProfileDescription in OpenJDK is "sRGB built-in". 
So desc didn't match the .equals on line 140 and therefore cs was remaining null, causing the NPE on line 144 when cs.getICCStream() was invoked.
Comment 9 Robin Bramley 2010-03-24 17:09:35 UTC
Note that upgrading to FOP 0.95 didn't work in our situation; instead it caused a StackOverflowError (infinite loop seemingly linked to flowing a table).
Comment 10 Max Berger 2010-03-31 11:58:28 UTC
(In reply to comment #9)
> Note that upgrading to FOP 0.95 didn't work in our situation; instead it caused
> a StackOverflowError (infinite loop seemingly linked to flowing a table).

Dear Robin,

you said your using openjdk 1.6.0b9. Could you check with a later version (b10 worked for me)
Comment 11 Robin Bramley 2010-04-07 17:52:22 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > Note that upgrading to FOP 0.95 didn't work in our situation; instead it caused
> > a StackOverflowError (infinite loop seemingly linked to flowing a table).
> 
> Dear Robin,
> 
> you said your using openjdk 1.6.0b9. Could you check with a later version (b10
> worked for me)

Hi Max,

I still see the same stack overflow error with FOP 0.95 (plus upgraded dependencies e.g. Batik 1.7) and a later OpenJDK 1.6.0 build

# cat /etc/redhat-release
CentOS release 5.4 (Final)
# uname -srvo
Linux 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 GNU/Linux
# java -version
java version "1.6.0_0"
OpenJDK Runtime Environment (IcedTea6 1.6) (6b16-Argeo-5)
OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)


        at java.lang.String.valueOf(String.java:2838)
        at java.lang.StringBuffer.append(StringBuffer.java:236)
        at org.apache.fop.datatypes.LengthBase.toString(LengthBase.java:135)
        at java.lang.String.valueOf(String.java:2838)
        at java.lang.StringBuffer.append(StringBuffer.java:236)
        at org.apache.fop.fo.properties.PercentLength.toString(PercentLength.java:121)
        at java.lang.String.valueOf(String.java:2838)
        at java.lang.StringBuffer.append(StringBuffer.java:236)
        at org.apache.fop.fo.flow.table.TableColumn.toString(TableColumn.java:233)
Comment 12 Robin Bramley 2010-04-07 17:58:50 UTC
Though the patched version of 0.94 works as expected with the newer OpenJDK build.
Comment 13 Glenn Adams 2012-04-07 01:43:39 UTC
resetting P2 open bugs to P3 pending further review