求大侠解决异常问题!!急急急!!! 程序部署在linux服务器上,大约每4天出一次该异常,重启程序后又正常了,急盼各位大侠帮忙! Exception in thread "main" java.lang.NoClassDefFoundError: com/aiflow/zw/util/AlarmMess at com.aiflow.zw.main.Main.main(Main.java:224) Caused by: java.lang.ClassNotFoundException: com.aiflow.zw.util.AlarmMess at java.net.URLClassLoader$1.run(URLClassLoader.java:199) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) ... 1 more Caused by: java.io.FileNotFoundException: /home/tomcat/vas_elt_zy/com/aiflow/zw/util/AlarmMess.class (Too many open files) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:106) at sun.misc.URLClassPath$FileLoader$1.getInputStream(URLClassPath.java:1005) at sun.misc.Resource.cachedInputStream(Resource.java:61) at sun.misc.Resource.getByteBuffer(Resource.java:144) at java.net.URLClassLoader.defineClass(URLClassLoader.java:256) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) ... 6 more
------解决方案-------------------- Caused by: java.io.FileNotFoundException: /home/tomcat/vas_elt_zy/com/aiflow/zw/util/AlarmMess.class (Too many open files)
------解决方案-------------------- Caused by: java.io.FileNotFoundException: /home/tomcat/vas_elt_zy/com/aiflow/zw/util/AlarmMess.class (Too many open files) AlarmMess是不是做了文件操作,文件或流操作要记住:打开用完后要适时的关闭。
------解决方案-------------------- Caused by: java.io.FileNotFoundException: /home/tomcat/vas_elt_zy/com/aiflow/zw/util/AlarmMess.class (Too many open files) 看错误提示,AlarmMess里打开的文件过多,是不是每天都会创建打开新的文件,但是过期的文件没有关闭?