1、---无法解析类型 javax.servlet.http.HttpServletRequest。从必需的 .class 文件间接引用了它

The type javax.servlet.http.HttpServletRequest cannot be resolved. - smartzhaomin的专栏 - CSDN博客
http://blog.csdn.net/smartzhaomin/article/details/19487907

The type javax.servlet.http.HttpServletRequest cannot be resolved. It is indirectly referenced from
required .class files
是缺少serverlet的引用库,解决如下
1.工程右键-properties->java build path
2.在java build path的libraries tab页中选择Add external Jars...按钮
3. 选择eclipse的安装目录,你自己需要根据自己的路径查找添加。E:\eclipse-java-indigo-SR1-win32\eclipse\plugins
选择javax.servlet.jsp_2.0.0.v201101211617.jar;javax.servlet_2.5.0.v201103041518.jar 进行添加即可
注释:由于版本不同,文件包名可能稍有区别。 2、----------------Servlet.init() 异常很累人,本人将jdk1.8降到1.7果然不报此错误
HTTP Status 500 - Servlet.init() for servlet springmvc threw exception

type Exception report

message Servlet.init() for servlet springmvc threw exception

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

解决办法:

一:把jdk版本换成1.7 or 1.7以下

二:使用spring 4.0RELEASE及以上版本

3、-----------------

完美解决 未能打开编辑器:Unmatched braces in the pattern. - Terry的IT世界 - CSDN博客
http://blog.csdn.net/hytdsky/article/details/4736462

原因就是语言包的问题 出现这个问题了,配置自己Eclipse的启动参数  eclipse.ini  在最后面加入这段代码   -Duser.language=en

4、----------The superclass javax.servlet.http.HttpServlet was not found on the Java Build Path

错误:HttpServlet was not found on the Java_百度经验--这个是传统项目的做法
  http://jingyan.baidu.com/article/f79b7cb34f40569144023ef9.html

如果是maven项目这需要在 pom.xml里面添加对应的jar包依赖即可。

5、-------------技巧

exlipse同时操作多行。比如同时在多行同列输入相同的文字 - 小爷欣欣 - CSDN博客
http://blog.csdn.net/csdnliuxin123524/article/details/70310175

6、时间0804-------Httpservlet cannot be resolved to a type

Httpservlet cannot be resolved to a type的原因与解决方法 - zhouyingge1104的专栏 - CSDN博客
http://blog.csdn.net/zhouyingge1104/article/details/7583511

Add External JARs--> 选择  把servlet-api.jar 的路径输入即可

7、----- 环境里面报很多异常,头大

    

8、--------------eclipse中jar包在外面显示

myeclipse项目 往lib里导jar包,全乱了在外面 与SRC同一目录 怎么解决_百度知道
https://zhidao.baidu.com/question/2117740880786239107.html

    

9、---- Junit Test中不可以用注解 注入bean,用传统方式获取bean

  java junit 使用注解引入 - huaishuming的专栏 - CSDN博客--碰到的问题此文章一样,但是我看不懂他的解法。囧
  http://blog.csdn.net/huaishuming/article/details/41212147

public class DscVehicleTest2 {
private ApplicationContext applicationContext;
//@Autowired 这里注入有问题,在Test函数里面注入也不行
private DscVehicleMapper dscVehicleMapper;
@Before
public void setUp() throws Exception {
applicationContext = new ClassPathXmlApplicationContext("classpath:spring/applicationContext-dao.xml");
dscVehicleMapper = (DscVehicleMapper) applicationContext.getBean("dscVehicleMapper");
}
@Test
public void test1() {
DscVehicle dscVehicle = dscVehicleMapper.selectByPrimaryKey(5L);
System.out.println(dscVehicle);
}
}

JAVA百度过的异常(1)的更多相关文章

  1. Java中的受检异常

    Java中的受检异常 Java提供了三种异常类型,受检异常(checked exception).运行时异常(runtime exception).错误(error).那么这受检异常在实际开发中又有什 ...

  2. java提高篇(十七)-----异常(二)

          承接上篇博文:java提高篇-----异常(一) 五.自定义异常 Java确实给我们提供了非常多的异常,但是异常体系是不可能预见所有的希望加以报告的错误,所以Java允许我们自定义异常来表 ...

  3. Java.lang.NoSuchFieldError: INSTANCE异常

    解决方案: java.lang.NoSuchFieldError: INSTANCE异常. 1.jar包重复了. 2.版本还不相同,如果包的版本不同也会报相应的错,不过一般情况自己导入的jar包主要看 ...

  4. 在Servlet使用getServletContext()获取ServletContext对象出现java.lang.NullPointerException(空指针)异常的解决办法

    今天遇到了一个在servlet的service方法中获取ServletContext对象出现java.lang.NullPointerException(空指针)异常,代码如下: 1 //获取Serv ...

  5. java.sql.SQLException: Io 异常: Connection reset

    当数据库连接池中的连接被创建而长时间不使用的情况下,该连接会自动回收并失效,但客户端并不知道,在进行数据库操作时仍然使用的是无效的数据库连接,这样,就导致客户端程序报“ java.sql.SQLExc ...

  6. Java最重要的21个技术点和知识点之JAVA集合框架、异常类、IO

    (三)Java最重要的21个技术点和知识点之JAVA集合框架.异常类.IO  写这篇文章的目的是想总结一下自己这么多年JAVA培训的一些心得体会,主要是和一些java基础知识点相关的,所以也希望能分享 ...

  7. java.sql.SQLException: Io 异常: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=186646784)(ERR=12505)(ERR

    dbc 链接orcal出错 java.sql.SQLException: Io 异常: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=186646784)( ...

  8. java新手笔记23 异常

    1.import package com.yfs.javase; import java.util.Scanner; //import java.lang.String;//默认导入 public c ...

  9. Java中的ExceptionInInitializerError异常及解决方法

    当在静态初始化块中出现了异常的时候,JVM会抛出 java.lang.ExceptionInInitializerError异常.如果你了解Java中的静态变量,你会知道它们是在类加载的时候进行初始化 ...

随机推荐

  1. 整合shiro出现【Correct the classpath of your application so that it contains a single, compatible version of org.quartz.Scheduler】

    跑的时候出现错误: Description: An attempt was made to call the method org.quartz.Scheduler.getListenerManage ...

  2. java 常用的类

    一.日期操作:Calendar类和SimpleDateFormat类 public void Test1() { Calendar calendar=Calendar.getInstance(); S ...

  3. noi.openjudge 1.13.15

    http://noi.openjudge.cn/ch0113/15/ 总时间限制:  1000ms 内存限制:  65536kB 描述 输入一个长度为N的整数序列 (不多于128个整数),每个整数的范 ...

  4. 从CAP理论中分析Eureka与zookeeper的区别

    著名的CAP理论指出,一个分布式系统不可能同时满足C(一致性).A(可用性)和P(分区容错性).由于分区容错性在是分布式系统中必须要保证的,因此我们只能在A和C之间进行权衡.在此Zookeeper保证 ...

  5. Reference-TMB

    Paper Name:Targeted Next Generation Sequencing Identifies Markers of Response to PD-1 Blockade Adress ...

  6. MAC操作系统使用小技巧

    MAC操作系统使用小技巧   作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.修改主机名名称 1>.修改主机名称 修改和查询的Ulinx命令如下: sudo scutil ...

  7. android studio导出apk

    在android studio导出的apk分为4种,一种是未签名调试版apk,一种是未签名发行版apk,一种是已签名调试版apk,还有一种是已签名发行版apk.以下将介绍这4种apk如何导出. 一.调 ...

  8. HDU 1018(阶乘位数 数学)

    题意是求 n 的阶乘的位数. 直接求 n 的阶乘再求其位数是不行的,开始时思路很扯淡,想直接用一个数组存每个数阶乘的位数,用变量 tmp 去存 n 与 n - 1 的阶乘的最高位的数的乘积,那么 n ...

  9. HDU 6375(双端队列 ~)

    题意是有至多150000个双端队列,400000次简单操作,直接开会导致内存超限,所以用 STL 中的 map 和 deque ,而读入过大已经在题目中有所说明,直接用已经给出的快速读入即可.要注意的 ...

  10. Linux 命令详解(十二)Systemd 入门教程:使用定时器发送邮件(mail)

    Systemd 定时器教程:http://www.ruanyifeng.com/blog/2018/03/systemd-timer.html 一.定时任务 Systemd 定时任务:每小时发送一封电 ...