bellakhalAmir / xdocreport

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

Error when i use xdocreport into a rest service "Impossible to create report for the input stream. The report loader supports only [] files type." #349

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

I want to use XDocReport for generating some Word reports thanks a Rest Service 
(JAX-RS => jersey). 

I initialize the IXDocReport object in this way "IXDocReport report = 
XDocReportRegistry.getRegistry().loadReport(new FileInputStream(new 
File("c:/DocxProjectWithVelocity.docx")), TemplateEngineKind.Velocity);"

But, an error is occurred as the following "Impossible to create report for the 
input stream. The report loader supports only [] files type."

Previously, i used the same code into a Java Application and it's working.

After some research, i've isolated the issue. The reportFactoryDiscoveries 
collection attribute from XDocReportRegistry is empty. No 
DocxReportFactoryDiscovery instance is created.

Do you think i forgot anything ?

Thanks 

Original issue reported on code.google.com by baron.mi...@gmail.com on 10 Jan 2014 at 2:43

GoogleCodeExporter commented 8 years ago
>  want to use XDocReport for generating some Word reports thanks a Rest 
Service (JAX-RS => jersey). 
Do you use our XDocReport REST Service or do you use your own REST service?

> After some research, i've isolated the issue. The reportFactoryDiscoveries 
collection attribute from XDocReportRegistry is empty. No 
DocxReportFactoryDiscovery instance is created.

I think it's a problem with JARs. Do you have teh same JARs into your WEB 
Application and your Java Application?

Original comment by angelo.z...@gmail.com on 10 Jan 2014 at 3:10

GoogleCodeExporter commented 8 years ago
Hi Angelo,

I use my own REST service not the XDOCReport REST service. 

You are right for JAR problems. I'm using a GWT Web application and i've 
forgotten to repackage my application. The war/WEB-INF/lib directory is not up 
to date. Sorry it was a dummy classic problem. 

Mickael

Original comment by baron.mi...@gmail.com on 10 Jan 2014 at 3:24

GoogleCodeExporter commented 8 years ago
And it's working !!!

Original comment by baron.mi...@gmail.com on 10 Jan 2014 at 3:24

GoogleCodeExporter commented 8 years ago
Hi Mickael,

Glad you have resolved your problem! XDocReport uses SPI provider to register 
document, converter template kind. It was your problem.

For REST service, it's not documented but we have a REST service which manages 
reporting (see info at 
https://code.google.com/p/xdocreport/wiki/RESTSOAPReporting but this doc is 
very bad)

This REST service is not finished but if I remember it can manages images 
(client send image as binary 64 in the JSON request).

Regards Angelo

Original comment by angelo.z...@gmail.com on 10 Jan 2014 at 3:59

GoogleCodeExporter commented 8 years ago

Original comment by angelo.z...@gmail.com on 10 Jan 2014 at 4:00

GoogleCodeExporter commented 8 years ago
Thanks for your explanations

Very soon for this time a true issue ;-)

Mickael

Original comment by baron.mi...@gmail.com on 11 Jan 2014 at 8:39

GoogleCodeExporter commented 8 years ago
cleanup

Original comment by pascal.leclercq on 10 Oct 2014 at 7:37