Re: java.lang.NullPointerException: org.apache.fop.layoutmgr.inline.InlineStackingLayoutManager.applyChanges(InlineStackingLayoutManager.java:350)

2010-02-17 Thread Mathieu Malaterre
Hi Georg,

  Thank you very much for your help !
  Here it is attached as gzip compressed.

  It was generated from the xml with:

xsltproc --stringparam fop1.extensions 1 --stringparam ulink.show 0
--xinclude -o out.fo
/usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl ./test.xml

Thanks again

On Wed, Feb 17, 2010 at 9:25 AM, Georg Datterl gdatt...@geneon.de wrote:
 Hi Mathieu,

 can you post the fo file, please? I'd like to help, but I don't have your 
 transformation file.

 Regards,

 Georg Datterl

 -- Kontakt --

 Georg Datterl

 Geneon media solutions gmbh
 Gutenstetter Straße 8a
 90449 Nürnberg

 HRB Nürnberg: 17193
 Geschäftsführer: Yong-Harry Steiert

 Tel.: 0911/36 78 88 - 26
 Fax: 0911/36 78 88 - 20

 www.geneon.de

 Weitere Mitglieder der Willmy MediaGroup:

 IRS Integrated Realization Services GmbH:    www.irs-nbg.de
 Willmy PrintMedia GmbH:                            www.willmy.de
 Willmy Consult  Content GmbH:                 www.willmycc.de

 -Ursprüngliche Nachricht-
 Von: Mathieu Malaterre [mailto:mathieu.malate...@gmail.com]
 Gesendet: Dienstag, 16. Februar 2010 14:17
 An: fop-users@xmlgraphics.apache.org
 Betreff: java.lang.NullPointerException: 
 org.apache.fop.layoutmgr.inline.InlineStackingLayoutManager.applyChanges(InlineStackingLayoutManager.java:350)

 Could someone please try this example on their setup:

 $ xsltproc --stringparam fop1.extensions 1 --stringparam ulink.show 0
 --xinclude -o out.fo
 /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl ./test.xml
 $ fop -fo out.fo -pdf out.pdf

 with test.xml:
 ?xml version='1.0' encoding='UTF-8'?
 !DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.5//EN
 http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd; []
 article
 section
  titletitle/title
  para
    anchor id=myidx xreflabel=mylabel/
    /para
 /section
 /article

 I am getting:

 $ fop -fo out.fo -pdf out.pdf
 [warning] /usr/bin/fop: Unable to locate xml-apis in /usr/share/java
 Feb 16, 2010 2:17:27 PM org.apache.fop.fonts.FontInfo notifyFontReplacement
 WARNING: Font 'Symbol,normal,700' not found. Substituting with
 'Symbol,normal,400'.
 Feb 16, 2010 2:17:27 PM org.apache.fop.fonts.FontInfo notifyFontReplacement
 WARNING: Font 'ZapfDingbats,normal,700' not found. Substituting with
 'ZapfDingbats,normal,400'.
 Feb 16, 2010 2:17:27 PM org.apache.fop.cli.Main startFOP
 SEVERE: Exception
 java.lang.NullPointerException
        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:217)
        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)

 -

 java.lang.NullPointerException
        at 
 org.apache.fop.layoutmgr.inline.InlineStackingLayoutManager.applyChanges(InlineStackingLayoutManager.java:350)
        at 
 org.apache.fop.layoutmgr.inline.LineLayoutManager.findHyphenationPoints(LineLayoutManager.java:1480)
        at 
 org.apache.fop.layoutmgr.inline.LineLayoutManager.findOptimalBreakingPoints(LineLayoutManager.java:950)
        at 
 org.apache.fop.layoutmgr.inline.LineLayoutManager.createLineBreaks(LineLayoutManager.java:917)
        at 
 org.apache.fop.layoutmgr.inline.LineLayoutManager.getNextKnuthElements(LineLayoutManager.java:607)
        at 
 org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:294)
        at 
 org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:116)
        at 
 org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:294)
        at 
 org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:116)
        at 
 org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:107)
        at 
 org.apache.fop.layoutmgr.PageBreaker.getNextKnuthElements(PageBreaker.java:145)
        at 
 org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBreaker.java:552)
        at 
 org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:137)
        at 
 org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:302)
        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:1102)
        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown 
 Source)
      

Re: java.lang.NullPointerException: org.apache.fop.layoutmgr.inline.InlineStackingLayoutManager.applyChanges(InlineStackingLayoutManager.java:350)

2010-02-17 Thread Mathieu Malaterre
This is the latest from debian:

# apt-cache policy fop
fop:
  Installed: 1:0.95.dfsg-7
  Candidate: 1:0.95.dfsg-7
  Version table:
 *** 1:0.95.dfsg-7 0
500 http://ftp.fr.debian.org sid/main Packages
100 /var/lib/dpkg/status


So I am guessing this is an official release.

I'd like to know if anyone else is using fop 0.95 and can reproduce
the bug ? I'd like to know if this is related to fop 0.95 OR the
debian packaging of fop 0.95.

Thanks a bunch !

On Wed, Feb 17, 2010 at 10:35 AM, Georg Datterl gdatt...@geneon.de wrote:
 Hi Mathieu,

 With my trunk from around December the fo file works fine. I get lots of 
 Image not found: images/draft.png and the two font warnings, but the pdf is 
 complete with TOC, title, spot and bookmarks. Which fop version are you 
 using?

 Regards,

 Georg Datterl

 -- Kontakt --

 Georg Datterl

 Geneon media solutions gmbh
 Gutenstetter Straße 8a
 90449 Nürnberg

 HRB Nürnberg: 17193
 Geschäftsführer: Yong-Harry Steiert

 Tel.: 0911/36 78 88 - 26
 Fax: 0911/36 78 88 - 20

 www.geneon.de

 Weitere Mitglieder der Willmy MediaGroup:

 IRS Integrated Realization Services GmbH:    www.irs-nbg.de
 Willmy PrintMedia GmbH:                            www.willmy.de
 Willmy Consult  Content GmbH:                 www.willmycc.de


 -Ursprüngliche Nachricht-
 Von: Mathieu Malaterre [mailto:mathieu.malate...@gmail.com]
 Gesendet: Mittwoch, 17. Februar 2010 09:32
 An: fop-users@xmlgraphics.apache.org
 Betreff: Re: java.lang.NullPointerException: 
 org.apache.fop.layoutmgr.inline.InlineStackingLayoutManager.applyChanges(InlineStackingLayoutManager.java:350)

 Hi Georg,

  Thank you very much for your help !
  Here it is attached as gzip compressed.

  It was generated from the xml with:

 xsltproc --stringparam fop1.extensions 1 --stringparam ulink.show 0
 --xinclude -o out.fo
 /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl ./test.xml

 Thanks again

 On Wed, Feb 17, 2010 at 9:25 AM, Georg Datterl gdatt...@geneon.de wrote:
 Hi Mathieu,

 can you post the fo file, please? I'd like to help, but I don't have your 
 transformation file.

 Regards,

 Georg Datterl

 -- Kontakt --

 Georg Datterl

 Geneon media solutions gmbh
 Gutenstetter Straße 8a
 90449 Nürnberg

 HRB Nürnberg: 17193
 Geschäftsführer: Yong-Harry Steiert

 Tel.: 0911/36 78 88 - 26
 Fax: 0911/36 78 88 - 20

 www.geneon.de

 Weitere Mitglieder der Willmy MediaGroup:

 IRS Integrated Realization Services GmbH:    www.irs-nbg.de
 Willmy PrintMedia GmbH:                            www.willmy.de
 Willmy Consult  Content GmbH:                 www.willmycc.de

 -Ursprüngliche Nachricht-
 Von: Mathieu Malaterre [mailto:mathieu.malate...@gmail.com]
 Gesendet: Dienstag, 16. Februar 2010 14:17
 An: fop-users@xmlgraphics.apache.org
 Betreff: java.lang.NullPointerException: 
 org.apache.fop.layoutmgr.inline.InlineStackingLayoutManager.applyChanges(InlineStackingLayoutManager.java:350)

 Could someone please try this example on their setup:

 $ xsltproc --stringparam fop1.extensions 1 --stringparam ulink.show 0
 --xinclude -o out.fo
 /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl ./test.xml
 $ fop -fo out.fo -pdf out.pdf

 with test.xml:
 ?xml version='1.0' encoding='UTF-8'?
 !DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.5//EN
 http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd; []
 article
 section
  titletitle/title
  para
    anchor id=myidx xreflabel=mylabel/
    /para
 /section
 /article

 I am getting:

 $ fop -fo out.fo -pdf out.pdf
 [warning] /usr/bin/fop: Unable to locate xml-apis in /usr/share/java
 Feb 16, 2010 2:17:27 PM org.apache.fop.fonts.FontInfo notifyFontReplacement
 WARNING: Font 'Symbol,normal,700' not found. Substituting with
 'Symbol,normal,400'.
 Feb 16, 2010 2:17:27 PM org.apache.fop.fonts.FontInfo notifyFontReplacement
 WARNING: Font 'ZapfDingbats,normal,700' not found. Substituting with
 'ZapfDingbats,normal,400'.
 Feb 16, 2010 2:17:27 PM org.apache.fop.cli.Main startFOP
 SEVERE: Exception
 java.lang.NullPointerException
        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:217)
        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)

 -

 java.lang.NullPointerException
        at 
 org.apache.fop.layoutmgr.inline.InlineStackingLayoutManager.applyChanges(InlineStackingLayoutManager.java:350)
        at 
 org.apache.fop.layoutmgr.inline.LineLayoutManager.findHyphenationPoints(LineLayoutManager.java:1480)
        at 
 org.apache.fop.layoutmgr.inline.LineLayoutManager.findOptimalBreakingPoints(LineLayoutManager.java:950)
        at 
 org.apache.fop.layoutmgr.inline.LineLayoutManager.createLineBreaks(LineLayoutManager.java:917)
        at 
 org.apache.fop.layoutmgr.inline.LineLayoutManager.getNextKnuthElements(LineLayoutManager.java:607

Re: java.lang.NullPointerException: org.apache.fop.layoutmgr.inline.InlineStackingLayoutManager.applyChanges(InlineStackingLayoutManager.java:350)

2010-02-17 Thread Mathieu Malaterre
Hi Georg,

  Thanks a bunch for the info. I'll raise the issue on the debian
package itself. fop is pretty much useless if one cannot even use a
simple anchor/ element !

  Just for info I did compare trunk to fop 0.95 using diff -u:

$ diff -x .svn -ru fop-0_95 trunk | wc
 149462  621452 5984407

There has been quite some changes !

On Wed, Feb 17, 2010 at 11:08 AM, Georg Datterl gdatt...@geneon.de wrote:
 Hi Mathieu,

 Now we are talking. I can reproduce your error with the 0.95 binary freshly 
 downloaded from apache. On a Windows7-System. So it's not a debian problem 
 but if you can switch to trunk, the problem is solved.

 Regards,

 Georg Datterl

 -- Kontakt --

 Georg Datterl

 Geneon media solutions gmbh
 Gutenstetter Straße 8a
 90449 Nürnberg

 HRB Nürnberg: 17193
 Geschäftsführer: Yong-Harry Steiert

 Tel.: 0911/36 78 88 - 26
 Fax: 0911/36 78 88 - 20

 www.geneon.de

 Weitere Mitglieder der Willmy MediaGroup:

 IRS Integrated Realization Services GmbH:    www.irs-nbg.de
 Willmy PrintMedia GmbH:                            www.willmy.de
 Willmy Consult  Content GmbH:                 www.willmycc.de


 -Ursprüngliche Nachricht-
 Von: Mathieu Malaterre [mailto:mathieu.malate...@gmail.com]
 Gesendet: Mittwoch, 17. Februar 2010 10:53
 An: fop-users@xmlgraphics.apache.org
 Cc: 570...@bugs.debian.org
 Betreff: Re: java.lang.NullPointerException: 
 org.apache.fop.layoutmgr.inline.InlineStackingLayoutManager.applyChanges(InlineStackingLayoutManager.java:350)

 This is the latest from debian:

 # apt-cache policy fop
 fop:
  Installed: 1:0.95.dfsg-7
  Candidate: 1:0.95.dfsg-7
  Version table:
  *** 1:0.95.dfsg-7 0
        500 http://ftp.fr.debian.org sid/main Packages
        100 /var/lib/dpkg/status


 So I am guessing this is an official release.

 I'd like to know if anyone else is using fop 0.95 and can reproduce
 the bug ? I'd like to know if this is related to fop 0.95 OR the
 debian packaging of fop 0.95.

 Thanks a bunch !

 On Wed, Feb 17, 2010 at 10:35 AM, Georg Datterl gdatt...@geneon.de wrote:
 Hi Mathieu,

 With my trunk from around December the fo file works fine. I get lots of 
 Image not found: images/draft.png and the two font warnings, but the pdf is 
 complete with TOC, title, spot and bookmarks. Which fop version are you 
 using?

 Regards,

 Georg Datterl

 -- Kontakt --

 Georg Datterl

 Geneon media solutions gmbh
 Gutenstetter Straße 8a
 90449 Nürnberg

 HRB Nürnberg: 17193
 Geschäftsführer: Yong-Harry Steiert

 Tel.: 0911/36 78 88 - 26
 Fax: 0911/36 78 88 - 20

 www.geneon.de

 Weitere Mitglieder der Willmy MediaGroup:

 IRS Integrated Realization Services GmbH:    www.irs-nbg.de
 Willmy PrintMedia GmbH:                            www.willmy.de
 Willmy Consult  Content GmbH:                 www.willmycc.de


 -Ursprüngliche Nachricht-
 Von: Mathieu Malaterre [mailto:mathieu.malate...@gmail.com]
 Gesendet: Mittwoch, 17. Februar 2010 09:32
 An: fop-users@xmlgraphics.apache.org
 Betreff: Re: java.lang.NullPointerException: 
 org.apache.fop.layoutmgr.inline.InlineStackingLayoutManager.applyChanges(InlineStackingLayoutManager.java:350)

 Hi Georg,

  Thank you very much for your help !
  Here it is attached as gzip compressed.

  It was generated from the xml with:

 xsltproc --stringparam fop1.extensions 1 --stringparam ulink.show 0
 --xinclude -o out.fo
 /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl ./test.xml

 Thanks again

 On Wed, Feb 17, 2010 at 9:25 AM, Georg Datterl gdatt...@geneon.de wrote:
 Hi Mathieu,

 can you post the fo file, please? I'd like to help, but I don't have your 
 transformation file.

 Regards,

 Georg Datterl

 -- Kontakt --

 Georg Datterl

 Geneon media solutions gmbh
 Gutenstetter Straße 8a
 90449 Nürnberg

 HRB Nürnberg: 17193
 Geschäftsführer: Yong-Harry Steiert

 Tel.: 0911/36 78 88 - 26
 Fax: 0911/36 78 88 - 20

 www.geneon.de

 Weitere Mitglieder der Willmy MediaGroup:

 IRS Integrated Realization Services GmbH:    www.irs-nbg.de
 Willmy PrintMedia GmbH:                            www.willmy.de
 Willmy Consult  Content GmbH:                 www.willmycc.de

 -Ursprüngliche Nachricht-
 Von: Mathieu Malaterre [mailto:mathieu.malate...@gmail.com]
 Gesendet: Dienstag, 16. Februar 2010 14:17
 An: fop-users@xmlgraphics.apache.org
 Betreff: java.lang.NullPointerException: 
 org.apache.fop.layoutmgr.inline.InlineStackingLayoutManager.applyChanges(InlineStackingLayoutManager.java:350)

 Could someone please try this example on their setup:

 $ xsltproc --stringparam fop1.extensions 1 --stringparam ulink.show 0
 --xinclude -o out.fo
 /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl ./test.xml
 $ fop -fo out.fo -pdf out.pdf

 with test.xml:
 ?xml version='1.0' encoding='UTF-8'?
 !DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.5//EN
 http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd; []
 article
 section
  titletitle/title
  para
    anchor id=myidx xreflabel=mylabel/
    /para
 /section

Re: java.lang.NullPointerException: org.apache.fop.layoutmgr.inline.InlineStackingLayoutManager.applyChanges(InlineStackingLayoutManager.java:350)

2010-02-16 Thread Mathieu Malaterre
If this helps, I converted it to docbook 5 with the same result:

$ cat test5.xml
article xmlns=http://docbook.org/ns/docbook; version=5.0
sectioninfotitletitle/title/info
  para
The anchor elementanchor xml:id=example.anchor.1/ is empty and contributes
nothing to the flow of the content in which it occurs.  It is only useful
as a target.
/para
/section
/article



$ fop -xsl /usr/share/xml/docbook/stylesheet/docbook-xsl-ns/fo/docbook.xsl
-xml test5.xml -pdf test5.pdf
[warning] /usr/bin/fop: Unable to locate servlet-api in /usr/share/java
Feb 16, 2010 1:40:47 PM org.apache.fop.cli.InputHandler warning
WARNING: Making portrait pages on USletter paper (8.5inx11in)
Feb 16, 2010 1:40:47 PM
org.apache.fop.fo.properties.CommonBorderPaddingBackground init
SEVERE: Background image not available: images/draft.png
Feb 16, 2010 1:40:47 PM
org.apache.fop.fo.properties.CommonBorderPaddingBackground init
SEVERE: Background image not available: images/draft.png
Feb 16, 2010 1:40:47 PM
org.apache.fop.fo.properties.CommonBorderPaddingBackground init
SEVERE: Background image not available: images/draft.png
Feb 16, 2010 1:40:47 PM
org.apache.fop.fo.properties.CommonBorderPaddingBackground init
SEVERE: Background image not available: images/draft.png
Feb 16, 2010 1:40:47 PM
org.apache.fop.fo.properties.CommonBorderPaddingBackground init
SEVERE: Background image not available: images/draft.png
Feb 16, 2010 1:40:47 PM
org.apache.fop.fo.properties.CommonBorderPaddingBackground init
SEVERE: Background image not available: images/draft.png
Feb 16, 2010 1:40:47 PM
org.apache.fop.fo.properties.CommonBorderPaddingBackground init
SEVERE: Background image not available: images/draft.png
Feb 16, 2010 1:40:47 PM
org.apache.fop.fo.properties.CommonBorderPaddingBackground init
SEVERE: Background image not available: images/draft.png
Feb 16, 2010 1:40:47 PM
org.apache.fop.fo.properties.CommonBorderPaddingBackground init
SEVERE: Background image not available: images/draft.png
Feb 16, 2010 1:40:47 PM
org.apache.fop.fo.properties.CommonBorderPaddingBackground init
SEVERE: Background image not available: images/draft.png
Feb 16, 2010 1:40:47 PM
org.apache.fop.fo.properties.CommonBorderPaddingBackground init
SEVERE: Background image not available: images/draft.png
Feb 16, 2010 1:40:47 PM
org.apache.fop.fo.properties.CommonBorderPaddingBackground init
SEVERE: Background image not available: images/draft.png
Feb 16, 2010 1:40:47 PM
org.apache.fop.fo.properties.CommonBorderPaddingBackground init
SEVERE: Background image not available: images/draft.png
Feb 16, 2010 1:40:47 PM
org.apache.fop.fo.properties.CommonBorderPaddingBackground init
SEVERE: Background image not available: images/draft.png
Feb 16, 2010 1:40:47 PM
org.apache.fop.fo.properties.CommonBorderPaddingBackground init
SEVERE: Background image not available: images/draft.png
Feb 16, 2010 1:40:47 PM
org.apache.fop.fo.properties.CommonBorderPaddingBackground init
SEVERE: Background image not available: images/draft.png
Feb 16, 2010 1:40:47 PM
org.apache.fop.fo.properties.CommonBorderPaddingBackground init
SEVERE: Background image not available: images/draft.png
Feb 16, 2010 1:40:47 PM
org.apache.fop.fo.properties.CommonBorderPaddingBackground init
SEVERE: Background image not available: images/draft.png
Feb 16, 2010 1:40:47 PM
org.apache.fop.fo.properties.CommonBorderPaddingBackground init
SEVERE: Background image not available: images/draft.png
Feb 16, 2010 1:40:48 PM org.apache.fop.fonts.FontInfo notifyFontReplacement
WARNING: Font 'Symbol,normal,700' not found. Substituting with
'Symbol,normal,400'.
Feb 16, 2010 1:40:48 PM org.apache.fop.fonts.FontInfo notifyFontReplacement
WARNING: Font 'ZapfDingbats,normal,700' not found. Substituting with
'ZapfDingbats,normal,400'.
Feb 16, 2010 1:40:48 PM org.apache.fop.hyphenation.Hyphenator getHyphenationTree
SEVERE: Couldn't find hyphenation pattern en
Feb 16, 2010 1:40:48 PM org.apache.fop.fo.FOTreeBuilder fatalError
SEVERE: javax.xml.transform.TransformerException: java.lang.NullPointerException
Feb 16, 2010 1:40:48 PM org.apache.fop.cli.Main startFOP
SEVERE: Exception
javax.xml.transform.TransformerException: java.lang.NullPointerException
at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:217)
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)

-

; SystemID: 
file:/usr/share/xml/docbook/stylesheet/docbook-xsl-ns/fo/docbook.xsl;
Line#: 309; Column#: 54
javax.xml.transform.TransformerException: java.lang.NullPointerException
at 
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2405)
at 
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
at 
org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395)
at 

Re: java.lang.NullPointerException in FOP 20.5

2009-06-09 Thread bonekrusher

nevermind... I was missing a .class file for an extension! a



bonekrusher wrote:
 
 Hi, I can not upgrade to .95, so I am forced to use 20.5 for a project. I
 know .20.5 is out-dated, but I dont have any options. I have a strange
 error that occurs only when outputing graphics. If I produce the PDF
 without graphics, it runs fine.
 
 here is the error:
 
 java.lang.NullPointerException
 org.apache.fop.apps.FOPException: java.lang.NullPointerException
 at
 org.apache.fop.apps.CommandLineStarter.run(CommandLineStarter.java:111)
 at org.apache.fop.apps.Fop.main(Fop.java:62)
 
 -
 
 java.lang.RuntimeException: java.lang.NullPointerException
 at
 org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3363)
 at
 org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.ja
 va:427)
 at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown
 Source)
 at org.apache.xerces.impl.dtd.XMLDTDValidator.endDocument(Unknown
 Source)
 at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown
 Source)
 at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown
 Source)
 at
 org.apache.xerces.impl.XMLEntityManager$EntityScanner.load(Unknown Source)
 at
 org.apache.xerces.impl.XMLEntityManager$EntityScanner.skipSpaces(Unknown
 Source)
 at
 org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown
 Sou
 rce)
 at
 org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
 Source)
 at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
 Source)
 at org.apache.xerces.parsers.DTDConfiguration.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.TrAXFilter.parse(TrAXFilter.java:191)
 at org.apache.fop.apps.Driver.render(Driver.java:498)
 at
 org.apache.fop.apps.CommandLineStarter.run(CommandLineStarter.java:106)
 at org.apache.fop.apps.Fop.main(Fop.java:62)
 
 here is my command line:
 
 java -Djava.endorsed.dirs=%LOCAL_COMP_HOME% -cp
 %LOCAL_COMP_HOME%fop;%LOCAL_COMP_HOME%Fop\fop.jar;%LOCAL_COMP_HOME%xml-apis.jar;%LOCAL_COMP_HOME%xercesImpl.jar;C%LOCAL_COMP_HOME%fop\batik.jar;%LOCAL_COMP_HOME%fop\avalon-framework-cvs-20020806.jar;%LOCAL_COMP_HOME%fop\jimi-1.0.jar;%LOCAL_COMP_HOME%fop\jai_core.jar;%LOCAL_COMP_HOME%fop\jai_codec.jar;
 -Xms256m -Xmx1056m org.apache.fop.apps.Fop -d -xml %1 -xsl
 %STYLESHEET_HOME%my-fo.xsl -pdf %1.pdfpause
 
 Thanks for the help.
 
 

-- 
View this message in context: 
http://www.nabble.com/java.lang.NullPointerException-in-FOP-20.5-tp23946221p23946717.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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



Re: java.lang.NullPointerException

2008-04-16 Thread Chris Bowditch

pdiop wrote:
I need your help everybody. I am getting the following error while 
running fop on resin : java.lang.NullPointerException at 
 
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:290) 


 at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:185)
 at com.caucho.xml.SAXBuilder.popElement(SAXBuilder.java:291) at

What version of FOP are you running? Can you provide a sample FO that 
causes the error (not XML + XSLT)


Thanks,

Chris



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: java.lang.NullPointerException

2008-04-16 Thread pdiop

I am using Fop 0.94 with Resin 2.1.17 an Java 1.4. 

I am not exactly using a fo file ut a xslt with fo inside and a xml, here is
the sample of the xslt file:

?xml version=1.0 encoding=ISO-8859-1?

xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xmlns:fo=http://www.w3.org/1999/XSL/Format;  exclude-result-prefixes=fo
xsl:output method=xml version=1.0 omit-xml-declaration=no
indent=yes/

!-- inclusion --
xsl:include href=all.xsl/

xsl:template match=cahier
fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
 fo:layout-master-set
fo:simple-page-master master-name=simpleA4 
page-height=29.7cm
page-width=21cm margin-top=2cm margin-bottom=2cm margin-left=2cm
margin-right=2cm
fo:region-body margin-bottom=1cm /
fo:region-after extent=0.5cm/ 
/fo:simple-page-master
/fo:layout-master-set
fo:page-sequence master-reference=simpleA4
initial-page-number=1
fo:static-content flow-name=xsl-region-after
fo:block text-align=end font-size=70%
font-weight=normal 
xsl:textPage /xsl:textfo:page-number/ 
/fo:block
/fo:static-content
 
fo:flow flow-name=xsl-region-body font-size=60%
font-weight=normal line-height=10px
  
xsl:call-template name=entete/
 
!-- Début de la cration --
xsl:apply-templates select=cours/
xsl:apply-templates select=professeur/
xsl:call-template name=line/

xsl:if test=presentation/*  
xsl:apply-templates 
select=definition/
xsl:call-template name=space/
/xsl:if
xsl:if test=coordonnees/*   
xsl:apply-templates select=adresse/
xsl:call-template name=space/
/xsl:if
xsl:if test=materiel/*
xsl:apply-templates select=contenu/
xsl:call-template name=space/
/xsl:if
xsl:if test=evaluations/*   
xsl:apply-templates select=examens/
xsl:call-template name=space/
/xsl:if
xsl:if test=/[EMAIL PROTECTED]  
xsl:call-template name=lois 
/
xsl:call-template name=space/
/xsl:if
xsl:if test=cours/* 
xsl:apply-templates select=cours/
/xsl:if
   /fo:flow
 
   
/fo:page-sequence
/fo:root
/xsl:template

I must also say that the program is running fine in a standalone version
(web project) but once I integrate to a bigger project with lot of things in
it I get the error.



cbowditch wrote:
 
 pdiop wrote:
 I need your help everybody. I am getting the following error while 
 running fop on resin : java.lang.NullPointerException at 
   
 org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:290)
  
 
   at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:185)
   at com.caucho.xml.SAXBuilder.popElement(SAXBuilder.java:291) at
 
 What version of FOP are you running? Can you provide a sample FO that 
 causes the error (not XML + XSLT)
 
 Thanks,
 
 Chris
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/java.lang.NullPointerException-tp16713234p16721673.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: java.lang.NullPointerException

2008-04-16 Thread andreas . delmelle
- Oorspronkelijk bericht -
Van: pdiop [mailto:[EMAIL PROTECTED]


Hi,

Note that Chris has asked a *FO*, not a stylesheet. Reason why we always ask 
the *result* of the XSL transform, is that the step of transforming the base 
XML into FO is actually not done by FOP.
On top of that, we cannot possibly reproduce your issue with a stylesheet 
alone. We'd need at least the included stylesheet and a sample XML.

I am using Fop 0.94 with Resin 2.1.17 an Java 1.4.

Java 1.4.2? Which build? Is it the Sun JVM, or a different vendor?


I am not exactly using a fo file ut a xslt with fo inside and a xml, here is
the sample of the xslt file:
snip /

I must also say that the program is running fine in a standalone version
(web project) but once I integrate to a bigger project with lot of things in
it I get the error.

I don't think the problem is situated in the FO itself.

I suspect the issue is caused by the combination of XML parser and XSLT 
processor in the environment. Sun Java, for example, ships with versions of 
Xerces and Xalan, and in some (mainly older) builds, the included versions are 
a bit buggy.

Try to make sure that the 'bigger' environment is using the same combination as 
in your local test. No idea how to configure this in Resin, but for the 
standard Java way, google around for 'Java endorsed' or 'Java bootclasspath'.


HTH!

Cheers

Andreas



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: java.lang.NullPointerException

2008-04-16 Thread Jeremias Maerki
I agree with Andreas' observations. Looking at the source code of 0.94,
the SAX delegate is probably null which would suggest that this Caucho
SAXBuilder class didn't call startDocument() before starting with
startElement() calls. So, probably a breach of the SAX ContentHandler
contract by the caller.

On 16.04.2008 15:47:03 andreas.delmelle wrote:
 - Oorspronkelijk bericht -
 Van: pdiop [mailto:[EMAIL PROTECTED]
 
 
 Hi,
 
 Note that Chris has asked a *FO*, not a stylesheet. Reason why we always ask 
 the *result* of the XSL transform, is that the step of transforming the base 
 XML into FO is actually not done by FOP.
 On top of that, we cannot possibly reproduce your issue with a stylesheet 
 alone. We'd need at least the included stylesheet and a sample XML.
 
 I am using Fop 0.94 with Resin 2.1.17 an Java 1.4. 
 
 Java 1.4.2? Which build? Is it the Sun JVM, or a different vendor?
 
 
 I am not exactly using a fo file ut a xslt with fo inside and a xml, here is
 the sample of the xslt file:
 snip /
 
 I must also say that the program is running fine in a standalone version
 (web project) but once I integrate to a bigger project with lot of things in
 it I get the error.
 
 I don't think the problem is situated in the FO itself.
 
 I suspect the issue is caused by the combination of XML parser and XSLT 
 processor in the environment. Sun Java, for example, ships with versions of 
 Xerces and Xalan, and in some (mainly older) builds, the included versions 
 are a bit buggy.
 
 Try to make sure that the 'bigger' environment is using the same combination 
 as in your local test. No idea how to configure this in Resin, but for the 
 standard Java way, google around for 'Java endorsed' or 'Java bootclasspath'.
 
 
 HTH!
 
 Cheers
 
 Andreas



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]