You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by peter lawrey <pe...@edgeci.com> on 2010/07/13 14:20:00 UTC

Gotcha: Don't delete the system directory.

Hello,
  Here is a little gotcha which had me confused for a while...

If you have managed instances of karaf, you will find that an empty "system" directory is created.  While the directory is empty, your instance will not start unless it exists.

This is because in class org.apache.felix.karaf.main.Main line 902, there is the following code.

for(File file: dir.listFiles()) {

This causes a NullPointerException if the directory doesn't exist, this exception is silently discarded by karaf as it doesn't log any errors which occur too early in the start up.

So if your instance doesn't start, check you have a system directory. ;)

Cheers,
  Peter.