【整理】常见错误整理


1.无法通过外部浏览器访问url

工具/选项/常规:web浏览器下设置默认的浏览器


2.java.lang.OutOfMemoryError: PermGen space

堆内存溢出,解决方法:

在tomcat_home/bin/catalina.bat ,加上下面一行:

set JAVA_OPTS= -Xms1024M -Xmx1024M -XX:PermSize=256M -XX:MaxNewSize=256M -XX:MaxPermSize=256M

解释一下各个参数:

-Xms1024M:初始化堆内存大小

-Xmx1029M:最大堆内存大小

-XX:PermSize=256M:初始化类加载内存池大小

-XX:MaxPermSize=256M:最大类加载内存池大小

-XX:MaxNewSize=256M:暂时不清楚啥意思


3.通配符的匹配很全面, 但无法找到元素 'context:component-scan' 的声明

applicationContext.xml的头改为以下内容:

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
       xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
       xmlns:context="http://www.springframework.org/schema/context"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">

4.java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

需要导入spring-web.jar


5.java.lang.ClassNotFoundException: com.mysql.jdbc.Driver


需要将mysql-connector-java-5.1.7-bin.jar放入tomcat/lib目录下

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值