Yes I also included serializer-2.7.1.jar in my ear deployment file.
The bindings are applied and I can also open the generated word file, but MS Word displays a message that the word file is corrupt.
If I call applyBindings I still get the errors that org.apache.xml.serializer.ToXMLSAXHandler cannot be cast to org.apache.xml.serializer.SerializationHandler.
Does perhaps not exist a deployment instruction for the Wildfly 8.1 application server?
BindingHandler bh = new BindingHandler( wordMLPackage);
bh.applyBindings();
2014-11-12 10:07:57,088 INFO org.docx4j.model.datastorage.BindingTraverserXSLT.log(BindingTraverserXSLT.java:177) - [String] od:xpath=EKhTo
2014-11-12 10:07:57,133 DEBUG org.docx4j.wml.SdtPr.getTag(SdtPr.java:340) - found tag
2014-11-12 10:07:57,135 DEBUG org.docx4j.model.sdt.QueryString.parseQueryString(QueryString.java:119) - Query string: od:xpath=wmL8g
2014-11-12 10:07:57,136 DEBUG org.docx4j.model.datastorage.BindingTraverserXSLT.xpathGenerateRuns(BindingTraverserXSLT.java:750) - Looking for xpath with id: wmL8g referenced from part /word/document.xml at od:xpath=wmL8g
2014-11-12 10:07:57,147 DEBUG org.docx4j.openpackaging.parts.XmlPart.xpathGetString(XmlPart.java:139) - /vtbDataBO[1]/totalRS[1] ---> '999999.93'
2014-11-12 10:07:57,148 DEBUG org.docx4j.model.datastorage.BindingHandler.xpathGetString(BindingHandler.java:295) - /vtbDataBO[1]/totalRS[1] yielded result '999999.93'
2014-11-12 10:07:57,150 INFO org.docx4j.model.datastorage.BindingTraverserXSLT.xpathGenerateRuns(BindingTraverserXSLT.java:832) - /vtbDataBO[1]/totalRS[1] yielded result '999999.93'
2014-11-12 10:07:57,151 DEBUG org.docx4j.XmlUtils.unwrap(XmlUtils.java:322) - Unwrapped org.docx4j.wml.RPr
2014-11-12 10:07:57,153 DEBUG org.docx4j.XmlUtils.unwrap(XmlUtils.java:323) - name: {http://schemas.openxmlformats.org/wordprocessingml/2006/main}rPr
2014-11-12 10:07:57,156 DEBUG org.docx4j.model.datastorage.BindingHyperlinkResolver.getIndexOfURL(BindingHyperlinkResolver.java:65) - processing 999999.93
2014-11-12 10:07:57,160 DEBUG org.docx4j.jaxb.NamespacePrefixMapperUtils.setProperty(NamespacePrefixMapperUtils.java:164) - setProperty: com.sun.xml.bind.namespacePrefixMapper
2014-11-12 10:07:57,171 DEBUG org.docx4j.XmlUtils.treeCopy(XmlUtils.java:1228) - node type1
2014-11-12 10:07:57,173 DEBUG org.docx4j.XmlUtils.treeCopy(XmlUtils.java:1253) - copying: w:r
2014-11-12 10:07:57,174 DEBUG org.docx4j.XmlUtils.treeCopy(XmlUtils.java:1228) - node type1
2014-11-12 10:07:57,175 DEBUG org.docx4j.XmlUtils.treeCopy(XmlUtils.java:1253) - copying: w:rPr
2014-11-12 10:07:57,177 DEBUG org.docx4j.XmlUtils.treeCopy(XmlUtils.java:1228) - node type1
2014-11-12 10:07:57,178 DEBUG org.docx4j.XmlUtils.treeCopy(XmlUtils.java:1253) - copying: w:lang
2014-11-12 10:07:57,180 DEBUG org.docx4j.XmlUtils.treeCopy(XmlUtils.java:1228) - node type1
2014-11-12 10:07:57,181 DEBUG org.docx4j.XmlUtils.treeCopy(XmlUtils.java:1253) - copying: w:t
2014-11-12 10:07:57,182 DEBUG org.docx4j.XmlUtils.treeCopy(XmlUtils.java:1228) - node type3
2014-11-12 10:07:57,187 INFO org.docx4j.model.datastorage.BindingTraverserXSLT.log(BindingTraverserXSLT.java:177) - [String] od:xpath=wmL8g
2014-11-12 10:07:57,233 ERROR org.jboss.stdio.AbstractLoggingWriter.write(AbstractLoggingWriter.java:71) - org.apache.xml.serializer.utils.WrappedRuntimeException: org.apache.xml.serializer.ToXMLSAXHandler cannot be cast to org.apache.xml.serializer.SerializationHandler
2014-11-12 10:07:57,235 ERROR org.jboss.stdio.AbstractLoggingWriter.write(AbstractLoggingWriter.java:71) - at org.apache.xml.serializer.SerializerFactory.getSerializer(SerializerFactory.java:179)
2014-11-12 10:07:57,236 ERROR org.jboss.stdio.AbstractLoggingWriter.write(AbstractLoggingWriter.java:71) - at org.apache.xalan.transformer.TransformerIdentityImpl.createResultContentHandler(TransformerIdentityImpl.java:260)
2014-11-12 10:07:57,237 ERROR org.jboss.stdio.AbstractLoggingWriter.write(AbstractLoggingWriter.java:71) - at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:330)
2014-11-12 10:07:57,239 ERROR org.jboss.stdio.AbstractLoggingWriter.write(AbstractLoggingWriter.java:71) - at org.docx4j.XmlUtils.w3CDomNodeToString(XmlUtils.java:844)