我正在尝试在 OpenShift 上托管我的应用程序。当我尝试上传文件时,会显示此错误消息:
exception
javax.servlet.ServletException: Servlet execution threw an exception
root cause
java.lang.NoSuchMethodError: org.apache.tomcat.util.http.fileupload.servlet.ServletFileUpload.parseRequest(Ljavax/servlet/http/HttpServletRequest;)Ljava/util/List;
com.bios.controller.UploadServlet.processRequest(UploadServlet.java:62)
com.bios.controller.UploadServlet.doPost(UploadServlet.java:114)
javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.40 logs.
但是当我在 NetBeans 中运行文件时,它可以在我的本地主机上运行。我在 NetBeans 上的 lib 文件夹中导入了 Apache Tomcat 7.0.34。