StimVinsh / xdocreport

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

0.9.7 is not working for dynamic images #104

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Take all the 0.9.7 jars for inserting dynamic images in docx 
2. Follow the sample code in 
http://code.google.com/p/xdocreport/wiki/DocxReportingJavaMainDynamicImage#IImag
eProvider
3. I get the below exception. If I replace the jars with 0.9.6 then the 
exception doesn't occur

org.apache.velocity.exception.MethodInvocationException: Invocation of method 'g
etWidth' in  class fr.opensagres.xdocreport.document.docx.images.DocxImageRegist
ry threw exception java.lang.NullPointerException at fr.opensagres.xdocreport.do
cument.docx.DocxReport@db598!word/document.xml[line 1, column 32212]
        at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationExc
eption(ASTMethod.java:243)
        at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.j
ava:187)
        at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTRefer
ence.java:280)
        at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTRefere
nce.java:369)
        at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.
java:342)
        at org.apache.velocity.Template.merge(Template.java:356)

Original issue reported on code.google.com by murthy.r...@gmail.com on 13 Apr 2012 at 1:50

GoogleCodeExporter commented 8 years ago
Hi,

Your error is very strange? In 0.9.7 dynamic images was improved to manage 
optional images 
http://code.google.com/p/xdocreport/wiki/DocxReportingJavaMainDynamicImage#Optio
nal_Image so I don't understand your error.

Are you sure that you have not several JARs version of XDocReport in your 
classpath?

Have you tried the 0.9.7 samples with dynamic images from 
docxandvelocity-0.9.7-sample.zip? Is it working for you?

If you are problem again, please provides your Java classes (Main, Pojo, etc) 
and docx.

Regards Angelo

Original comment by angelo.z...@gmail.com on 13 Apr 2012 at 7:07

GoogleCodeExporter commented 8 years ago

Original comment by angelo.z...@gmail.com on 28 Sep 2012 at 9:32