gpt4 book ai didi

java - 未找到 AuthSchemeFactory 类

转载 作者:行者123 更新时间:2023-12-01 14:10:12 24 4
gpt4 key购买 nike

我正在使用 org.oracle.httpclient 包 4.1.3 和 httpcore 4.1.4。

但是当我执行程序时,出现以下错误:

org.apache.jasper.JasperException: An exception occurred processing JSP page /sendsms.jsp at line 15

12: String mobNo = request.getParameter("mobile");
13: String message = request.getParameter("msg");
14: SendSMS httpsms = new SendSMS();
15: int sendsms = httpsms.SendSMS(mobNo,message);
16:
17: if(sendsms==1){
18: %>


Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:524)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:417)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root cause

javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/apache/http/auth/AuthSchemeFactory
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.sendsms_jsp._jspService(sendsms_jsp.java:88)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root cause

java.lang.NoClassDefFoundError: org/apache/http/auth/AuthSchemeFactory
com.sms.model.dao.SendSMS.SendSMS(SendSMS.java:40)
org.apache.jsp.sendsms_jsp._jspService(sendsms_jsp.java:67)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

我还检查了包并且包中存在该类。请帮我做什么。

最佳答案

在您的 Java Web 应用程序中,应该有一个 WEB-INF 文件夹。如果该文件夹不包含 lib 文件夹,请创建一个文件夹并将 jar 添加到其中。

否则,Tomcat 应用程序启动器不会将您的 jar 添加到类路径中。

关于java - 未找到 AuthSchemeFactory 类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18572513/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com