Java. lang. NoSuchFieldError: RAW_XML_FILE_HEADER, call XWPFTemplate to dynamically merge and generate a new docx document. An error is reported, xwpftemplatedocx
When using org. apache. when poi dynamically merges the office file into a new file based on the form content and the last attachment, the local debugging is completely OK, but this error is always reported in the Linux environment. lang. noSuchFieldError: RAW_XML_FILE_HEADER, I Google in the stackoverflow many say that the package conflict, then I checked my local WEB-INF under the lib directory under the poi-3.11-beta2 jar package, are 3.11-beta2 version, then, the remote server is linked through xshell and then the lib of the WEB-INF under tomcat is found to have poi-3.13 and poi-3.15-beta2 version jar package reference:
Jar conflicts are found, so I
XWPFTemplate xwpfTemplate = XWPFTemplate. create (inputPath); an error is reported when you call this statement because it does not know which package to use.
So clear the Server tomcat under the WEB-INF lib jar package re-deployment once the document can be generated successfully.