随笔分类 -  Exception

摘要:来自:https://plumbr.eu/outofmemoryerror/gc-overhead-limit-exceededJava runtime environment contains a built-inGarbage Collection (GC)process. In many ot... 阅读全文
posted @ 2015-07-13 09:52 悟寰轩-叶秋 编辑
摘要:可能是项目绑定的日志不是logback的jar包,而是其他包,具体可查看tomcat启动日志log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).log4j:... 阅读全文
posted @ 2014-08-01 10:58 悟寰轩-叶秋 编辑
摘要:使用Struts2,配置一切正常,使用常用tag也正常,但是在使用标记时,发现控制台总是输出警告信息,警告信息内容如下:警告:Noconfigurationfoundforthespecifiedaction: 'ShowMessage' in namespace: ''. Formactionde... 阅读全文
posted @ 2014-04-29 10:36 悟寰轩-叶秋 编辑
摘要:http://blog.csdn.net/smst1987/article/details/6871495问题:maven-dependency-plugin (goals "copy-dependencies","unpack") is not supported by m2e解决方法: 1 2 3 4 5 org.eclipse.m2e 6 lifecycle-mapping 7 1.0.0 ... 阅读全文
posted @ 2014-04-10 16:40 悟寰轩-叶秋 编辑
摘要:来自:http://blog.csdn.net/shootyou/article/details/6622226昨天解决了一个HttpClient调用错误导致的服务器异常,具体过程如下:http://blog.csdn.net/shootyou/article/details/6615051里头的分析过程有提到,通过查看服务器网络状态检测到服务器有大量的CLOSE_WAIT的状态。在服务器的日常维护过程中,会经常用到下面的命令:[plain] view plaincopyprint?netstat-n|awk'/^tcp/{++S[$NF]}END{for(ainS)printa,S[ 阅读全文
posted @ 2013-11-29 10:25 悟寰轩-叶秋 编辑
摘要:java.io.FileOutputStream.close0(Native Method)at java.io.FileOutputStream.close(FileOutputStream.java:326)服务器挂载盘 NFS方式 批量上传时,会导致这种情况发生。 阅读全文
posted @ 2013-11-14 15:21 悟寰轩-叶秋 编辑
摘要:http://stackoverflow.com/questions/3658721/httpclient-4-error-302-how-to-redirect 1 DefaultHttpClient httpclient = new DefaultHttpClient(); 2 httpclient.setRedirectStrategy(new DefaultRedirectStrategy() { 3 public boolean isRedirected(HttpRequest request, HttpResponse re... 阅读全文
posted @ 2013-11-04 16:53 悟寰轩-叶秋 编辑
摘要:result type 如果是默认 第一次访问页面不会访问action,刷新才会请求type=redirect 第一次访问会直接访问action或者在调用地址加 url?+随机数 阅读全文
posted @ 2013-10-23 16:40 悟寰轩-叶秋 编辑
摘要:在测试的时候会用Eclispe 这时候就需要在Eclipse ->run -arguments 中的VM arguments 中输入-Xms32m -Xmx800m这个参数就可以了。在Eclilpse中修改了启动参数,在VM arguments 加入了-Xms32m -Xmx800m,问题解决。 阅读全文
posted @ 2013-10-23 16:02 悟寰轩-叶秋 编辑
摘要:1 ScheduledExecutorService service = Executors.newScheduledThreadPool(10); 2 // 从现在开始delay毫秒之后,每隔一天执行一次,转换为毫秒 3 // service.scheduleAtFixedRate(this, delay, period, TimeUnit.MILLISECONDS); 4 /**获得线程中抛出的异常,eg Integer.parseInt("AAA");,缺少jar包等*/ 5 ScheduledFuture ... 阅读全文
posted @ 2013-10-10 15:25 悟寰轩-叶秋 编辑
摘要:mysql 报这个异常:java.sql.SQLException: Data truncation: Truncated incorrect DOUBLE valueupdate 表名 set col1 = ? and col2 = ? where id = ?改为:update 表名 set col1 = ? , col2 = ? where id = ? 用逗号隔开 阅读全文
posted @ 2013-09-26 19:55 悟寰轩-叶秋 编辑
摘要:web.xml报错 taglib标签错误,3.0要用jsp-config 阅读全文
posted @ 2013-09-11 17:37 悟寰轩-叶秋 编辑
摘要:org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalStateException: Cannot forward after response has been committed又一次跳转,代码控制跳转,跳转了两次,加个return;web.xml错误信息强制跳转页面,抛出异常 java.lang.Throwable /error/error.html 阅读全文
posted @ 2013-09-06 10:09 悟寰轩-叶秋 编辑
摘要:程序中使用的各种常量用一个类来统一管理,类似:publicclassAppConst{publicstaticfinalStringSTR_1="String1";publicstaticfinalStringSTR_2="String2";......}然后在某些逻辑代码段里使用了这些常量。这样做可以便于管理常量,避免了大量的magic number/text,在修改常量内容时只需改这一个类就行了,但有时候会奇怪地发现,重新编译打包的程序依旧我行我素,并没有即时反应我们对常量的修改,这是何解呢? 在之前的《JVM学习笔记三--类的初始化》中我曾提到,静 阅读全文
posted @ 2013-08-08 18:57 悟寰轩-叶秋 编辑
摘要:http://grails.1312388.n4.nabble.com/Deployment-problems-td4628710.htmlorg.apache.catalina.core.StandardContext startInternal SEVERE: Error listenerStartorg.apache.catalina.core.StandardContext startInternalSEVERE: Context [/******] startup failed due to previous errors网上找了N多文章,都没有切中要害。后来在国外网站上搜到一个方法 阅读全文
posted @ 2013-08-06 17:11 悟寰轩-叶秋 编辑
摘要:一、异常的产生1. 在java代码中,如果发生异常,JVM就会中断程序代码的运行,然后创建异常对象并抛出。例如:int a=2, b=0;int i=a/b; //除数不能为0,发生异常System.out.println(i);程序会在执行第2行代码时中断,并抛出异常,导致后面的代码无法执行。2. 但是,有些情况程序员认为是异常的,而在JVM看来却是正常的,比如说:int age; age = -100; System.out.println(age); 对于JVM来说,这只是正常的赋值语句,但在我们眼中这就不正常了,谁的年龄会是负的呢。所以,在这种情况下我们就需要自己手动创建并抛出异常,这 阅读全文
posted @ 2013-06-07 14:16 悟寰轩-叶秋 阅读(317) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示