Closed GoogleCodeExporter closed 8 years ago
Hi Mark,
At first 1.0.3 will provide one JAR for XDocReport (but I think without
dependencies like velocity.jar etc) . See
https://code.google.com/p/xdocreport/issues/detail?id=264
I don't know if Pascal have finished this work.
@Pascal could you tell me more information about your work please? Thank's!
> DOCX merge failed: fr.opensagres.xdocreport.core.XDocReportException: Null
template > engine. Set template engine with IXDocReport#setTemplateEngine.
XDocReport uses SPI to register services, so your JAR should contains
1) the META-INF/services files to regsiter velocity/freemarker template engine.
2) You need to have velocity, freemarker etc JAR in your classpath.
Hope it will help you.
Regards Angelo
Original comment by angelo.z...@gmail.com
on 27 Sep 2013 at 12:57
Hi,
for 1.0.3-SNAPSHOT there a "uberjar" created to facilitate integration.
If you use maven, coordinates are :
<dependency>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>xdocreport</artifactId>
<version>1.0.3-SNAPSHOT</version>
</dependency>
You''ll need to add this repo is your pom.xml :
https://oss.sonatype.org/content/repositories/snapshots/
alternatively you can download directly the jar here :
https://oss.sonatype.org/content/repositories/snapshots/fr/opensagres/xdocreport
/xdocreport/1.0.3-SNAPSHOT/xdocreport-1.0.3-20130927.085906-10.jar
There is no transitive dependency declared so you may need add some other
jars :
- velocity (version 1.7) or freemaker (version 2.3.16)
- iText 2.1.7
- odfdom-java 0.8.7
- poi-ooxml 3.8 & ooxml-schemas version 1.1
Please let me know if It works / how I can help. This is a new feature and
some improvement can be made...
Best regards.
Original comment by pascal.leclercq
on 28 Sep 2013 at 9:45
I've modified the POM to include the following dependencies:
freemarker 2.3.20
velocity 1.7
xdocreport 1.0.3-SNAPSHOT
Although I don't use Velocity templates I found that it threw a
NoClassDefFoundError unless I included the Velocity JAR as a dependency. I then
got an xDocReportException - 'Null template engine'. Do I need to add in POI
now? I noticed that it wasn't a dependency under XDocReport 1.0.2.
Regards
Mark
Original comment by ukdavo
on 30 Sep 2013 at 10:02
Hi Mark, Pascal,
I have seen quickly the uber JAR (just downloaded
xdocreport-1.0.3-20130927.085906-10.jar) and there are 2 problems :
1) META-INF/services/* doesn't contains the whoel XDocReport discovery classes.
For instance
"META-INF/services/fr.opensagres.xdocreport.template.discovery.ITemplateEngineDi
scovery" contains only :
--------------------------------------------------------------------------------
----
fr.opensagres.xdocreport.template.velocity.discovery.VelocityTemplateEngineDisco
very
--------------------------------------------------------------------------------
----
It should contains the 2 template engine implementation :
--------------------------------------------------------------------------------
----
fr.opensagres.xdocreport.template.velocity.discovery.VelocityTemplateEngineDisco
very
fr.opensagres.xdocreport.template.freemarker.discovery.FreemarkerTemplateEngineD
iscovery
--------------------------------------------------------------------------------
----
I think it explains the error "'Null template engine'"
2) When discoveries are loaded (If I remember it's done ine AbstractRegistry)
it throws an error when discovery cannot be done. It's the case when Velocity
JAR is not in the classpath and
fr.opensagres.xdocreport.template.velocity.discovery.VelocityTemplateEngineDisco
very is loaded.
To fix this problem, a try/catch should be done (is it possible?) as soon as a
discovery is loaded, but if we do that, we must log the error.
Regards Angelo
Original comment by angelo.z...@gmail.com
on 30 Sep 2013 at 12:27
Ok the problem 2) (when Velocity JAR is not in the classpath) should be fixed
(see
https://code.google.com/p/xdocreport/source/diff?spec=svn2b28cf569ebe1bdba7bfa64
810501c633fdd3b10&r=2b28cf569ebe1bdba7bfa64810501c633fdd3b10&format=side&path=/c
ore/fr.opensagres.xdocreport.core/src/main/java/fr/opensagres/xdocreport/core/re
gistry/AbstractRegistry.java)
For the problem 1), Pascal will try to fix it as soon as possible when he will
have time.
Original comment by angelo.z...@gmail.com
on 30 Sep 2013 at 1:55
Hi,
as Angelo said Problem 1) is now fixed.
You can use xdocreport with a maven pom containing.
<dependencies>
<dependency>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>xdocreport</artifactId>
<version>1.0.3-SNAPSHOT</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>sonatype</id>
<snapshots>
<enabled>true</enabled>
</snapshots>
<url>http://oss.sonatype.org/content/repositories/snapshots/</url>
</repository>
</repositories>
Or download directly here :
https://oss.sonatype.org/content/repositories/snapshots/fr/opensagres/xdocreport
/xdocreport/1.0.3-SNAPSHOT/xdocreport-1.0.3-20130930.205913-11.jar (URL has
changed)
Or use the jar attached...
Original comment by pascal.leclercq
on 30 Sep 2013 at 9:20
Attachments:
@Pascal, I have tested quicly and it works great. Well done!
I have modified the log level error to warn when discovery fails when it is
loaded.
Original comment by angelo.z...@gmail.com
on 1 Oct 2013 at 7:40
Available for 1.0.3
Original comment by angelo.z...@gmail.com
on 24 Oct 2013 at 12:02
Issue 264 has been merged into this issue.
Original comment by angelo.z...@gmail.com
on 24 Oct 2013 at 12:06
cleanup
Original comment by pascal.leclercq
on 10 Oct 2014 at 7:37
Original issue reported on code.google.com by
ukdavo
on 27 Sep 2013 at 12:47