java异常解决方案(Java exception resolution).doc

上传人:bao****ty 文档编号:132291841 上传时间:2020-05-14 格式:DOC 页数:22 大小:28.76KB
返回 下载 相关 举报
java异常解决方案(Java exception resolution).doc_第1页
第1页 / 共22页
java异常解决方案(Java exception resolution).doc_第2页
第2页 / 共22页
java异常解决方案(Java exception resolution).doc_第3页
第3页 / 共22页
java异常解决方案(Java exception resolution).doc_第4页
第4页 / 共22页
java异常解决方案(Java exception resolution).doc_第5页
第5页 / 共22页
点击查看更多>>
资源描述

《java异常解决方案(Java exception resolution).doc》由会员分享,可在线阅读,更多相关《java异常解决方案(Java exception resolution).doc(22页珍藏版)》请在金锄头文库上搜索。

1、java异常解决方案(Java exception resolution)一、hibernate(1) org.hibernate.transientobjectexception: Object references an unsaved Transient instance.(2) org.springframework.orm.hibernate3.hibernatesystemexception: Dont change the reference to a collection with Cascade = All - delete Orphan: entity.klass.stud

2、ents; nested exception is org.hibernate.hibernateexception: Dont change the reference to a collection with Cascade = All - delete Orphan: entity.klass.students二、tomcat(1) tomcat启动时报错: java.io.eofexception(2) tomcat内存溢出三、java基本(1) java.lang.classcastexception:(2) java.lang.unsupportedclassversionerro

3、r: Bad version number in. Class file四、jsp(1) javax.servlet.jsp.jspexception:(2) org.apache.jasper.jasperexception: Unable to compile class for JSP.(3) servlet.service () for servlet JSP threw exception java.lang.error: unresolved compilation problem:(4) java.lang.error: unresolved compilation proble

4、m: The Method contextinitialized (servletcontextevent) of Type createdatasourcetablelistener must override a superclass method(5) servlet.service () for servlet JSP threw exception java.lang.error: unresolved compilation problem:The Method setcharacterencoding (string) is undefined for the type serv

5、letresponse五、ssh整合(1) java.lang.ClassNotFoundException: org.springframework.web.context.contextloaderlistener(2) exception starting Filter Struts2 Class: com.opensymphony.xwork2.spring.springobjectfactory File: springobjectfactory.java Method: getclassinstance(3) (7) (8) org.springframework.beans.fa

6、ctory.beancreationexception: Error creating Bean with name Biz defined in Class path.(4) exception starting Struts2 filterThe Action name cannot be the same as the action class suffix: org.apache.struts2.convention.seoactionnamebuilder action(5) avax.management.runtimeerrorexception: error thrown in

7、 prederegister methodCaused by: java.lang.noclassdeffounderror: org / apache / Struts2 / useful / objectfactorydestroyableUnable to load configuration (6). - Bean jar: File: / / / D: Tomcat tomcat / webapps / apache-tomcat-6.0.30 / test / web-inf / lib / struts2-core-2.2.3.1.jar! Struts-default.xml:

8、 29 / 72:六、struts(1) java.lang.nosuchmethodexception action.studentaction.getallstudent ():(2) caused by: java.lang.classcastexception: org.apache.xerces.parsers.xml11configuration cannot be cast to org.apache.xerces.xni.parser.xmlparserconfiguration(3) no result defined for Action and result七、andro

9、id(1)没有一个名为CM Android的Android项目。一、冬眠(1)一org.hibernate.transientobjectexception:对象引用未保存的瞬时保存瞬态实例前冲洗:COM。亿阳信通。框架,模块,用户某个对象的某个属性是一个实体,在这个实体没有保存之前就保存这个对象而造成了这个错误。(有可能是因为如:保存学生对象学生时,学生。克拉斯。ID为空(这里主要指ID为空)。(studnent学生表引用克拉斯班级表(多对一)(2)一org.springframework.orm.hibernate3.hibernatesystemexception:不改变参考一系列级联=

10、“全部删除孤儿”:entity.klass.students;嵌套异常org.hibernate.hibernateexception:不改变参考一系列级联=“全部删除孤儿”:实体。克拉斯。学生:先注意一下几方面:集合应该用HashSet,而不是ArrayList更新的时候,无论原来的集合为空还是不为空,都应该在得到原来集合的基础上对得到的集合进行增删操作,而不是新新一个集合设置为该对象的的集合然后可参考一下两段代码,第一段是错误的,第二段正确:1.parent = parentservice findparentbyid(ID);母。clear()方法;父母setchildren(新建);p

11、arentservice updateparent(母);2.parent = parentservice findparentbyid(ID);母。clear()方法;母。getChildren。所有(新建);parentservice updateparent(母);另外:我在员工里有设置一个集设置“文件=”=“true”级联=“全部删除孤儿”然后我添加员工时,第一次添加没事,再添加时就抛出以上错误,而且都不能再添加,要服务器重启后才能再添加一个,就是服务器启动一次只能加一个员工,大家帮忙看看怎么解决?加那个级联=“全部删除孤儿”是为了级联删除把员工删了的时候也能同时删了文件。像这种情况,

12、可以看看,员工实体类中的字段是否是用了新文件,新的出了对象。这里不能新,不用新的话,应该就没问题了(但我不知道原因)。二、Tomcat(1)二Tomcat启动时报错:java.io.eofexception个表示输入过程中意外地到达文件尾或流尾的信号,导致从会话中获取数据失败。异常是Tomcat本身的问题,由于Tomcat上次非正常关闭时有一些活动会话被持久化(表现为一些临时文件),在重启时,Tomcat尝试去恢复这些会话的持久化数据但又读取失败造成的。此异常不影响系统的使用。因为保存在硬盘上的会话数据读取失败,问题似乎不大,但是如果不处理一下,每次启动都会出现这个问题。solutionsEm

13、pty the files under Tomcat in the work directory, mainly the *.ser file, or just delete the session.ser.If the server is closed normally, the file is deleted automatically.WorkCatalinalocalhostyourProjectNameSESSIONS.ser delete. If the server is closed normally, the file is deleted automatically.Not

14、e: yourProjectName is the name of the Web project that you are currently working on.Considering that everyones tomat work directory is different, it is recommended to find your SESSIONS.ser file in search function, and only need to delete.yourProjectName under SESSIONS.ser.Two (2) Tomcat memory over

15、flowHttp:/ JAVA basicThree (1)Java.lang.ClassCastException:com.boco.scms.business.checkproviderinfo.web.ProviderContactDetailDto cannot be cast to com.boco.scms.model.providerregister.SCMProviderRegisterContact (may be the type conversion error (here refers to ProviderContactDetailDto cannot be cast as SCMProviderRegisterContact)Three (2)

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 高等教育 > 其它相关文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号