hyunsikki / xdocreport

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

Is the warning 'Error while registration of Discovery instance' really necessary? #395

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I am using xdocreport-1.0.4.jar, velocity-1.7.jar and referring explicitly to 
Velocity:

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

Still I get a warning which I think is not necessary to log:

Apr 30, 2014 10:22:25 AM 
fr.opensagres.xdocreport.core.registry.AbstractRegistry initializeIfNeeded
WARNUNG: Error while registration of Discovery instance  
fr.opensagres.xdocreport.template.freemarker.discovery.FreemarkerTemplateEngineD
iscovery@5c29bfd
java.lang.NoClassDefFoundError: freemarker/template/ObjectWrapper
    at fr.opensagres.xdocreport.template.freemarker.discovery.FreemarkerTemplateEngineDiscovery.createTemplateEngine(FreemarkerTemplateEngineDiscovery.java:42)
    at fr.opensagres.xdocreport.template.registry.TemplateEngineRegistry.registerInstance(TemplateEngineRegistry.java:78)
    at fr.opensagres.xdocreport.template.registry.TemplateEngineRegistry.registerInstance(TemplateEngineRegistry.java:42)
    at fr.opensagres.xdocreport.core.registry.AbstractRegistry.initializeIfNeeded(AbstractRegistry.java:76)
    at fr.opensagres.xdocreport.template.registry.TemplateEngineRegistry.getTemplateEngineKinds(TemplateEngineRegistry.java:118)
    at fr.opensagres.xdocreport.document.registry.TemplateEngineInitializerRegistry.onEndInitialization(TemplateEngineInitializerRegistry.java:166)
    at fr.opensagres.xdocreport.core.registry.AbstractRegistry.initializeIfNeeded(AbstractRegistry.java:87)
    at fr.opensagres.xdocreport.document.registry.TemplateEngineInitializerRegistry.getTemplateEngine(TemplateEngineInitializerRegistry.java:84)
    at fr.opensagres.xdocreport.document.registry.XDocReportRegistry.loadReport(XDocReportRegistry.java:339)
    at fr.opensagres.xdocreport.document.registry.XDocReportRegistry.loadReport(XDocReportRegistry.java:317)
    at fr.opensagres.xdocreport.document.registry.XDocReportRegistry.loadReport(XDocReportRegistry.java:302)
    at traida.server.service.export.offer.DocxOfferExporter.generateOffer(DocxOfferExporter.java:47)
    at traida.server.service.export.offer.DocxOfferExporter.generateOffer(DocxOfferExporter.java:33)
    at traida.server.service.export.OfferServiceDemo.main(OfferServiceDemo.java:42)
Caused by: java.lang.ClassNotFoundException: freemarker.template.ObjectWrapper
    at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 14 more

Original issue reported on code.google.com by ullenb...@googlemail.com on 30 Apr 2014 at 8:36

GoogleCodeExporter commented 9 years ago
xdocreport-1.0.4.jar merge the whole feature of XDocReport. The stack strace is 
about Freemarker template engine initialisation (and in your case, Freemarker 
is not in your classpath).

To avoid this problem, you should use each JARs you need (core, template, 
freemarker, etc).  

Original comment by angelo.z...@gmail.com on 30 Apr 2014 at 9:43