论坛首页 入门技术论坛

几种常见的异常

浏览 1718 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2008-10-08  

今天在做项目的时候报了这样一个错,所以我整理一些常见的异常,以便以后方便。

java.io.EOFException
 at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2498)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1273)
 at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
 at com.incesoft.dao.impl.LicenseListDAOImpl$2.doInHibernate(LicenseListDAOImpl.java:114)
 at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:369)
 at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:335)
 at com.incesoft.dao.impl.LicenseListDAOImpl.downloadLicense(LicenseListDAOImpl.java:83)
 at com.incesoft.service.impl.LicenseListServiceImpl.downloadLicense(LicenseListServiceImpl.java:32)
 at com.incesoft.action.LicenseListAction.downloadLicense(LicenseListAction.java:84)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at com.opensymphony.xwork.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:358)
 at com.opensymphony.xwork.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:218)
 at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:192)
 at com.opensymphony.xwork.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:175)
 at com.opensymphony.xwork.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
 at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
 at com.opensymphony.xwork.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:115)
 at com.opensymphony.xwork.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
 at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
 at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
 at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
 at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
 at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
 at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
 at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
 at com.opensymphony.webwork.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:174)
 at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
 at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
 at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
 at com.opensymphony.webwork.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:169)
 at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
 at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
 at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
 at com.opensymphony.xwork.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:151)
 at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
 at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
 at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
 at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
 at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
 at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
 at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
 at com.opensymphony.xwork.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:186)
 at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
 at com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:116)
 at com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:225)
 at com.opensymphony.webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:111)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:92)
 at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:106)
 at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
 at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
 at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
 at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:173)
 at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229)
 at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:274)
 at com.caucho.server.port.TcpConnection.run(TcpConnection.java:511)
 at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:520)
 at com.caucho.util.ThreadPool.run(ThreadPool.java:442)
 at java.lang.Thread.run(Thread.java:595)

这些是我整理的异常:

java.io.EOFException表示文件已结束

java.io. ArithmeticException算术异常,如除数为0

java.io.IllegalArgumentException:方法接收到非法参数

java.io.ArrayIndexOutOfBoundsException:数组越界 

java.io. NullPointerException:空指针异常

FileNotFoundException:文件没有找到 

NumberFormatException:字符窜转换为数字失败

 

 

 

 

 

 

 

论坛首页 入门技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics