Home > Back-end >  Poi HWPF, in the new HWPFDocument (), quoted wrong. Path, file names are right.
Poi HWPF, in the new HWPFDocument (), quoted wrong. Path, file names are right.

Time:09-29

Servlet service () for the Servlet [for springmvc] in context with the path [] threw the exception [Handler processing failed; nested exception is Java. Lang. NoSuchMethodError: org. Apache. Poi, poifs. Filesystem. POIFSFileSystem. GetRoot ()/apache/poi/Lorg poifs/filesystem/DirectoryNode;] With root cause
Java. Lang. NoSuchMethodError: org. Apache. Poi. Poifs. Filesystem. POIFSFileSystem. GetRoot ()/apache/poi/Lorg poifs/filesystem/DirectoryNode;


String templatePath="D: \ \ Word \ \ peixunjihua1 doc";
InputStream is=new FileInputStream (templatePath);
HWPFDocument doc=new HWPFDocument (is);//in this error
Range Range=doc. GetRange ();

CodePudding user response:

Version is 3.8

CodePudding user response:

NoSuchMethodError, org, apache poi. Poifs. Filesystem. POIFSFileSystem. GetRoot () this method does not. This is a conflict jars, and two or more versions of the poi packages, loaded classes and does not contain. POIFSFileSystem. GetRoot () method which version,

CodePudding user response:

How to solve?
  • Related