过去的经验1_常见错误

 今天清理电脑的时候,发现了自己在4年前写的一些总结。那还是在第一家公司的时候。现在粘贴出来,防止以后遇到,找不到。

感觉回忆也挺好的。

Property 'rqStime' not found on type com.controller.gopost.entity.Gopost
明明有这个属性,一直报这个错误,
reason:妈的,没有写set get方法。

error:
输入 http://localhost:8092/myDoip 地址栏自动跳转 http://localhost:8092/myDoip/login.html 
但是描述The requested resource is not available.
reason:这个项目是我导入的,我很放心,一直以为是配置出错了。结果我的web.xml只有欢迎页面,其他东西都没有。

java.lang.UnsupportedClassVersionError 
reason:版本不一致错误,项目-->properties1.7,jdk1.6。修改之后还是有这个错误于是我把java Compiler改为1.5。修改之后报错,然后重新改为1.6就可以了。

严重: Servlet.service() for servlet springMVC threw exception
java.lang.OutOfMemoryError: PermGen space
reason:好长时间了,待解决。可能是我设置的地方不对,曾经在eclipse.ini,tomcat.catalina.sh,jdk.vm argument,tomcat option argument,都不行
结果在tomcat 下 jdk vm argument。
No mapping found for HTTP request with URI [/myDoip/regist/testHighCharts.html] in DispatcherServlet with name 'springMVC'
reason:href="${path }/regist/testHighCharts.html;
多加了分号。

数据后面多加了一个','。
原因:页面有两个name相同的参数,一个有值一个没值。

错误:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'attachService':
 Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException:
 Error creating bean with name 'baseDao': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException:
 Error creating bean with name 'sessionFactory' defined in URL
 [file:/D:/tomcat/apache-tomcat-6.0.36-windows-x86/apache-tomcat-6.0.36/webapps/myPro/WEB-INF/classes/config/spring.xml]: 
 Invocation of init method failed; nested exception is org.hibernate.AnnotationException: Use of @OneToMany or @ManyToMany targeting an unmapped class:
 com.controller.sign.entity.SignUp.jsVacationList[com.controller.onpost.entity.JsVacation]
 原因:web.xml里面有错误。没有监听到sessionFactory的启动
 解决:增加监听器
 
 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'operateFilter': 
 Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException:
 No bean named 'baseDao' is defined
 以上两个都跟配置文件有关
 
 org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'sessionFactory' is defined
 错误:明明配置了sessionFactory,可是找不到
 原因:监听器的配置文件里面没有sessionFactory,在另外一个配置文件里面。
 
 错误:
 HTTP Status 404 - /FramMark/WEB-INF/jsp/index.jsp
type Status report
message /FramMark/WEB-INF/jsp/index.jsp
description The requested resource is not available.
原因:配置文件抄过来的,/WEB-INF/jsp/。我自己写的不是在这个路径下面。

错误:where id in ( , '8a81bcc951d21a210151d22518ad00a7' ".replaceFirst(", ","")
replaceFirst之后还是原来的代码。,没有被取代
原因:
应该写where=where.replaceFirst(",","");

错误:
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/lucene/analysis/Analyzer : Unsupported major.minor version 52.0

1 J2SE 7 = 51 (0x33 hex),
2 J2SE 6.0 = 50 (0x32 hex),
3 J2SE 5.0 = 49 (0x31 hex),
4 JDK 1.4 = 48 (0x30 hex),
5 JDK 1.3 = 47 (0x2F hex),
6 JDK 1.2 = 46 (0x2E hex),
7 JDK 1.1 = 45 (0x2D hex).

sql数据库被截断,原因,字段长度不同。

错误:
我写的jquery.validate()不起作用。
原因:checked选择选择到的写错误了。

错误:Wrong key size
原因:structs里面注入需要写set,get方法。


错误getCurrentSession()时报错,no session found for current thread,
原因:可能是我没有把业务写到service层。
真正原因:我调用的方法使用support事务。由于是get方法,所以没有当前事务,获取不到当前session.

错误:expecting OPEN, found '>'
代码:from FileDownBy  where 1=1  and isDown != 1  and  count>10 
原因:一直以为不能用大于号,后来知道count是关键字,转hql时有误。于是改为 from FileDownBy as fdb where 1=1  and isDown != 1  and  fdb.count>10

错误:在hibernate2中使用hql语句总是出问题
原因,没有将.hbm.xml加入总体配置文件中去

错误:缺少 ';' 写js的时候一直报
原因:js数据以0开始,将其当做了8进制数据。结果发现不是这个原因,我一直写着 var content1=<%=content1%>; 后来改为 content1='<%content1%>';

错误:cell打不开,IE浏览器报错800af108
原因:系统里配置文件cell_ip应该写成服务器ip,结果我写成了数据库ip。

错误:配置文件里自己写的第一个跟项目有关的就报错:更新后自己改的错误
原因,jdk版本错误

错误:忻州项目登陆后有时跑错页面:
原因:tomcat下jdk版本变化了。为什么jdk版本和跑的页面有关系,代码不是jdk1.5写的吗?tomcat下jdk为什么必须是1.6。

错误:刚打开页面就报错误(页面下方小黄字)
原因:js代码里缺少一个}。

错误:原因:form没有写method="post" 

错误:jsp里面用了blockUI和layer,因为支持的jquery版本不同,总是报错。
解决:将一个jquery的$用别的符号代替。在只用到它的地方使用,用的多的jquery版本使用$。

当 IDENTITY_INSERT 设置为 OFF 时,不能为表 'fs_cuibao' 中的标识列插入显式值。
原因:数据库不设置identity(1,1)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值