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 Adrian Cumiskey <ad...@gmail.com> on 2008/11/05 12:01:03 UTC

Re: Problem upgrading from 0.94 to 0.95

Also it may be helpful if you are able to tell us which version of JEuclid you are using.

Adrian.

Adrian Cumiskey wrote:
> Hi Paul,
> 
> The NullPointerException is coming from the ImageInputStream being 
> null.  This looks like one for Max as I suspect it may be a problem with 
> the JEuclid PreloaderMathML class when it constructs its 
> ImageInputStreamAdapter.  Could you host your source document somewhere 
> and I'll take a look at it.
> 
> Adrian.
> 
> Nobble wrote:
>> I have upgraded from fop 0.94 to 0.95. However, when I try to compile my
>> document I now get:
>>
>> Making portrait pages on A4 paper (210mmx297mm)
>> 05-Nov-2008 10:24:54 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.xmlgraphics.image.loader.util.ImageInputStreamAdapter.mark(ImageInputStreamAdapter.java:77) 
>>
>>         at java.io.FilterInputStream.mark(FilterInputStream.java:175)
>>         at
>> net.sourceforge.jeuclid.xmlgraphics.PreloaderMathML.parseSource(PreloaderMathML.java:119) 
>>
>>         at
>> net.sourceforge.jeuclid.xmlgraphics.PreloaderMathML.preloadImage(PreloaderMathML.java:76) 
>>
>>         at
>> org.apache.xmlgraphics.image.loader.ImageManager.preloadImage(ImageManager.java:165) 
>>
>>         at
>> org.apache.xmlgraphics.image.loader.cache.ImageCache.needImageInfo(ImageCache.java:96) 
>>
>>         at
>> org.apache.xmlgraphics.image.loader.ImageManager.getImageInfo(ImageManager.java:112) 
>>
>>         at
>> org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:79)
>>         at org.apache.fop.fo.FObj.processNode(FObj.java:126)
>>         at
>> org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:286) 
>>
>>         at
>> org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:163)
>>         at
>> org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072) 
>>
>>         at 
>> org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown
>> Source)
>>         at
>> org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
>> Source)
>>         at 
>> org.apache.xerces.xinclude.XIncludeHandler.emptyElement(Unknown
>> Source)
>>         at
>> org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(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)
>>
>> I this a bug or something I have done wrong? I am not sure how to go 
>> about
>> debugging it. Any help gratefully received. Thanks.
> 
> 


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


Re: Problem upgrading from 0.94 to 0.95

Posted by Nobble <pa...@gmail.com>.
Well, I removed the jeuclid libraries and apache fop compiled the document
but threw up some errors. One of those errors concerned an incorrectly
specified path to a system directory containing images. The drive
specification was missing from an uri of the form file:///... I added the
drive specification (file:///C:/...) and this error was fixed. There were
lots of font warnings and most of the symbols in the document are currently
represented by a hash, but I have ignored that for the moment as a separate
issue to fix.

I then put the jeuclid libraries back... and low and behold, I am no longer
able to reproduce the crash I was having before. I have also tried a
document containing mathml, and even though there are other problems with
it, the mathml is rendering just file.

So, it appears to have been a false alarm, or, at least, apache fop wasn't
correctly catching some file specification error and providing a sensible
error message.

Cheers, Paul


Max Berger wrote:
> 
> Paul,
> 
> due to changes in the ImageLoader API you have to use matching version
> of JEuclid for FOP to work.
> 
> I tried to reproduce your error and I was unable to reproduce it using
> FOP trunk and JEuclid 3.1.3.
> 
> Also, in the .fo given:
> http://www.nabble.com/file/p20339979/doc.xml.fo
> 
> There is no MathML used.
> 
> If this is the file you're having trouble with:
> - delete (temporary) the jeuclid libs and see if that helps. If so, I
> need to fix this in JEuclid [ I'll then ask for more information ].
> - if that did not change anything it's a bug in fop. In this case,
> please make the PNG files available, maybe there error lies therein?
> 
> 
> Max
>  
> 

-- 
View this message in context: http://www.nabble.com/Problem-upgrading-from-0.94-to-0.95-tp20339312p20358356.html
Sent from the FOP - Dev mailing list archive at Nabble.com.


Re: Problem upgrading from 0.94 to 0.95

Posted by Max Berger <ma...@berger.name>.
Paul,

due to changes in the ImageLoader API you have to use matching version
of JEuclid for FOP to work.

I tried to reproduce your error and I was unable to reproduce it using
FOP trunk and JEuclid 3.1.3.

Also, in the .fo given:
http://www.nabble.com/file/p20339979/doc.xml.fo

There is no MathML used.

If this is the file you're having trouble with:
- delete (temporary) the jeuclid libs and see if that helps. If so, I
need to fix this in JEuclid [ I'll then ask for more information ].
- if that did not change anything it's a bug in fop. In this case,
please make the PNG files available, maybe there error lies therein?


Max



Nobble schrieb:
> I have now tried with the combination: apache fop 0.95 and jEuclid 3.0.3. I
> get this error:
> 
> Making portrait pages on A4 paper (210mmx297mm)
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/fop/image/analyser/XMLReader$Converter
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:169)
>         at
> org.apache.fop.fo.ElementMappingRegistry.addElementMapping(ElementMappingRegistry.java:94)
>         at
> org.apache.fop.fo.ElementMappingRegistry.setupDefaultMappings(ElementMappingRegistry.java:77)
>         at
> org.apache.fop.fo.ElementMappingRegistry.<init>(ElementMappingRegistry.java:64)
>         at org.apache.fop.apps.FopFactory.<init>(FopFactory.java:151)
>         at org.apache.fop.apps.FopFactory.newInstance(FopFactory.java:166)
>         at
> org.apache.fop.cli.CommandLineOptions.<init>(CommandLineOptions.java:102)
>         at org.apache.fop.cli.Main.startFOP(Main.java:153)
>         at org.apache.fop.cli.Main.main(Main.java:197)
> 
> Paul
> 
> 
> Adrian Cumiskey wrote:
>> Also it may be helpful if you are able to tell us which version of JEuclid
>> you are using.
>>
>> Adrian.
>>



Re: Problem upgrading from 0.94 to 0.95

Posted by Nobble <pa...@gmail.com>.
I have now tried with the combination: apache fop 0.95 and jEuclid 3.0.3. I
get this error:

Making portrait pages on A4 paper (210mmx297mm)
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/fop/image/analyser/XMLReader$Converter
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at
org.apache.fop.fo.ElementMappingRegistry.addElementMapping(ElementMappingRegistry.java:94)
        at
org.apache.fop.fo.ElementMappingRegistry.setupDefaultMappings(ElementMappingRegistry.java:77)
        at
org.apache.fop.fo.ElementMappingRegistry.<init>(ElementMappingRegistry.java:64)
        at org.apache.fop.apps.FopFactory.<init>(FopFactory.java:151)
        at org.apache.fop.apps.FopFactory.newInstance(FopFactory.java:166)
        at
org.apache.fop.cli.CommandLineOptions.<init>(CommandLineOptions.java:102)
        at org.apache.fop.cli.Main.startFOP(Main.java:153)
        at org.apache.fop.cli.Main.main(Main.java:197)

Paul


Adrian Cumiskey wrote:
> 
> Also it may be helpful if you are able to tell us which version of JEuclid
> you are using.
> 
> Adrian.
> 
-- 
View this message in context: http://www.nabble.com/Problem-upgrading-from-0.94-to-0.95-tp20339312p20340057.html
Sent from the FOP - Dev mailing list archive at Nabble.com.


Re: Problem upgrading from 0.94 to 0.95

Posted by Nobble <pa...@gmail.com>.
I upgraded jEuclid at the same time as I upgraded fop. I was using jEuclid
3.0.3 with fop 0.94... but am using jEuclid 3.1.3 with fop 0.95.

Paul


Adrian Cumiskey wrote:
> 
> Also it may be helpful if you are able to tell us which version of JEuclid
> you are using.
> 
> Adrian.
> 

-- 
View this message in context: http://www.nabble.com/Problem-upgrading-from-0.94-to-0.95-tp20339312p20340008.html
Sent from the FOP - Dev mailing list archive at Nabble.com.