关闭

Exception

128人阅读 评论(0) 收藏 举报

 

009、网站项目页面出现无样式等时需要查看本机ip地址

008、struts1action中接收form表单参数中文乱码

修改tomcat中的server.xml,找到端口配置的位置,加上一行:URIEncoding="UTF-8"

    <Connectorport="8080" protocol="HTTP/1.1"connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8"/>

007、Cause:com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'loi.DISPATCHT_TYPE' in 'field list'

     Mybatis  SQLXML:DISPATCHT_TYPE【错误】

     数据库:DISPATCH_TYPE           【正确】

     注:数据库与Mybatis的SQL语句字段不一致。

006、注解冲突

Caused by: java.lang.IllegalStateException:Annotation-specified bean name 'queryMcUnitPageListHandler' for bean class[com.dayou.iservice.svr.mall.merchantcontent.QueryMcUnitPageListHandler]conflicts with existing, non-compatible bean definition of same name and class[com.dayou.iservice.svr.mall.mcunitmanage.QueryMcUnitPageListHandler]

005、The typejavax.servlet.http.HttpServletRequest cannot be resolved. It is indirectlyreferenced from required .class files

(1)缺少Serverlet的引用库,工程右键properties->javabuild path

(2)在java build path的libraries tab页中选择Addexternal Jars 按钮

(3)选择myEclipse的安装目录,D:\software\MyEclipse\Common\plugins选择

         javax.servlet.jsp_2.0.0.v201101211617.jar;

                javax.servlet_2.5.0.v201103041518.jar 进行添加即可

004、网店项目运行报错

org.springframework.beans.factory.BeanCreationException:Error creating bean with name 'userLoginHandler' defined in ServletContextresource [/WEB-INF/classes/applicationContext-interfaces.xml]: Instantiation ofbean failed; nested exception is org.springframework.beans.FatalBeanException:Could not instantiate class [com.csctek.interfaces.handler.commons.userlogin.UserLoginHandler];constructor threw exception; nested exception is java.lang.Error: Unresolvedcompilation problems:

org.springframework.beans.FatalBeanException:Could not instantiate class[com.csctek.interfaces.handler.commons.userlogin.UserLoginHandler]; constructorthrew exception; nested exception is java.lang.Error: Unresolved compilationproblems:

import java.util.regex.Pattern;(报红线)

解决:JDK版本通高,项目应该使用jdk1.6.0_30

003、tomcat部署项目时

异常:Deployment failure on Tomcat 7.x.Could not copy allresources

解决:导入正确的jar包

002、全局变量和局部变量使用  ***

001、socket bind failed

    (1)socket bind failed的原因一般是Tomcat端口被占用,一般解除端口占用就行了;

    (2)win+R打开运行,输入cmd,进入dos界面;

    (3)输入netstat -ano | findstr 8080;查看占用端口8080,每个人的端口号可能占用的不同,要根据实际情况来看;

    (4)如:netstat-ano | findstr 7828;

    (5)输入taskkill /f /pid 占用进程,这步是关闭占用进程。

 

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场