StimVinsh / xdocreport

Automatically exported from code.google.com/p/xdocreport
0 stars 0 forks source link

Problem converting because of use FreeMarker #54

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Convert ODT to PDF

What is the expected output? What do you see instead?
Process exited with exit code 0.

fr.opensagres.xdocreport.core.XDocReportException: Null template engine. Set 
template engine with IXDocReport#setTemplateEngine.
    at fr.opensagres.xdocreport.document.AbstractXDocReport.internalGetTemplateEngine(AbstractXDocReport.java:688)
    at fr.opensagres.xdocreport.document.AbstractXDocReport.createContext(AbstractXDocReport.java:384)
    at xdocreport.TestPdfList.main(TestPdfList.java:48)
Process exited with exit code 0.

What version of the product are you using? On what operating system?
- Latest
- Win7

Please provide any additional information below.
- I want to use the convert to create documents from a template. Because I use 
Java Template Engine Freemarker i get this error. 

 IXDocReport report = XDocReportRegistry.getRegistry().loadReport(
            in, TemplateEngineKind.Freemarker);

Original issue reported on code.google.com by jans.ste...@gmail.com on 14 Nov 2011 at 3:25

GoogleCodeExporter commented 8 years ago
Hi Jans,

Your problem comes from that you have not well JAR in your classpath : 

* fr.opensagres.xdocreport.template.freemarker*.jar
* freemarker*.jar

If you read http://code.google.com/p/xdocreport/wiki/ODTReportingJavaMain it's 
explained for Velocity but it the same thing for Freemarker.

I suggest you to download example odtandfreemarker-*-sample.zip that you can 
find in the http://code.google.com/p/xdocreport/downloads/list
This zip contains teh required JARs you need to generate report from ODT with 
Freemarker.

Regards Angelo

Original comment by angelo.z...@gmail.com on 14 Nov 2011 at 3:36

GoogleCodeExporter commented 8 years ago
Hi Angelo,

I did what you suggested and I get the following error:

15-nov-2011 9:06:12 fr.opensagres.xdocreport.converter.ConverterRegistry 
internalFindConverter
SEVERE: Cannot find converters from=ODT
fr.opensagres.xdocreport.converter.XDocConverterException: Cannot find 
converters from=ODT
    at fr.opensagres.xdocreport.converter.ConverterRegistry.internalFindConverter(ConverterRegistry.java:102)
    at fr.opensagres.xdocreport.converter.ConverterRegistry.findConverter(ConverterRegistry.java:67)
    at fr.opensagres.xdocreport.document.AbstractXDocReport.getConverter(AbstractXDocReport.java:531)
    at fr.opensagres.xdocreport.document.AbstractXDocReport.convert(AbstractXDocReport.java:547)
    at TestPdfList.main(TestPdfList.java:62)
Process exited with exit code 0.

Original comment by jans.ste...@gmail.com on 15 Nov 2011 at 8:12

GoogleCodeExporter commented 8 years ago
Hi Jans,

Your problem is that you have not converter JAR in your classpath. Please read 
section http://code.google.com/p/xdocreport/wiki/ODTReportingJavaMainConverter

You need add JAR : 

 * fr.opensagres.xdocreport.converter.odt.odfdom
 * org.odftoolkit.odfdom.converter 
 * odfdom-java-0.8.7.jar

You can find thoses JARs in the download example 
odtandvelocity.converters-*-sample.zip 
(odtandfreemarker.converters-*-sample.zip doesn't exists for the moment).

Regards Angelo

Original comment by angelo.z...@gmail.com on 15 Nov 2011 at 9:43

GoogleCodeExporter commented 8 years ago

Original comment by angelo.z...@gmail.com on 15 Nov 2011 at 9:44

GoogleCodeExporter commented 8 years ago

Original comment by angelo.z...@gmail.com on 19 Jan 2012 at 11:53