错误集--殷晓燕.doc_第1页
错误集--殷晓燕.doc_第2页
错误集--殷晓燕.doc_第3页
错误集--殷晓燕.doc_第4页
错误集--殷晓燕.doc_第5页
已阅读5页,还剩2页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1.HTTP Status 500 -type Exception reportmessagedescription The server encountered an internal error () that prevented it from fulfilling this request.exceptionorg.apache.jasper.JasperException: java.lang.NullPointerExceptionorg.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:500)org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:428)org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)javax.servlet.http.HttpServlet.service(HttpServlet.java:717)com.test.servlet.LoginServlet.doPost(LoginServlet.java:73)javax.servlet.http.HttpServlet.service(HttpServlet.java:637)javax.servlet.http.HttpServlet.service(HttpServlet.java:717)com.test.filter.LoginFilter.doFilter(LoginFilter.java:30)root causejava.lang.NullPointerExceptionorg.apache.jsp.userlist_jsp._jspService(userlist_jsp.java:95)错误分析:空指针解决方法:登录成功之后应跳转到servlet中,再到页面2. 错误信息:java.lang.NullPointerExceptioncom.sun.action.UserAction.execute(UserAction.java:20)错误分析:userAction文件中值没有传入execute中,且在execute中输出list时,不会输出list解决方法:private UserService userService实例化3. 错误信息:在登录时必须在session中放入一个值,不然就会进行拦截(即刚开始运行时就会要求你在首先登录)。错误分析:说明在刚开始登录时,session中没有值,因此登录也进行了拦截,则需要将登录的页面排除在外解决方法:添加代码,将登录页面排除在外if(LoginAction.class = invocation.getAction().getClass()System.out.println(1111111);return invocation.invoke();4.在服务器中:java.lang.NullPointerExceptioncom.osim.persistence.dao.Impl.DeptDaoImpl.addDept(DeptDaoImpl.java:18)com.osim.service.Impl.DeptServiceImpl.addDept(DeptServiceImpl.java:20)com.osim.struts.actions.dept.DeptAction.addDept(DeptAction.java:18)在console中出现:org.hibernate.MappingNotFoundException: resource: com/osim/beans/Tdept.hbm.xml not foundat org.hibernate.cfg.Configuration.addResource(Configuration.java:610)原因:Tdept.hbm.xml找不到解决方法:包写错了,应为com/osim/beans/xml/Tdept.hbm.xml5. HTTP Status 500 - type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception java.lang.NoSuchMethodException: com.osim.struts.actions.dept.DeptAction.listDept()java.lang.Class.getMethod(Class.java:1605)原因:listDept() 方法找不到解决方法:查看struts_dept.xml中method的属性是否为listDept()6.java.lang.NullPointerExceptioncom.osim.struts.actions.dept.DeptAction.getDeptid(DeptAction.java:32)解决方法:private Tdept dept=new Tdept();实例化 7. type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception java.lang.RuntimeException: java.lang.NullPointerEerceptor.HibernateSessionIercept(HibernateSessionInterceptor.java:40)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:498)org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)root cause java.lang.NullPointerExceptioncom.osim.struts.action.position.PositionAction.addPositionExecute(PositionAction.java:20)sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)解决方法:private PositionService positionService=BeanFactory.getBeanImpl(PositionService.class);(即要实例化,相当于private PositionService positionService=new PositionServiceImpl()8. HTTP Status 500 - type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.root cause java.lang.IllegalArgumentException: id to load is required for loadingorg.hibernate.event.LoadEvent.(LoadEvent.java:74)org.hibernate.event.LoadEvent.(LoadEvent.java:56)解决方法:修改要用struts标签9. HTTP Status 500 - type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception Unable to instantiate Action, com.osim.struts.action.title.TitleAction, defined for addTitle in namespace /nullcom.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:318)com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:399)com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:198)org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61)org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)root cause java.lang.RuntimeExceptioncom.osim.utils.BeanFactory.getBeanImpl(BeanFactory.java:39)com.osim.struts.action.title.TitleAction.(TitleAction.java:15)原因:在BeanFactory中没有定义PositionService=com.osim.service.Impl.PositionServiceImpl解决方法:在BeanFperties中写入PositionService=com.osim.service.Impl.PositionServiceImpl或者直接实例化private PositionService positionService=new PositionServiceImpl()10. HTTP Status 500 - type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception java.lang.Exception: No result defined for action com.osim.struts.action.position.PositionAction and result erceptor.HibernateSessionIercept(HibernateSessionInterceptor.java:44)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:498)org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)root cause No result defined for action com.osim.struts.action.position.PositionAction and result inputcom.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:375)com.opensymphony.xwork2.Defau

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论