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 Laura Ameijide Garcia <la...@mbsistemes.com> on 2003/01/13 10:06:26 UTC

ERROR Divided by zero

Hello,
I'm beginner in this area. I'm trying to convert a simple html using a xsl....  but the fop always says me:
[ERROR]: / by zero.

Somebody can help me? What's the meaning of this error?

Thanks in advance!

 
.Laura

Re: ERROR Divided by zero

Posted by Jeremias Maerki <de...@greenmail.ch>.
Ok, the first part is easy. That's an old bug on 0.20.3. Please upgrade
to the 0.20.5rc. But you still need to fix the problem that FOP really
doesn't generate even one page. To track this down, generate the FO file
by just running your XSLT processor but not FOP. Then analyze what's
wrong. If you don't succeed post your FO file.

On 13.01.2003 11:53:20 Laura Ameijide Garcia wrote:

<snip/>

> [INFO]: FOP 0.20.3

<snip/>

> [DEBUG]: Pages rendererd: 0

<snip/>
> java.lang.ArithmeticException: / by zero


Jeremias Maerki


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


Re: Upgrade 0.20.3 to 0.20.5rc

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Dipl.-Oec. Harald Meyer wrote:
> By the way ... the "/ by zero" error was already posted in January, but I
> didn't find any solution for it. Has anyone some hints for me? ;-)

IIRC this was a problem with either the Xerces or Xalan jar packaged
with FOP 0.20.3. Upgrading the jars should solve it.

J.Pietschmann



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


Re: AW: Upgrade 0.20.3 to 0.20.5rc

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Dipl.-Oec. Harald Meyer wrote:
> org.xml.sax.SAXParseException: Content is not allowed in prolog.

Check your XML source files whether there is something before the
XML declaration (i.e. the line <?xml version...?>). There must
not be anything before it, not even an empty line. I vaguely
remember that this could also be caused by a certain parser
release. If you are using JDK 1.4, put a recent Xerces jar into
the lib/endorsed directory, otherwise, make sure you have the Xerces
jar from the FOP distribution or a more recent jar in the classpath,
and no older jar before it.

J.Pietschmann


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


AW: Upgrade 0.20.3 to 0.20.5rc

Posted by "Dipl.-Oec. Harald Meyer" <me...@cybay.de>.
> I think you have avalon-framework-4.0 in your classpath. This file has
> changed.
> It is now called avalon-framework-cvs... and was part of my source
> distribution.
> Serach for such a file and change the classpath. This should fix your
> problem.
>

Thanks, but now I get another error and I need some help ... ;-)

C:\fop>java -cp
build\fop.jar;lib\xml-apis.jar;lib\xercesImpl-2.2.1.jar;lib\xalan-2.4.1.jar;
lib\batik.jar;lib\avalon-framework-cvs-20020806.jar;lib\jimi-1.0.jar;lib\jai
_core.jar;lib\jai_codec.jar org.apache.fop.apps.Fop -d -xml
C:\Inetpub\honeywell\quotation\xml\200443.xml -xsl C:\Inetpub\honeywe
ll\quotation\xml2pdf.xsl C:\Inetpub\honeywell\quotation\pdf\200443.pdf
[DEBUG] Input mode:
[DEBUG] xslt transformation
[DEBUG] xml input file: C:\Inetpub\honeywell\quotation\xml\200443.xml
[DEBUG] xslt stylesheet: C:\Inetpub\honeywell\quotation\xml2pdf.xsl
[DEBUG] Output mode:
[DEBUG] pdf
[DEBUG] output file: C:\Inetpub\honeywell\quotation\pdf\200443.pdf
[DEBUG] OPTIONS
[DEBUG] no user configuration file is used [default]
[DEBUG] debug mode on
[DEBUG] dump configuration
[DEBUG] quiet mode on
[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] base directory: file:/C:/Inetpub/honeywell/quotation/xml/
[INFO] FOP 0.20.5rc
[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[ERROR] Content is not allowed in prolog.
org.apache.fop.apps.FOPException: Content is not allowed in prolog.
        at org.apache.fop.apps.Driver.render(Driver.java:462)
        at
org.apache.fop.apps.CommandLineStarter.run(CommandLineStarter.java:69)
        at org.apache.fop.apps.Fop.main(Fop.java:19)

---------

org.xml.sax.SAXParseException: Content is not allowed in prolog.
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.xalan.transformer.TrAXFilter.parse(Unknown Source)
        at org.apache.fop.apps.Driver.render(Driver.java:457)
        at
org.apache.fop.apps.CommandLineStarter.run(CommandLineStarter.java:69)
        at org.apache.fop.apps.Fop.main(Fop.java:19)

---------

org.xml.sax.SAXParseException: Content is not allowed in prolog.
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.xalan.transformer.TrAXFilter.parse(Unknown Source)
        at org.apache.fop.apps.Driver.render(Driver.java:457)
        at
org.apache.fop.apps.CommandLineStarter.run(CommandLineStarter.java:69)
        at org.apache.fop.apps.Fop.main(Fop.java:19)



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


AW: Upgrade 0.20.3 to 0.20.5rc

Posted by Mirko Sertic <Mi...@dtmgmbh.de>.
I think you have avalon-framework-4.0 in your classpath. This file has
changed.
It is now called avalon-framework-cvs... and was part of my source
distribution.
Serach for such a file and change the classpath. This should fix your
problem.

Cheers

Mirko Sertic

-----Ursprüngliche Nachricht-----
Von: Dipl.-Oec. Harald Meyer [mailto:meyer@cybay.de]
Gesendet: Mittwoch, 19. März 2003 13:20
An: fop-user@xml.apache.org
Betreff: Upgrade 0.20.3 to 0.20.5rc


Hello everybody,

as I get a "/ by zero" error under FOP 0.20.3 I want to upgrade to 0.20.5rc.
Unfortunately now I get a different error:

C:\fop\fop-0.20.5rc>java -cp
build\fop.jar;lib\batik.jar;lib\xalan-2.0.0.jar;lib\xerces-1.2.3.jar;lib\ava
lon-framework-4.0.jar;lib\logkit-1.0.jar;lib\jimi-1.0.jar
org.apache.fop.apps.Fop -xml
C:\Inetpub\honeywell\quotation\xml\200443.xml -d -xsl
C:\Inetpub\honeywell\quotation\xml2pdf.xsl
C:\Inetpub\honeywell\quotation\pdf\200443.pdf
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/avalon/framework/logger/Logger
        at org.apache.fop.apps.Fop.main(Fop.java:16)

Has someone experienced something similar?
By the way ... the "/ by zero" error was already posted in January, but I
didn't find any solution for it. Has anyone some hints for me? ;-)

Thanks
Harald



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


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


Upgrade 0.20.3 to 0.20.5rc

Posted by "Dipl.-Oec. Harald Meyer" <me...@cybay.de>.
Hello everybody,

as I get a "/ by zero" error under FOP 0.20.3 I want to upgrade to 0.20.5rc.
Unfortunately now I get a different error:

C:\fop\fop-0.20.5rc>java -cp
build\fop.jar;lib\batik.jar;lib\xalan-2.0.0.jar;lib\xerces-1.2.3.jar;lib\ava
lon-framework-4.0.jar;lib\logkit-1.0.jar;lib\jimi-1.0.jar
org.apache.fop.apps.Fop -xml
C:\Inetpub\honeywell\quotation\xml\200443.xml -d -xsl
C:\Inetpub\honeywell\quotation\xml2pdf.xsl
C:\Inetpub\honeywell\quotation\pdf\200443.pdf
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/avalon/framework/logger/Logger
        at org.apache.fop.apps.Fop.main(Fop.java:16)

Has someone experienced something similar?
By the way ... the "/ by zero" error was already posted in January, but I
didn't find any solution for it. Has anyone some hints for me? ;-)

Thanks
Harald



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


Re: ERROR Divided by zero

Posted by Laura Ameijide Garcia <la...@mbsistemes.com>.
If I execute it in the comand thats the result:  It's for my version?

.Laura

C:\fop\fop-0.20.3>java -cp
build\fop.jar;lib\batik.jar;lib\xalan-2.0.0.jar;lib\xerces-1.2.3.jar;
lib\avalon-framework 4.0.jar;lib\logkit1.0.jar;lib\jimi-1.0.jar
org.apache.fop.apps.Fop -d -xml evalu.html -xsl evalu.xsl evalu.pdf

[DEBUG]: Input mode:
[DEBUG]: xslt transformation
[DEBUG]: xml input file: evalu.html
[DEBUG]: xslt stylesheet: gastronofo.xsl
[DEBUG]: Output mode:
[DEBUG]: pdf
[DEBUG]: output file: evalu.pdf
[DEBUG]: OPTIONS
[DEBUG]: no user configuration file is used [default]
[DEBUG]: debug mode on
[DEBUG]: dump configuration
[DEBUG]: quiet mode on
[DEBUG]: base directory: file:/C:/fop/fop-0.20.3/
[INFO]: FOP 0.20.3
[DEBUG]: using SAX parser org.apache.xerces.parsers.SAXParser
[INFO]: building formatting object tree
[DEBUG]: setting up fonts
[INFO]: Parsing of document complete, stopping renderer
[DEBUG]: Initial heap size: 978Kb
[DEBUG]: Current heap size: 801Kb
[DEBUG]: Total memory used: -177Kb
[DEBUG]:   Memory use is indicative; no GC was performed
[DEBUG]:   These figures should not be used comparatively
[DEBUG]: Total time used: 250ms
[DEBUG]: Pages rendererd: 0
[INFO]: Parsing of document complete, stopping renderer
[ERROR]: / by zero
org.apache.fop.apps.FOPException: / by zero
        at org.apache.fop.apps.Driver.render(Driver.java:486)
        at
org.apache.fop.apps.CommandLineStarter.run(CommandLineStarter.java:72)
        at org.apache.fop.apps.Fop.main(Fop.java:19)

---------

javax.xml.transform.TransformerException: / by zero
        at
org.apache.xalan.transformer.TrAXFilter.parse(TrAXFilter.java:137)
        at org.apache.fop.apps.Driver.render(Driver.java:481)
        at
org.apache.fop.apps.CommandLineStarter.run(CommandLineStarter.java:72)
        at org.apache.fop.apps.Fop.main(Fop.java:19)

---------

javax.xml.transform.TransformerException: / by zero
        at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
ava:1212)
        at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:2894)
        at java.lang.Thread.run(Thread.java:479)
---------
java.lang.ArithmeticException: / by zero
        at
org.apache.fop.apps.StreamRenderer.stopRenderer(StreamRenderer.java:171)
        at
org.apache.fop.fo.FOTreeBuilder.endDocument(FOTreeBuilder.java:205)
        at
org.apache.xalan.transformer.ResultTreeHandler.endDocument(ResultTreeHandler
.java:180)
        at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
ava:1194)
        at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:2894)
        at java.lang.Thread.run(Thread.java:479)




****************************************************************************
*******
----- Original Message -----
From: "Jeremias Maerki" <de...@greenmail.ch>
To: <fo...@xml.apache.org>
Sent: Monday, January 13, 2003 10:46 AM
Subject: Re: ERROR Divided by zero


> This indicates an arithmetic error like: 13 / 0 = illegal. You know that
> from school.
>
> Somewhere in FOP something wanted to divide some value by zero. The
> question now is: where and why?
>
> The first thing you can do is calling FOP from the command line and
> using the "-d" parameter which enables more debug output. That way, we
> will get a stacktrace which helps you/us find the location of the error.
> If the information you will get then doesn't help you, send another
> email and copy the whole output from FOP and attach the xhtml and your
> xsl so we can reproduce the error.
>
> What FOP version do you use?
>
> On 13.01.2003 10:06:26 Laura Ameijide Garcia wrote:
> > Hello,
> > I'm beginner in this area. I'm trying to convert a simple html using a
xsl....  but the fop always says me:
> > [ERROR]: / by zero.
> >
> > Somebody can help me? What's the meaning of this error?
>
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
>


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


Re: ERROR Divided by zero

Posted by Jeremias Maerki <de...@greenmail.ch>.
This indicates an arithmetic error like: 13 / 0 = illegal. You know that
from school.

Somewhere in FOP something wanted to divide some value by zero. The
question now is: where and why?

The first thing you can do is calling FOP from the command line and
using the "-d" parameter which enables more debug output. That way, we
will get a stacktrace which helps you/us find the location of the error.
If the information you will get then doesn't help you, send another
email and copy the whole output from FOP and attach the xhtml and your
xsl so we can reproduce the error.

What FOP version do you use?

On 13.01.2003 10:06:26 Laura Ameijide Garcia wrote:
> Hello,
> I'm beginner in this area. I'm trying to convert a simple html using a xsl....  but the fop always says me:
> [ERROR]: / by zero.
> 
> Somebody can help me? What's the meaning of this error?


Jeremias Maerki


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


Re: ERROR Divided by zero

Posted by Oleg Tkachenko <ol...@multiconn.com>.
Laura Ameijide Garcia wrote:

> I'm beginner in this area. I'm trying to convert a simple html using a 
> xsl....  but the fop always says me:
> [ERROR]: / by zero.
>  
> Somebody can help me? What's the meaning of this error?
You didn't provide enough inforamtion to help you. Please - what fop version 
are you talking about, how do you run it, sample fo document etc.

-- 
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel


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