为了账号安全,请及时绑定邮箱和手机立即绑定

Error instantiating servlet class servlet.a?

type Exception report

message Error instantiating servlet class servlet.a

description The server encountered an internal error that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Error instantiating servlet class servlet.a
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:452)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1087)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Thread.java:662)


root cause

java.lang.ClassNotFoundException: servlet.a
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1892)
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1735)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:452)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1087)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" 
	xmlns="http://java.sun.com/xml/ns/javaee" 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
	http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
  <display-name></display-name>
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
  
  <servlet>
  	<servlet-name>ListServlet</servlet-name>
  	<servlet-class>servlet.ListServlet</servlet-class>
  </servlet>
  <servlet-mapping>
  	<servlet-name>ListServlet</servlet-name>
  	<url-pattern>/List.action</url-pattern>
  </servlet-mapping>
  
  <servlet>
  	<servlet-name>DeleteOneServlet</servlet-name>
  	<servlet-class>servlet.DeleteOneServlet</servlet-class>
  </servlet>
  <servlet-mapping>
  	<servlet-name>DeleteOneServlet</servlet-name>
  	<url-pattern>/DeleteOneServlet.action</url-pattern>
  </servlet-mapping>

  <servlet>
  	<servlet-name>DeleteBatchServlet</servlet-name>
  	<servlet-class>servlet.DeleteBatchServlet</servlet-class>
  </servlet>
  <servlet-mapping>
  	<servlet-name>DeleteBatchServlet</servlet-name>
  	<url-pattern>/DeleteBatchServlet.action</url-pattern>
  </servlet-mapping>
  
   <servlet>
  	<servlet-name>InitTalkServlet</servlet-name>
  	<servlet-class>servlet.InitTalkServlet</servlet-class>
  </servlet>
  <servlet-mapping>
  	<servlet-name>InitTalkServlet</servlet-name>
  	<url-pattern>/InitTalkServlet.action</url-pattern>
  </servlet-mapping>
  
</web-app>
package servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/*
 * 对话页的初始化控制
 */
@SuppressWarnings("serial")
public class InitTalkServlet extends HttpServlet {

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
			 //设置字符编码
			 request.setCharacterEncoding("utf-8");
			 //向页面跳转
			 request.getRequestDispatcher("/WEB-INF/jsp/front/talk.jsp").forward(request, response);
	}

	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		this.doGet(request, response);
	}
}

这是服务器配出错了吗?class文件没有创建成功,怎么解决

正在回答

4 回答

这个配置的没有错啊,问题是找不到servlet.a这个类

0 回复 有任何疑惑可以回复我~
#1

二道桥十三太保 提问者

原因找到了,是项目的jar包导入错了,把所有包删了,重新导入就好了
2017-04-17 回复 有任何疑惑可以回复我~
#2

二道桥十三太保 提问者

非常感谢!
2017-04-17 回复 有任何疑惑可以回复我~

解决了没;是什么问题

0 回复 有任何疑惑可以回复我~
#1

二道桥十三太保 提问者

解决了 你看我别的回答
2017-06-23 回复 有任何疑惑可以回复我~

原因找到了,是项目的jar包导入错了,把所有包删了,重新导入就好了

0 回复 有任何疑惑可以回复我~

地方大师傅

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

Error instantiating servlet class servlet.a?

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信