StimVinsh / xdocreport

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

Read document in web application #90

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1.We are working on seam frame work with jboss6.We are trying to use Freemarker 
in Xdoc in this frame work.
For reading .docx file we used this following syntax.
InputStream in = 
LetterPrinting.class.getResourceAsStream("/folder"+"/"+"example.docx");

2.showing this inputStream is null.

What is the expected output? What do you see instead?
 How to read these files ?

What version of the product are you using? On what operating system?
Framework--Seam 2.
Server Jboss6.
Os--Xp2

Please provide any additional information below.

In jboss4.2 it is working fine.But in jboss6 the files are not reading. 

Original issue reported on code.google.com by balajiga...@ezeecloud.com on 13 Mar 2012 at 10:02

GoogleCodeExporter commented 8 years ago
Hi,

Your problem is that you have InputStream is null. Is that?
If it is that, what is the link with XDocReport?

Regards Angelo

Original comment by angelo.z...@gmail.com on 13 Mar 2012 at 10:06

GoogleCodeExporter commented 8 years ago
Yes.
The link with XdocReport is:
  IXDocReport report = XDocReportRegistry.getRegistry().loadReport(in,TemplateEngineKind.Freemarker);

in this line its showing null pointer exception.

15:50:08,893 ERROR [STDERR] java.io.IOException: InputStream cannot be null.

15:50:08,893 ERROR [STDERR]     at 
fr.opensagres.xdocreport.core.io.XDocArchive.readZip(XDocArchive.java:264)

15:50:08,893 ERROR [STDERR]     at 
fr.opensagres.xdocreport.document.registry.XDocReportRegistry.createReport(XDocR
eportRegistry.java:312)

15:50:08,893 ERROR [STDERR]     at 
fr.opensagres.xdocreport.document.registry.XDocReportRegistry.loadReport(XDocRep
ortRegistry.java:285)

15:50:08,893 ERROR [STDERR]     at 
fr.opensagres.xdocreport.document.registry.XDocReportRegistry.loadReport(XDocRep
ortRegistry.java:278)

15:50:08,893 ERROR [STDERR]     at 
fr.opensagres.xdocreport.document.registry.XDocReportRegistry.loadReport(XDocRep
ortRegistry.java:264)

Original comment by balajiga...@ezeecloud.com on 13 Mar 2012 at 10:22

GoogleCodeExporter commented 8 years ago
Yes I understood that, but it's not a problem with XDocReport, it's a problem 
with InputStream null.  

Regards Angelo

Original comment by angelo.z...@gmail.com on 13 Mar 2012 at 10:30

GoogleCodeExporter commented 8 years ago

Original comment by angelo.z...@gmail.com on 13 Mar 2012 at 9:36

GoogleCodeExporter commented 8 years ago
Getting the same problem.. How did you solved this?

Original comment by to2.r...@gmail.com on 9 Dec 2014 at 7:39

GoogleCodeExporter commented 8 years ago
So do I

Original comment by Zrikotof...@gmail.com on 31 Jan 2015 at 12:48

GoogleCodeExporter commented 8 years ago
Hi,

this bug is related to some sort of clasloader issue with JBoss.

Can you try :
URL url = AbstractXWPFPOIConverterTest.class.getResource("/folder"+ "/" + 
"example.docx");
        System.out.println(url);
        InputStream in = url.openStream();

and analyse what is the URL.

Alternatively you may use a FileInputStream if you know where your docx is 
located on the filesystem.

Original comment by pascal.leclercq on 31 Jan 2015 at 3:35