title: SonarQube shuts down after adding plugin
body: <p>I have developed a plugin for SonarQube which scans for dependencies.
  The pom.xml is set up correctly, as SonarQube recognizes it as a plugin when I place the plugin.jar into downloads first while having an instance of Sonarqube running.</p>
  
  <p>However, when I restart sonarqube closes without an error.</p>
  
  <pre><code>wrapper  | --&gt; Wrapper Started as Console
  wrapper  | Launching a JVM...
  jvm 1    | WrapperManager class initialized by thread: main  Using classloader: sun.misc.Launcher$AppClassLoader@5c647e05
  jvm 1    | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
  jvm 1    |   Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.
  jvm 1    |
  jvm 1    | Wrapper Manager: JVM #1
  jvm 1    | Running a 64-bit JVM.
  jvm 1    | Wrapper Manager: Registering shutdown hook
  jvm 1    | Wrapper Manager: Using wrapper
  jvm 1    | Load native library.  One or more attempts may fail if platform specific libraries do not exist.
  jvm 1    | Loading native library failed: wrapper-windows-x86-64.dll  Cause: java.lang.UnsatisfiedLinkError: no wrapper-windows-x86-64 in java.library.path
  jvm 1    | Loaded native library: wrapper.dll
  jvm 1    | Calling native initialization method.
  jvm 1    | Initializing WrapperManager native library.
  jvm 1    | Java Executable: C:\Program Files\Java\jdk1.8.0_101\bin\java.exe
  jvm 1    | Windows version: 10.0.14393
  jvm 1    | Java Version   : 1.8.0_101-b13 Java HotSpot(TM) 64-Bit Server VM
  jvm 1    | Java VM Vendor : Oracle Corporation
  jvm 1    |
  jvm 1    | Control event monitor thread started.
  jvm 1    | Startup runner thread started.
  jvm 1    | WrapperManager.start(org.tanukisoftware.wrapper.WrapperSimpleApp@38af3868, args[]) called by thread: main
  jvm 1    | Communications runner thread started.
  jvm 1    | Open socket to wrapper...Wrapper-Connection
  jvm 1    | Opened Socket from 31000 to 32000
  jvm 1    | Send a packet KEY : 2GTtSqz0GtFRhODS
  jvm 1    | handleSocket(Socket[addr=/127.0.0.1,port=32000,localport=31000])
  jvm 1    | Received a packet LOW_LOG_LEVEL : 1
  jvm 1    | Wrapper Manager: LowLogLevel from Wrapper is 1
  jvm 1    | Received a packet PING_TIMEOUT : 0
  jvm 1    | PingTimeout from Wrapper is 0
  jvm 1    | Received a packet PROPERTIES : (Property Values)
  jvm 1    | Received a packet START : start
  jvm 1    | calling WrapperListener.start()
  jvm 1    | Waiting for WrapperListener.start runner thread to complete.
  jvm 1    | WrapperListener.start runner thread started.
  jvm 1    | WrapperSimpleApp: start(args) Will wait up to 2 seconds for the main method to complete.
  jvm 1    | WrapperSimpleApp: invoking main method
  jvm 1    | 2017.03.24 10:11:33 INFO  app[o.s.a.AppFileSystem] Cleaning or creating temp directory C:\sonarqube\temp
  jvm 1    | 2017.03.24 10:11:34 INFO  app[o.s.p.m.JavaProcessLauncher] Launch process[es]: C:\Program Files\Java\jdk1.8.0_101\jre\bin\java -Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djava.net.preferIPv4Stack=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=C:\sonarqube\temp -javaagent:C:\Program Files\Java\jdk1.8.0_101\jre\lib\management-agent.jar -cp ./lib/common/*;./lib/search/* org.sonar.search.SearchServer C:\sonarqube\temp\sq-process7604452175831354499properties
  jvm 1    | Send a packet START_PENDING : 5000
  jvm 1    | Send a packet START_PENDING : 5000
  jvm 1    | WrapperSimpleApp: start(args) end.  Main Completed=false, exitCode=null
  jvm 1    | WrapperListener.start runner thread stopped.
  jvm 1    | returned from WrapperListener.start()
  jvm 1    | Send a packet STARTED :
  jvm 1    | Startup runner thread stopped.
  jvm 1    | Received a packet PING : ping
  jvm 1    | Send a packet PING : ok
  jvm 1    | Received a packet PING : ping
  jvm 1    | Send a packet PING : ok
  jvm 1    | 2017.03.24 10:11:43 INFO  app[o.s.p.m.Monitor] Process[es] is up
  jvm 1    | 2017.03.24 10:11:43 INFO  app[o.s.p.m.JavaProcessLauncher] Launch process[web]: C:\Program Files\Java\jdk1.8.0_101\jre\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false -Djruby.compile.invokedynamic=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true -Djava.io.tmpdir=C:\sonarqube\temp -javaagent:C:\Program Files\Java\jdk1.8.0_101\jre\lib\management-agent.jar -cp ./lib/common/*;./lib/server/*;C:\sonarqube\lib\jdbc\h2\h2-1.3.176.jar org.sonar.server.app.WebServer C:\sonarqube\temp\sq-process8001231277797444929properties
  jvm 1    | Received a packet PING : ping
  jvm 1    | Send a packet PING : ok
  jvm 1    | Received a packet PING : ping
  jvm 1    | Send a packet PING : ok
  jvm 1    | 2017.03.24 10:11:52 INFO  app[o.s.p.m.Monitor] Process[es] is stopping
  jvm 1    | 2017.03.24 10:11:53 INFO  app[o.s.p.m.Monitor] Process[es] is stopped
  jvm 1    | Wrapper Manager: ShutdownHook started
  jvm 1    | WrapperManager.stop(0) called by thread: Wrapper-Shutdown-Hook
  jvm 1    | Send a packet STOP : 0
  jvm 1    | Received a packet STOP :
  jvm 1    | Thread, Wrapper-Shutdown-Hook, handling the shutdown process.
  jvm 1    | calling listener.stop()
  jvm 1    | WrapperSimpleApp: stop(0)
  jvm 1    | returned from listener.stop() -&gt; 0
  jvm 1    | shutdownJVM(0) Thread:Wrapper-Shutdown-Hook
  jvm 1    | Send a packet STOPPED : 0
  jvm 1    | Closing socket.
  jvm 1    | Wrapper Manager: ShutdownHook complete
  jvm 1    | Server daemon shut down
  wrapper  | &lt;-- Wrapper Stopped
  </code></pre>
  
  <p>In addition my sensor and plugin class:</p>
  
  <pre><code>   public final class SonarDependencyPlugin implements Plugin {
  
      public void define(final Context context) {
                context.addExtensions(SonarDependencyMetrics.class,SonarDependencySensor.class);
          }
  
      }
  </code></pre>
  
  <p>+</p>
  
  <pre><code>public class SonarDependencySensor implements Sensor {
  
      CouplingScanner scanner;
  
      public void describe(SensorDescriptor descriptor) {
          descriptor.name("SonarDependency sensor");
      }
  
      public void execute(SensorContext context) {
  
              this.scanner=new CouplingScanner(context.fileSystem().baseDir());
              scanner.scan();
  
      }
  }
  </code></pre>
  
  <p>My Scanner basically works on its own and only needs a directory.</p>
  
  <p>I just want sonarqube to not shutdown first, so I'll worry about saving metrics later. Appreciate any help. Thanks!</p>
  
  <p><strong>RESOLVED</strong>: Take a look at your installDirectory/sonarqube/logs files and work through the list of errors. Not all errors get displayed in the console. My error was specific to my project (Metric nameconflict with another plugin I was using)</p>