Exception when trying to open filesystem

I've been using Intellij for a couple months and I just recently ran into a problem where Intellij is having problems opening the filesystem when I try to open a project or import modules.

It just shows the root folder "/" with nothing below it and throws this Exception:

[ 362724]  ERROR - plication.impl.ApplicationImpl - IntelliJ IDEA 11.1.1  Build #IC-117.117
[ 362724]  ERROR - plication.impl.ApplicationImpl - JDK: 1.6.0_26
[ 362725]  ERROR - plication.impl.ApplicationImpl - VM: Java HotSpot(TM) 64-Bit Server VM
[ 362725]  ERROR - plication.impl.ApplicationImpl - Vendor: Sun Microsystems Inc.
[ 362725]  ERROR - plication.impl.ApplicationImpl - OS: Linux
[ 362725]  ERROR - plication.impl.ApplicationImpl - Last Action: HelpTopics
[ 362725]  ERROR - plication.impl.ApplicationImpl - Original exception:  
java.lang.IllegalStateException: @NotNull method com/intellij/openapi/vfs/impl/local/LocalFileSystemBase.list must not return null
 at com.intellij.openapi.vfs.impl.local.LocalFileSystemBase.list(LocalFileSystemBase.java:215)
 at com.intellij.openapi.vfs.impl.local.LocalFileSystemImpl.list(LocalFileSystemImpl.java:528)
 at com.intellij.openapi.vfs.newvfs.persistent.PersistentFS.persistAllChildren(PersistentFS.java:169)
 at com.intellij.openapi.vfs.newvfs.persistent.PersistentFS.listAll(PersistentFS.java:228)
 at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.getChildren(VirtualDirectoryImpl.java:411)
 at com.intellij.openapi.fileChooser.impl.FileTreeStructure.getFileChildren(FileTreeStructure.java:106)
 at com.intellij.openapi.fileChooser.impl.FileTreeStructure.getChildElements(FileTreeStructure.java:77)
 at com.intellij.ide.util.treeView.AbstractTreeUi$31.run(AbstractTreeUi.java:1552)
 at com.intellij.ide.util.treeView.AbstractTreeUi.execute(AbstractTreeUi.java:1747)
 at com.intellij.ide.util.treeView.AbstractTreeUi.execute(AbstractTreeUi.java:1738)
 at com.intellij.ide.util.treeView.AbstractTreeUi.getChildrenFor(AbstractTreeUi.java:1550)
 at com.intellij.ide.util.treeView.AbstractTreeUi.access$5200(AbstractTreeUi.java:58)
 at com.intellij.ide.util.treeView.AbstractTreeUi$49.run(AbstractTreeUi.java:2652)
 at com.intellij.ide.util.treeView.AbstractTreeUi.execute(AbstractTreeUi.java:1747)
 at com.intellij.ide.util.treeView.AbstractTreeUi.execute(AbstractTreeUi.java:1738)
 at com.intellij.ide.util.treeView.AbstractTreeUi.access$2400(AbstractTreeUi.java:58)
 at com.intellij.ide.util.treeView.AbstractTreeUi$60$1.run(AbstractTreeUi.java:3320)
 at com.intellij.ide.util.treeView.AbstractTreeBuilder$2.run(AbstractTreeBuilder.java:462)
 at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:860)
 at com.intellij.ide.util.treeView.AbstractTreeBuilder.runBackgroundLoading(AbstractTreeBuilder.java:460)
 at com.intellij.ide.util.treeView.AbstractTreeUi$60.run(AbstractTreeUi.java:3311)
 at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
 at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:218)
 at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:169)
 at com.intellij.ide.util.treeView.AbstractTreeUi$61.run(AbstractTreeUi.java:3372)
 at com.intellij.util.concurrency.WorkerThread.run(WorkerThread.java:105)
 at com.intellij.openapi.application.impl.ApplicationImpl$6.run(ApplicationImpl.java:434)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
 at java.util.concurrent.FutureTask.run(FutureTask.java:138)
 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:662)
 at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:145)


Any ideas as to what might be the problem?

Thanks
8 comments
Comment actions Permalink

Please try File | Invalidate Caches

0
Comment actions Permalink

Ok I invalidated the Caches and restarted and I still get the same exception

0
Comment actions Permalink

Do you have anything special about your filesystem setup?

0
Comment actions Permalink

I don't think I have anything special in my filesystem. I've recently deleted and added a new virtual hard disk file for my VM and in Intellij I sometimes have the same Maven projects opened (but different versions).

0
Comment actions Permalink

Hi!

Please run this simple programm and post here it's output:

import java.io.File;
import java.util.Arrays;

public class ListRoots {
  public static void main(String[] args) {
    final File[] roots = File.listRoots();
    System.out.println(Arrays.toString(roots));
    if (roots.length == 1 && roots[0].getName().isEmpty()) {
      final String[] children = roots[0].list();
      System.out.println(Arrays.toString(children));
    }
  }
}



Also please post an output of this command:

ls -ld /

0
Comment actions Permalink

I get

[/]
null



from the program and

d-wx--x--x 24 root root 4096 2011-12-20 09:31 /

from ls -ld /
0
Comment actions Permalink

Thank you.

So, the reason is that your filesystem root lacks read permission. We'll fix the exception but the file tree may remain empty anyway.

0
Comment actions Permalink

Ah ok thanks. I'm not sure how that happened since I never modified the permissions on the root folder. It's working properly now.

0

Please sign in to leave a comment.