Page 1 of 1

docx4j deployment on Resin

PostPosted: Mon Nov 10, 2014 8:45 pm
by mkaayn
Hello,

I want to use docx4j to convert html files to docx files. I create a project in Eclipse and the conversion is ok, but when I try to integrate docx4j in our web application I have an error.
I use:
- Docx4j v3.2.1
- Java v1.6
- Resin 2.1.0
I added all the dependencies jars in Build Path’s project.

The error is :
Code: Select all
2014-11-10 10:33:10 ERROR: Cannot initialize context
com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 61 counts of IllegalAnnotationExceptions
Two classes have the same XML type name "CT_TwipsMeasure". Use @XmlType.name and @XmlType.namespace to assign different names to them.
  this problem is related to the following location:
         at org.docx4j.wml.CTTwipsMeasure
        at protected org.docx4j.wml.CTTwipsMeasure org.docx4j.wml.CTFramesetSplitbar.w
……..
2014-11-10 10:33:17 ERROR:
javax.xml.bind.JAXBException
- with linked exception: [java.lang.NullPointerException]
at org.docx4j.openpackaging.parts.JaxbXmlPartXPathAware.unmarshal(JaxbXmlPartXPathAware.java:439)
at org.docx4j.openpackaging.parts.WordprocessingML.StyleDefinitionsPart.unmarshalDefaultStyles(StyleDefinitionsPart.java:147)
at org.docx4j.openpackaging.packages.WordprocessingMLPackage.createPackage(WordprocessingMLPackage.java:416)
at org.docx4j.openpackaging.packages.WordprocessingMLPackage.createPackage(WordprocessingMLPackage.java:377)

Thank you.

Re: docx4j deployment on Resin

PostPosted: Tue Nov 11, 2014 12:36 pm
by jason
Locking this duplicate/cross post of http://stackoverflow.com/questions/2684 ... t-on-resin