FileUtils.getTempDirectory() not found in ueditor

A few days ago, the whole UEditor reported another error:

SEVERE: Servlet.service() for servlet jsp threw exception
Throwable occurred: java.lang.NoSuchMethodError: org/apache/commons/io/FileUtils.getTempDirectory()Ljava/io/File;
at com.baidu.ueditor.upload.StorageManager.getTmpFile(StorageManager.java:117)
at com.baidu.ueditor.upload.StorageManager.saveFileByInputStream(StorageManager.java:51)
at com.baidu.ueditor.upload.BinaryUploader.save(BinaryUploader.java:75)
at com.baidu.ueditor.upload.Uploader.doExec(Uploader.java:24)
at com.baidu.ueditor.ActionEnter.invoke(ActionEnter.java:80)
at com.baidu.ueditor.ActionEnter.exec(ActionEnter.java:49)
at org.apache.jsp.core.ueditor.jsp.controller_jsp._jspService(controller_jsp.java:74)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

This is the error reported by the jar package.

The UEditor I downloaded is 1.4.3, its own commons-io.jar is 2.4, and my original project is 1.4, so there is a problem.

The solution is very simple, just replace the 1.4 with 2.4.

It is worth mentioning that the downloaded UEditor comes with the jar package it needs for this version. It is best to use these j-version ar packages in the system, because problems similar to the above may occur. Of course, the prerequisite for replacement is that the new jar package does not affect the original function.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326203573&siteId=291194637