我在Twitter上运行一个爬虫,它捕获了一些异常推特
Logger.getLogger(TwitterCrawl.class.getName()).log(Level.SEVERE, null, ex1);
但有时候,每周一次或两次我得到这个例外
很难调试,因为它不会经常发生。
Exception in thread "main" java.lang.InternalError
at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:752)
at sun.misc.URLClassPath.getResource(URLClassPath.java:168)
at java.net.URLClassLoader$1.run(URLClassLoader.java:192)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:300)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.util.ResourceBundle$RBClassLoader.loadClass(ResourceBundle.java:445)
at java.util.ResourceBundle$Control.newBundle(ResourceBundle.java:2383)
at java.util.ResourceBundle.loadBundle(ResourceBundle.java:1406)
at java.util.ResourceBundle.findBundle(ResourceBundle.java:1365)
at java.util.ResourceBundle.findBundle(ResourceBundle.java:1292)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1234)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:715)
at java.util.logging.Level.getLocalizedName(Level.java:223)
at java.util.logging.SimpleFormatter.format(SimpleFormatter.java:64)
at java.util.logging.StreamHandler.publish(StreamHandler.java:179)
at java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:88)
at java.util.logging.Logger.log(Logger.java:458)
at java.util.logging.Logger.doLog(Logger.java:480)
at java.util.logging.Logger.log(Logger.java:569)
at com.twittercrawl.TwitterUpdate.getResults(TwitterUpdate.java:153)
at com.twittercrawl.TwitterUpdate.updateTweets(TwitterUpdate.java:83)
at com.twittercrawl.TwitterUpdate.runUpdate(TwitterUpdate.java:64)
at com.twittercrawl.TwitterCrawl.main(TwitterCrawl.java:73)
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:114)
at java.util.jar.JarFile.<init>(JarFile.java:133)
at java.util.jar.JarFile.<init>(JarFile.java:70)
at sun.misc.URLClassPath$JarLoader.getJarFile(URLClassPath.java:643)
at sun.misc.URLClassPath$JarLoader.access$600(URLClassPath.java:538)
at sun.misc.URLClassPath$JarLoader$1.run(URLClassPath.java:605)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.URLClassPath$JarLoader.ensureOpen(URLClassPath.java:597)
at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:750)
... 27 more