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 dinuka dayarathna <di...@gmail.com> on 2011/05/11 13:20:39 UTC

ExampleXML2PDF.java ERROR

(I have sent this problem earlier. but not sure whether it is delivered or
not. that's why I re-send this)

I'm developing an application to convert ADF BC tables to PDF format.
I'm following the example given at this link
ExampleXML2PDF.java<http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleXML2PDF.java?view=markup>.
This is the application which I had searched from a long time.

But when I build and run this application it gives me the following error.
=========================================================================================
FOP ExampleXML2PDF

Preparing...
Input: XML
(C:\JDeveloper\mywork\testinig\ViewController\src\test\view\xml\xml\projectteam.xml)
Stylesheet:
C:\JDeveloper\mywork\testinig\ViewController\src\test\view\xml\xslt\projectteam2fo.xsl
Output: PDF
(C:\JDeveloper\mywork\testinig\ViewController\src\test\view\ResultXML2PDF.pdf)

Transforming...
Exception in thread "main" java.lang.NoSuchMethodError:
org.apache.xmlgraphics.util.Service.providerNames(Ljava/lang/Class;)Ljava/util/Iterator;
    at org.apache.fop.fo.ElementMappingRegistry.setupDefaultMappings
(ElementMappingRegistry.java:75)
    at org.apache.fop.fo.ElementMappingRegistry.<init>
(ElementMappingRegistry.java:67)
    at org.apache.fop.apps.FopFactory.<init>(FopFactory.java:162)
    at org.apache.fop.apps.FopFactory.newInstance(FopFactory.java:186)
    at test.client.ExampleXML2PDF.main(ExampleXML2PDF.java:45)
Process exited with exit code 1.
=========================================================================================
Please tell me what is the issue and if it is a problem with the jar files
I'm using, please be kind enough to send me links for the newest jar files.
I had generated the xml files too. I have attached my xml file to this
email.

thank you a lot.
Dinuka.

Re: ExampleXML2PDF.java ERROR

Posted by dinuka dayarathna <di...@gmail.com>.
Thanks a lot everybody for helping me.
As I assumed the problem was with the JAR files I had used. Got the correct
JAR files and now the problem was solved.
Everything works well.

Thanks a lot for helping me. Keep it up.
Dinuka.

RE: ExampleXML2PDF.java ERROR

Posted by Theresa Jayne Forster <th...@inbrand.co.uk>.
On another note I had lots of classdef not founds and discovered I needed

Avalon Framework

Xml-api-ext

Commons.configuration 

And

Xmlgraphics.commons-1.5svn.jar 

 

libraries

 

 

Kindest regards

 


Theresa Forster

Senior Software Developer




 

From: dinuka dayarathna [mailto:dinukaonline@gmail.com] 
Sent: 11 May 2011 12:21
To: fop-users@xmlgraphics.apache.org
Subject: ExampleXML2PDF.java ERROR

 

(I have sent this problem earlier. but not sure whether it is delivered or
not. that's why I re-send this)

I'm developing an application to convert ADF BC tables to PDF format.
I'm following the example given at this link ExampleXML2PDF.java
<http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/examples/embedding/java/
embedding/ExampleXML2PDF.java?view=markup> . This is the application which I
had searched from a long time.

But when I build and run this application it gives me the following error.
============================================================================
=============

FOP ExampleXML2PDF

Preparing...
Input: XML
(C:\JDeveloper\mywork\testinig\ViewController\src\test\view\xml\xml\projectt
eam.xml)
Stylesheet:
C:\JDeveloper\mywork\testinig\ViewController\src\test\view\xml\xslt\projectt
eam2fo.xsl
Output: PDF
(C:\JDeveloper\mywork\testinig\ViewController\src\test\view\ResultXML2PDF.pd
f)

Transforming...
Exception in thread "main" java.lang.NoSuchMethodError:
org.apache.xmlgraphics.util.Service.providerNames(Ljava/lang/Class;)Ljava/ut
il/Iterator;
    at
org.apache.fop.fo.ElementMappingRegistry.setupDefaultMappings(ElementMapping
Registry.java:75)
    at
org.apache.fop.fo.ElementMappingRegistry.<init>(ElementMappingRegistry.java:
67)
    at org.apache.fop.apps.FopFactory.<init>(FopFactory.java:162)
    at org.apache.fop.apps.FopFactory.newInstance(FopFactory.java:186)
    at test.client.ExampleXML2PDF.main(ExampleXML2PDF.java:45)
Process exited with exit code 1.
============================================================================
=============
Please tell me what is the issue and if it is a problem with the jar files
I'm using, please be kind enough to send me links for the newest jar files.
I had generated the xml files too. I have attached my xml file to this
email.

thank you a lot.
Dinuka.


Re: ExampleXML2PDF.java ERROR

Posted by Mike Ferrando <mi...@yahoo.com>.
Dinuka,
Let me know if you don't get a response.

I can send you some files that will work.

Sincerely,
Mike Ferrando
Washington, DC




________________________________
From: dinuka dayarathna <di...@gmail.com>
To: fop-users@xmlgraphics.apache.org
Sent: Wed, May 11, 2011 2:06:44 PM
Subject: Re: ExampleXML2PDF.java ERROR

Please can somebody send me a working application and the JAR files you are 
using.
I'm stuck at this point. I had done everything which I can do. But it does not 
work.
Please help me.

Thanks a lot for all your support.
Dinuka.

Re: ExampleXML2PDF.java ERROR

Posted by dinuka dayarathna <di...@gmail.com>.
Please can somebody send me a working application and the JAR files you are
using.
I'm stuck at this point. I had done everything which I can do. But it does
not work.
Please help me.

Thanks a lot for all your support.
Dinuka.

AW: ExampleXML2PDF.java ERROR

Posted by Georg Datterl <ge...@geneon.de>.
Hi dinuka,

Which version of fop and which version of xmlgraphics do you use?

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<http://www.geneon.de>

Weitere Mitglieder der Willmy MediaGroup:

IRS Integrated Realization Services GmbH:    www.irs-nbg.de<http://www.irs-nbg.de>
Willmy PrintMedia GmbH:                      www.willmy.de<http://www.willmy.de>
Willmy Consult & Content GmbH:               www.willmycc.de<http://www.willmycc.de>

Von: Theresa Jayne Forster [mailto:theresa@inbrand.co.uk]
Gesendet: Mittwoch, 11. Mai 2011 14:01
An: fop-users@xmlgraphics.apache.org
Betreff: RE: ExampleXML2PDF.java ERROR

Looks strange, I have had no problem with the latest from Trunk and the stand alone program here  http://pastebin.com/zzQrHwwD
Except for the Font issue I am having that is.

Maybe have a look at the code I have there and see where yours differs, mine takes xml/xslt and turns it into PDF


Kindest regards


Theresa Forster
Senior Software Developer

From: dinuka dayarathna [mailto:dinukaonline@gmail.com]
Sent: 11 May 2011 12:21
To: fop-users@xmlgraphics.apache.org
Subject: ExampleXML2PDF.java ERROR

(I have sent this problem earlier. but not sure whether it is delivered or not. that's why I re-send this)

I'm developing an application to convert ADF BC tables to PDF format.
I'm following the example given at this link ExampleXML2PDF.java<http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleXML2PDF.java?view=markup>. This is the application which I had searched from a long time.

But when I build and run this application it gives me the following error.
=========================================================================================
FOP ExampleXML2PDF

Preparing...
Input: XML (C:\JDeveloper\mywork\testinig\ViewController\src\test\view\xml\xml\projectteam.xml)
Stylesheet: C:\JDeveloper\mywork\testinig\ViewController\src\test\view\xml\xslt\projectteam2fo.xsl
Output: PDF (C:\JDeveloper\mywork\testinig\ViewController\src\test\view\ResultXML2PDF.pdf)

Transforming...
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.xmlgraphics.util.Service.providerNames(Ljava/lang/Class;)Ljava/util/Iterator;
    at org.apache.fop.fo.ElementMappingRegistry.setupDefaultMappings(ElementMappingRegistry.java:75)
    at org.apache.fop.fo.ElementMappingRegistry.<init>(ElementMappingRegistry.java:67)
    at org.apache.fop.apps.FopFactory.<init>(FopFactory.java:162)
    at org.apache.fop.apps.FopFactory.newInstance(FopFactory.java:186)
    at test.client.ExampleXML2PDF.main(ExampleXML2PDF.java:45)
Process exited with exit code 1.
=========================================================================================
Please tell me what is the issue and if it is a problem with the jar files I'm using, please be kind enough to send me links for the newest jar files.
I had generated the xml files too. I have attached my xml file to this email.

thank you a lot.
Dinuka.

RE: ExampleXML2PDF.java ERROR

Posted by Theresa Jayne Forster <th...@inbrand.co.uk>.
Looks strange, I have had no problem with the latest from Trunk and the
stand alone program here  http://pastebin.com/zzQrHwwD

Except for the Font issue I am having that is. 

 

Maybe have a look at the code I have there and see where yours differs, mine
takes xml/xslt and turns it into PDF

 

 

Kindest regards

 


Theresa Forster

Senior Software Developer




From: dinuka dayarathna [mailto:dinukaonline@gmail.com] 
Sent: 11 May 2011 12:21
To: fop-users@xmlgraphics.apache.org
Subject: ExampleXML2PDF.java ERROR

 

(I have sent this problem earlier. but not sure whether it is delivered or
not. that's why I re-send this)

I'm developing an application to convert ADF BC tables to PDF format.
I'm following the example given at this link ExampleXML2PDF.java
<http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/examples/embedding/java/
embedding/ExampleXML2PDF.java?view=markup> . This is the application which I
had searched from a long time.

But when I build and run this application it gives me the following error.
============================================================================
=============

FOP ExampleXML2PDF

Preparing...
Input: XML
(C:\JDeveloper\mywork\testinig\ViewController\src\test\view\xml\xml\projectt
eam.xml)
Stylesheet:
C:\JDeveloper\mywork\testinig\ViewController\src\test\view\xml\xslt\projectt
eam2fo.xsl
Output: PDF
(C:\JDeveloper\mywork\testinig\ViewController\src\test\view\ResultXML2PDF.pd
f)

Transforming...
Exception in thread "main" java.lang.NoSuchMethodError:
org.apache.xmlgraphics.util.Service.providerNames(Ljava/lang/Class;)Ljava/ut
il/Iterator;
    at
org.apache.fop.fo.ElementMappingRegistry.setupDefaultMappings(ElementMapping
Registry.java:75)
    at
org.apache.fop.fo.ElementMappingRegistry.<init>(ElementMappingRegistry.java:
67)
    at org.apache.fop.apps.FopFactory.<init>(FopFactory.java:162)
    at org.apache.fop.apps.FopFactory.newInstance(FopFactory.java:186)
    at test.client.ExampleXML2PDF.main(ExampleXML2PDF.java:45)
Process exited with exit code 1.
============================================================================
=============
Please tell me what is the issue and if it is a problem with the jar files
I'm using, please be kind enough to send me links for the newest jar files.
I had generated the xml files too. I have attached my xml file to this
email.

thank you a lot.
Dinuka.