每個好友: 我很困惑,當我看到關於碼頭的這個異常。jetty掃描器空指針異常
Exception in thread "Scanner-1" java.lang.NullPointerException
at org.eclipse.jetty.util.Scanner.scanFile(Scanner.java:576)
at org.eclipse.jetty.util.Scanner.scanFiles(Scanner.java:438)
at org.eclipse.jetty.util.Scanner.scan(Scanner.java:397)
at org.eclipse.jetty.util.Scanner$1.run(Scanner.java:348)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Exception in thread "Scanner-0" java.lang.NullPointerException
at org.eclipse.jetty.util.Scanner.scanFile(Scanner.java:576)
at org.eclipse.jetty.util.Scanner.scanFiles(Scanner.java:438)
at org.eclipse.jetty.util.Scanner.scan(Scanner.java:397)
at org.eclipse.jetty.util.Scanner$1.run(Scanner.java:348)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
約Scanner.java的源代碼是:
// If it is a directory, scan if it is a known directory or the depth is OK.
573 if (f.isDirectory() && (depth<_scanDepth || _scanDepth==-1 ||
_scanDirs.contains(f)))
574 {
575 File[] files = f.listFiles();
576 for (int i=0;i<files.length;i++)
577 scanFile(files[i], scanInfoMap,depth+1);
578 }
579 }
怎麼行576碼出現空指針異常?
碼頭版本:8.1.3.v20120416
需要你幫助的傢伙,所以第三季度的玉米粥。
已經知道它在linux中當前shell的句柄數量。 – hpy
你是說'f'是一個實際存在的目錄嗎? – Mingyu
是的,是jetty中webapp的基礎目錄。 – hpy