I have been using docx4j 3.2.1 and ImportXHTML 3.3.0 for a while now before upgrading to docx4j-JAXB-Internal 8.3.3 and ocx4j-ImportXHTML 6.1.0.
In my project, we have some templating added with docx adding. SO after getting the template, we parse and get the information in the XML. If the document has wordArt included, it is throwing an error. On the previous version, it did not throw an error.
- Code: Select all
[info] o.d.o.io3.Load3 - Instantiated package of type org.docx4j.openpackaging.packages.WordprocessingMLPackage
[info] o.d.u.XPathFactoryUtil - xpath implementation: org.docx4j.org.apache.xpath.jaxp.XPathFactoryImpl
[warn] o.d.o.io3.Load3 - No JAXB model for this CustomXmlDataStorage part; null
Uncaught error from thread [application-akka.actor.default-dispatcher-28]: Bad type on operand stack
Exception Details:
Location:
org/docx4j/org/apache/xalan/processor/ProcessorOutputElem.startElement(Lorg/docx4j/org/apache/xalan/processor/StylesheetHandler;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lorg/xml/sax/Attributes;)V @142: invokevirtual
Reason:
Type 'org/docx4j/org/apache/xalan/templates/OutputProperties' (current frame, stack[1]) is not assignable to 'org/docx4j/org/apache/xalan/templates/ElemTemplateElement'
Current Frame:
bci: @142
flags: { }
locals: { 'org/docx4j/org/apache/xalan/processor/ProcessorOutputElem', 'org/docx4j/org/apache/xalan/processor/StylesheetHandler', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'org/xml/sax/Attributes', 'java/lang/String', 'org/docx4j/org/apache/xalan/templates/ElemTempla
teElement' }
stack: { 'org/docx4j/org/apache/xalan/templates/ElemTemplateElement', 'org/docx4j/org/apache/xalan/templates/OutputProperties' }
Bytecode:
0x0000000: 2abb 0015 59b7 0016 b500 022a b400 022b
0x0000010: b600 17b6 0018 2ab4 0002 2bb6 0019 b600
0x0000020: 1a2a b400 022b b600 1bb6 001c 2a2b 1904
0x0000030: 1905 2ab6 001d 2ab4 0002 b600 1e12 20b6
0x0000040: 0021 c000 223a 0601 1906 a500 2d19 062b
0x0000050: b600 23b8 0024 3a07 2ab4 0002 b600 1e12
0x0000060: 2019 07b6 0025 57a7 0010 3a07 2b19 07b6
0x0000070: 0027 1907 b600 282b b600 292a b400 02b6
0x0000080: 002a 2bb6 002b 3a07 1907 2ab4 0002 b600
0x0000090: 2c57 2a01 b500 02b1
Exception Handler Table:
bci [77, 103] => handler: 106
Stackmap Table:
full_frame(@106,{Object[#104],Object[#105],Object[#106],Object[#106],Object[#106],Object[#107],Object[#106]},{Object[#108]})
same_frame(@119)
, shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[application]
I saw we are getting the error when loading the document.