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 Paulo Carvalho <pj...@gmail.com> on 2008/08/25 12:51:38 UTC

FOP 0.93 vs 0.94 vs 0.95

Hello

I have an FO file and I want to use it to generate a PDF File.

When I use FOP 0.93 by command line, everything works fine. A PDF file is
generated correctly. This PDF file contains a table, text and 3 checkboxes.
When I use FOP 0.93 using Java API, the PDF is generated, no error is
generated but the checkboxes are not generated. They simply does not appear.

With FOP 0.94 using Java API, the result is the same.

With FOP 0.95, using Java API, the PDF is not generated. The following error
is displayed:

Exception in thread "Thread-3" org.eclipse.swt.SWTException: Failed to
execute runnable (java.lang.StackOverflowError)
    at org.eclipse.swt.SWT.error(SWT.java:3374)
    at org.eclipse.swt.SWT.error(SWT.java:3297)
    at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:178)
    at org.eclipse.swt.widgets.Display.syncExec(Display.java:3763)
    at
composite.NouvelleLettreStructuree$6$1$1.run(NouvelleLettreStructuree.java:646)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.StackOverflowError
    at sun.misc.FloatingDecimal.dtoa(Unknown Source)
    at sun.misc.FloatingDecimal.<init>(Unknown Source)
    at java.lang.StringBuffer.append(Unknown Source)
    at
org.apache.fop.fo.properties.PercentLength.toString(PercentLength.java:121)
    at java.lang.String.valueOf(Unknown Source)
    at java.lang.StringBuffer.append(Unknown Source)
    at
org.apache.fop.fo.flow.table.TableColumn.toString(TableColumn.java:233)

Any idea on how can I can generate the PDF correctly using FOP API?

Thanks
Regards.

Re: FOP 0.93 vs 0.94 vs 0.95

Posted by Andreas Delmelle <an...@telenet.be>.
On 04 Dec 2008, at 19:06, Andreas Delmelle wrote:

> On 04 Dec 2008, at 13:14, dahepe wrote:
>
>> <snip />

BTW, just remembered: if it is a possibility for you to create a  
locally patched build of FOP 0.95, another workaround would be to  
apply the fix that way.

If you can, it is really simple. See:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/table/TableColumn.java?r1=670335&r2=670334&pathrev=670335


Cheers

Andreas

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


Re: FOP 0.93 vs 0.94 vs 0.95

Posted by Andreas Delmelle <an...@telenet.be>.
On 04 Dec 2008, at 13:14, dahepe wrote:

> <snip />
> I stumbled across this bug while trying to use fop embedded in an  
> other
> application. Thus removing log4j from the classpath is not an  
> option. As a
> workaround I replaced the percent column width entries with
> proportional-column-width(XX), which produces the same results in the
> output.

I'm not 100% sure, but IIC, this error only arises if the log-level is  
set to DEBUG (which is not really advisable for production systems, as  
it can have a significant impact on the speed of the formatting  
process). I discovered it myself while debugging a run, when the IDE  
could not show the value of a variable (since it also used toString())

If that is the case, the workaround would be to switch to WARN, INFO  
or ERROR.
Can you check if this solves the issue for now?

>> I'm not entirely certain, but it seems like the fix never made it
>> into 0.95. IIC, this issue should not exist in FOP Trunk anymore.
>
>> Can you verify this, or send us the related FO, so we can verify
>> ourselves?
>
> Is there a release schedule for fop0.96 and will this bug be fixed  
> in the
> next stable version??

Not really a fixed schedule, but we'd like to release again early in  
2009.
This bug will definitely be fixed then, since it has been committed to  
FOP Trunk (which will be the basis for the next release)


Cheers

Andreas

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


Re: FOP 0.93 vs 0.94 vs 0.95

Posted by dahepe <pe...@gmx.net>.
Hi,

I'm currently facing exactly the same problem. This somehow seems to be
related to log4j beeing included in the classpath of the java call and using
percent values to specify the column width in a table.

The attached fo-file can be transformed to PDF without log4j beeing in the
classpath like a charm, but with log4j in the classpath it produces a
StackOverflowError:

C:\home\dahepe>fop-0.95\fop.bat -fo log4j.fo -pdf log4j.pdf
log4j:WARN No appenders could be found for logger
(org.apache.fop.util.ContentHandlerFactoryRegistry).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" java.lang.StackOverflowError
...
at java.lang.String.valueOf(String.java:2615)
at java.lang.StringBuffer.append(StringBuffer.java:220)
at org.apache.fop.datatypes.LengthBase.toString(LengthBase.java:135)
at java.lang.String.valueOf(String.java:2615)
at java.lang.StringBuffer.append(StringBuffer.java:220)
at
org.apache.fop.fo.properties.PercentLength.toString(PercentLength.java:121)
at java.lang.String.valueOf(String.java:2615)
at java.lang.StringBuffer.append(StringBuffer.java:220)
at org.apache.fop.fo.flow.table.TableColumn.toString(TableColumn.java:233)
at java.lang.String.valueOf(String.java:2615)
at java.lang.StringBuffer.append(StringBuffer.java:220)
at org.apache.fop.datatypes.LengthBase.toString(LengthBase.java:135)
at java.lang.String.valueOf(String.java:2615)
at java.lang.StringBuffer.append(StringBuffer.java:220)
at
org.apache.fop.fo.properties.PercentLength.toString(PercentLength.java:121)
at java.lang.String.valueOf(String.java:2615)

As mentioned the only difference between a working and non working call is
log4j in the classpath. Thus to get the error the classpath declaration in
my fop.bat changed a little:
...
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\fop-hyph.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\log4j-1.2.15.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%FOP_HYPHENATION_PATH%
...

I stumbled across this bug while trying to use fop embedded in an other
application. Thus removing log4j from the classpath is not an option. As a
workaround I replaced the percent column width entries with
proportional-column-width(XX), which produces the same results in the
output.

>I'm not entirely certain, but it seems like the fix never made it  
>into 0.95. IIC, this issue should not exist in FOP Trunk anymore.

>Can you verify this, or send us the related FO, so we can verify  
>ourselves?

Is there a release schedule for fop0.96 and will this bug be fixed in the
next stable version??

Best regards,
Daniel

http://www.nabble.com/file/p20832245/log4j.fo log4j.fo 
-- 
View this message in context: http://www.nabble.com/FOP-0.93-vs-0.94-vs-0.95-tp19141580p20832245.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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


Re: FOP 0.93 vs 0.94 vs 0.95

Posted by Paulo Carvalho <pj...@gmail.com>.
Ok, thank you for your answer.
Im gonna try with the FOP trunk and I will let you know.

Best regards

On Mon, Aug 25, 2008 at 6:24 PM, Andreas Delmelle <
andreas.delmelle@telenet.be> wrote:

> On Aug 25, 2008, at 13:42, Paulo Carvalho wrote:
>
> Hi
>
>  I solved the checkbox problem. It was a problem of the FO file.
>> However, I cannot understand why it doesn't work with FOP 0.95.
>>
>
> That was due to a regression, where PercentLength.toString() indirectly
> called itself (a consequence of using Object.toString() instead of
> Property.getString())
>
> I'm not entirely certain, but it seems like the fix never made it into
> 0.95. IIC, this issue should not exist in FOP Trunk anymore.
>
> Can you verify this, or send us the related FO, so we can verify ourselves?
>
>
> Thanks
>
> Andreas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>

Re: FOP 0.93 vs 0.94 vs 0.95

Posted by Andreas Delmelle <an...@telenet.be>.
On Aug 25, 2008, at 13:42, Paulo Carvalho wrote:

Hi

> I solved the checkbox problem. It was a problem of the FO file.
> However, I cannot understand why it doesn't work with FOP 0.95.

That was due to a regression, where PercentLength.toString()  
indirectly called itself (a consequence of using Object.toString()  
instead of Property.getString())

I'm not entirely certain, but it seems like the fix never made it  
into 0.95. IIC, this issue should not exist in FOP Trunk anymore.

Can you verify this, or send us the related FO, so we can verify  
ourselves?


Thanks

Andreas

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


Re: FOP 0.93 vs 0.94 vs 0.95

Posted by Paulo Carvalho <pj...@gmail.com>.
Hello

I solved the checkbox problem. It was a problem of the FO file.
However, I cannot understand why it doesn't work with FOP 0.95.

Thanks
Regards

On Mon, Aug 25, 2008 at 1:04 PM, Tobias van Treeck <tv...@nepatec.de>wrote:

> Hi,
>
> can you post your FO or your stylesheet?
>
> >PercentLength.toString
> Seems to be a problem with that line. Do you use percent somewhere?
>
> Regards,
> ToM
>
>
> > Hello
> >
> > I have an FO file and I want to use it to generate a PDF File.
> >
> > When I use FOP 0.93 by command line, everything works fine. A PDF file
> > is
> > generated correctly. This PDF file contains a table, text and 3
> > checkboxes.
> > When I use FOP 0.93 using Java API, the PDF is generated, no error is
> > generated but the checkboxes are not generated. They simply does not
> > appear.
> >
> > With FOP 0.94 using Java API, the result is the same.
> >
> > With FOP 0.95, using Java API, the PDF is not generated. The following
> > error
> > is displayed:
> >
> > Exception in thread "Thread-3" org.eclipse.swt.SWTException: Failed to
> > execute runnable (java.lang.StackOverflowError)
> > at org.eclipse.swt.SWT.error(SWT.java:3374)
> > at org.eclipse.swt.SWT.error(SWT.java:3297)
> > at
> > org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:178)
> > at org.eclipse.swt.widgets.Display.syncExec(Display.java:3763)
> > at
> >
> >
> composite.NouvelleLettreStructuree$6$1$1.run(NouvelleLettreStructuree.java:646)
> > at java.lang.Thread.run(Unknown Source)
> > Caused by: java.lang.StackOverflowError
> > at sun.misc.FloatingDecimal.dtoa(Unknown Source)
> > at sun.misc.FloatingDecimal.<init>(Unknown Source)
> > at java.lang.StringBuffer.append(Unknown Source)
> > at
> >
> >
> org.apache.fop.fo.properties.PercentLength.toString(PercentLength.java:121)
> > at java.lang.String.valueOf(Unknown Source)
> > at java.lang.StringBuffer.append(Unknown Source)
> > at
> >
> > org.apache.fop.fo.flow.table.TableColumn.toString(TableColumn.java:233)
> >
> > Any idea on how can I can generate the PDF correctly using FOP API?
> >
> > Thanks
> > Regards.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>

Re: FOP 0.93 vs 0.94 vs 0.95

Posted by Tobias van Treeck <tv...@nepatec.de>.
Hi,

can you post your FO or your stylesheet?

>PercentLength.toString
Seems to be a problem with that line. Do you use percent somewhere?

Regards,
ToM


> Hello
>
> I have an FO file and I want to use it to generate a PDF File.
>
> When I use FOP 0.93 by command line, everything works fine. A PDF file
> is
> generated correctly. This PDF file contains a table, text and 3
> checkboxes.
> When I use FOP 0.93 using Java API, the PDF is generated, no error is
> generated but the checkboxes are not generated. They simply does not
> appear.
>
> With FOP 0.94 using Java API, the result is the same.
>
> With FOP 0.95, using Java API, the PDF is not generated. The following
> error
> is displayed:
>
> Exception in thread "Thread-3" org.eclipse.swt.SWTException: Failed to
> execute runnable (java.lang.StackOverflowError)
> at org.eclipse.swt.SWT.error(SWT.java:3374)
> at org.eclipse.swt.SWT.error(SWT.java:3297)
> at
> org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:178)
> at org.eclipse.swt.widgets.Display.syncExec(Display.java:3763)
> at
>
> composite.NouvelleLettreStructuree$6$1$1.run(NouvelleLettreStructuree.java:646)
> at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.StackOverflowError
> at sun.misc.FloatingDecimal.dtoa(Unknown Source)
> at sun.misc.FloatingDecimal.<init>(Unknown Source)
> at java.lang.StringBuffer.append(Unknown Source)
> at
>
> org.apache.fop.fo.properties.PercentLength.toString(PercentLength.java:121)
> at java.lang.String.valueOf(Unknown Source)
> at java.lang.StringBuffer.append(Unknown Source)
> at
>
> org.apache.fop.fo.flow.table.TableColumn.toString(TableColumn.java:233)
>
> Any idea on how can I can generate the PDF correctly using FOP API?
>
> Thanks
> Regards.


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