title: Error starting sonarqube after upgrade
body: <p>We are upgrading from sonarqube 4.0.0 to 5.1.2, but have hit on a problem. Initially we had some plugin version issues but have now hit an issue we cannot resolve. </p>
  
  <p>The plugins and versions are:</p>
  
  <ul>
  <li>sonar-checkstyle-plugin-2.0.jar</li>
  <li>sonar-clirr-plugin-1.2.jar</li>
  <li>sonar-clover-plugin-2.9.jar</li>
  <li>sonar-cobertura-plugin-1.4.jar</li>
  <li>sonar-crowd-plugin-2.0.jar</li>
  <li>sonar-doxygen-plugin-0.1.jar</li>
  <li>sonar-findbugs-plugin-3.3.jar</li>
  <li>sonar-groovy-plugin-1.2.jar</li>
  <li>sonar-java-plugin-3.6.jar</li>
  <li>sonar-javascript-plugin-2.8.jar</li>
  <li>sonar-jira-plugin-1.2.jar</li>
  <li>sonar-ldap-plugin-1.4.jar</li>
  <li>sonar-plsql-plugin-2.5.jar</li>
  <li>sonar-pmd-plugin-2.0.jar</li>
  <li>sonar-scm-activity-plugin-1.6.jar</li>
  <li>sonar-scm-cvs-plugin-1.0.jar</li>
  <li>sonar-scm-svn-plugin-1.2.jar</li>
  <li>sonar-surefire-plugin-3.3.jar</li>
  <li>sonar-useless-code-tracker-plugin-0.6.jar</li>
  <li>sonar-web-plugin-2.4.jar</li>
  <li>sonar-widget-lab-plugin-1.3.1.jar</li>
  <li>sonar-xml-plugin-1.3.jar</li>
  </ul>
  
  <p>The full sonar log is:</p>
  
  <pre><code>    --&gt; Wrapper Started as Service
  Launching a JVM...
  Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
    Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.
  
  2015.10.16 11:30:34 INFO  app[o.s.p.m.JavaProcessLauncher] Launch process[search]: D:\Apps\Java\jdk1.8.0_60\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=D:\Apps\sonarqube-5.1.2\temp -cp ./lib/common/*;./lib/search/* org.sonar.search.SearchServer C:\Users\devadmin\AppData\Local\Temp\sq-process8016248323953546345properties
  2015.10.16 11:30:36 INFO   es[o.s.p.ProcessEntryPoint]  Starting search
  2015.10.16 11:30:36 INFO   es[o.s.s.SearchServer]  Starting Elasticsearch[sonarqube] on port 9001
  2015.10.16 11:30:37 INFO   es[o.elasticsearch.node]  [sonar-1444991433854] version[1.4.4], pid[4248], build[c88f77f/2015-02-19T13:05:36Z]
  2015.10.16 11:30:37 INFO   es[o.elasticsearch.node]  [sonar-1444991433854] initializing ...
  2015.10.16 11:30:37 INFO   es[o.e.plugins]  [sonar-1444991433854] loaded [], sites []
  2015.10.16 11:30:43 INFO   es[o.elasticsearch.node]  [sonar-1444991433854] initialized
  2015.10.16 11:30:43 INFO   es[o.elasticsearch.node]  [sonar-1444991433854] starting ...
  2015.10.16 11:30:44 INFO   es[o.e.transport]  [sonar-1444991433854] bound_address {inet[/0.0.0.0:9001]}, publish_address {inet[/10.1.100.148:9001]}
  2015.10.16 11:30:44 INFO   es[o.e.discovery]  [sonar-1444991433854] sonarqube/EZdpDSYmT5eLvBxaPIuPhA
  2015.10.16 11:30:47 INFO   es[o.e.cluster.service]  [sonar-1444991433854] new_master [sonar-1444991433854][EZdpDSYmT5eLvBxaPIuPhA][cgprtools02][inet[/10.1.100.148:9001]]{rack_id=sonar-1444991433854}, reason: zen-disco-join (elected_as_master)
  2015.10.16 11:30:47 INFO   es[o.elasticsearch.node]  [sonar-1444991433854] started
  2015.10.16 11:30:49 INFO   es[o.e.gateway]  [sonar-1444991433854] recovered [1] indices into cluster_state
  2015.10.16 11:30:49 INFO  app[o.s.p.m.Monitor] Process[search] is up
  2015.10.16 11:30:49 INFO  app[o.s.p.m.JavaProcessLauncher] Launch process[web]: D:\Apps\Java\jdk1.8.0_60\jre\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false -Djruby.compile.invokedynamic=false -Xmx768m -XX:MaxPermSize=160m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true -Djava.io.tmpdir=D:\Apps\sonarqube-5.1.2\temp -cp ./lib/common/*;./lib/server/*;D:\Apps\sonarqube-5.1.2\extensions\jdbc-driver\oracle\ojdbc6.jar org.sonar.server.app.WebServer C:\Users\devadmin\AppData\Local\Temp\sq-process104299133105854453properties
  2015.10.16 11:30:52 INFO  web[o.s.p.ProcessEntryPoint] Starting web
  2015.10.16 11:30:52 INFO  web[o.s.s.app.Webapp] Webapp directory: D:\Apps\sonarqube-5.1.2\web
  2015.10.16 11:30:53 INFO  web[o.a.c.h.Http11NioProtocol] Initializing ProtocolHandler ["http-nio-0.0.0.0-9000"]
  2015.10.16 11:30:54 INFO  web[o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read
  2015.10.16 11:30:56 INFO  web[o.e.plugins] [sonar-1444991433854] loaded [], sites []
  2015.10.16 11:30:59 INFO  web[o.s.s.p.ServerImpl] SonarQube Server / 5.1.2 / 2a52a7106b2bfbd659c591c2d6fc09ad0ab2db5c
  2015.10.16 11:30:59 INFO  web[o.s.c.p.Database] Create JDBC datasource for jdbc:oracle:thin:@zcgprtoolsdb01.mfl.co.uk:1521:TOOL
  2015.10.16 11:31:04 INFO  web[o.s.s.p.DefaultServerFileSystem] SonarQube home: D:\Apps\sonarqube-5.1.2
  2015.10.16 11:31:05 INFO  web[o.s.s.p.ServerPluginJarsInstaller] Install plugins
  2015.10.16 11:31:05 WARN  web[o.s.s.p.ServerPluginJarsInstaller] Plugin SCM Activity is blacklisted. Please uninstall it.
  2015.10.16 11:31:05 INFO  web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin CVS / 1.0 / f9735104bfa053abc50edad720c79d89a4f5cd72
  2015.10.16 11:31:05 INFO  web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin Cobertura / 1.4 / 8f6e1ea327d6f03547aac9a9231b64b0a672294c
  2015.10.16 11:31:05 INFO  web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin Email notifications / 5.1.2 / 2a52a7106b2bfbd659c591c2d6fc09ad0ab2db5c
  2015.10.16 11:31:05 INFO  web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin Clirr / 1.2 / a2df27d3429980bdeec91f69644780b72c0e888b
  2015.10.16 11:31:05 INFO  web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin Crowd / 2.0 / 699040114c48411e968961b1caa61a83f89c8906
  2015.10.16 11:31:05 INFO  web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin PMD / 2.0 / 31dc3bbaeced46313d55f4396183a8135c64f8af
  2015.10.16 11:31:05 INFO  web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin Clover / 2.9 / 6199
  2015.10.16 11:31:05 INFO  web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin Doxygen / 0.1 / 6014
  2015.10.16 11:31:05 INFO  web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin Widget Lab / 1.3.1
  2015.10.16 11:31:05 INFO  web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin Surefire / 3.3 / 983822a5a5943a7c19007b1445a7063e771172e1
  2015.10.16 11:31:05 INFO  web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin SVN / 1.2 / d04c3cdb21f48905dd8300d1129ec90281aa6db2
  2015.10.16 11:31:05 INFO  web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin JavaScript / 2.8 / 53ffb46f827d24be6173dc5a44afd74b2c0b4e3f
  2015.10.16 11:31:06 INFO  web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin PL/SQL / 2.5 / 445be66de1b2eafa3664749a006ce25634ed1e9d
  2015.10.16 11:31:06 INFO  web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin Core / 5.1.2 / 2a52a7106b2bfbd659c591c2d6fc09ad0ab2db5c
  2015.10.16 11:31:06 INFO  web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin Findbugs / 3.3 / e1a76544ee6aed765106e7e2bb64072adf63ccaf
  2015.10.16 11:31:06 INFO  web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin Groovy / 1.2 / 80ae22f577368968253eed734bebe027db9a9dab
  2015.10.16 11:31:06 INFO  web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin Java / 3.6 / 88ff47a7574edcc4472ff495c15b6f94d8dbd98f
  2015.10.16 11:31:07 INFO  web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin LDAP / 1.4 / 18ba3a13ba4c6c07e6b0ad77940a52734159c27e
  2015.10.16 11:31:07 INFO  web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin Useless Code Tracker / 0.6 / 6283
  2015.10.16 11:31:07 INFO  web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin Web / 2.4 / 61c14c00da36f77d18c019ad2bd7942708e99c13
  2015.10.16 11:31:07 INFO  web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin XML / 1.3 / a8739cf424a5b42b64a3277373ab2d48aca5a6e0
  2015.10.16 11:31:07 INFO  web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin English Pack / 5.1.2 / 2a52a7106b2bfbd659c591c2d6fc09ad0ab2db5c
  2015.10.16 11:31:07 INFO  web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin Checkstyle / 2.0 / 6cdc8d9781b7e40f83256288384dae7175dae934
  2015.10.16 11:31:07 INFO  web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin JIRA / 1.2 / 71e8002a5e7948ec705648d336e8bb9ab8026c55
  2015.10.16 11:31:07 INFO  web[o.s.s.p.RailsAppsDeployer] Deploy Ruby on Rails applications
  2015.10.16 11:31:08 INFO  web[o.s.j.s.AbstractDatabaseConnector] Initializing Hibernate
  2015.10.16 11:31:11 ERROR web[o.a.c.c.C.[.[.[/]] Exception sending context initialized event to listener instance of class org.sonar.server.platform.PlatformServletContextListener
  java.lang.NoClassDefFoundError: org/sonar/api/batch/maven/MavenPluginHandler
      at java.lang.ClassLoader.defineClass1(Native Method) ~[na:1.8.0_60]
      at java.lang.ClassLoader.defineClass(ClassLoader.java:760) ~[na:1.8.0_60]
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[na:1.8.0_60]
      at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) ~[na:1.8.0_60]
      at java.net.URLClassLoader.access$100(URLClassLoader.java:73) ~[na:1.8.0_60]
      at java.net.URLClassLoader$1.run(URLClassLoader.java:368) ~[na:1.8.0_60]
      at java.net.URLClassLoader$1.run(URLClassLoader.java:362) ~[na:1.8.0_60]
      at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_60]
      at java.net.URLClassLoader.findClass(URLClassLoader.java:361) ~[na:1.8.0_60]
      at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:389) ~[plexus-classworlds-2.5.1.jar:na]
      at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42) ~[plexus-classworlds-2.5.1.jar:na]
      at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259) ~[plexus-classworlds-2.5.1.jar:na]
      at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:235) ~[plexus-classworlds-2.5.1.jar:na]
      at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227) ~[plexus-classworlds-2.5.1.jar:na]
      at org.sonar.plugins.cobertura.CoberturaPlugin.getExtensions(CoberturaPlugin.java:38) ~[na:na]
      at org.sonar.server.plugins.ServerExtensionInstaller.installExtensions(ServerExtensionInstaller.java:51) ~[sonar-server-5.1.2.jar:na]
      at org.sonar.server.platform.ServerComponents.startLevel4Components(ServerComponents.java:819) ~[sonar-server-5.1.2.jar:na]
      at org.sonar.server.platform.Platform.startLevel34Containers(Platform.java:120) ~[sonar-server-5.1.2.jar:na]
      at org.sonar.server.platform.Platform.doStart(Platform.java:81) ~[sonar-server-5.1.2.jar:na]
      at org.sonar.server.platform.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:44) ~[sonar-server-5.1.2.jar:na]
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4720) [tomcat-embed-core-8.0.18.jar:8.0.18]
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5154) [tomcat-embed-core-8.0.18.jar:8.0.18]
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.0.18.jar:8.0.18]
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409) [tomcat-embed-core-8.0.18.jar:8.0.18]
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399) [tomcat-embed-core-8.0.18.jar:8.0.18]
      at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_60]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_60]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_60]
      at java.lang.Thread.run(Thread.java:745) [na:1.8.0_60]
  Caused by: java.lang.ClassNotFoundException: org.sonar.api.batch.maven.MavenPluginHandler
      at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50) ~[plexus-classworlds-2.5.1.jar:na]
      at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259) ~[plexus-classworlds-2.5.1.jar:na]
      at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:235) ~[plexus-classworlds-2.5.1.jar:na]
      at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227) ~[plexus-classworlds-2.5.1.jar:na]
      ... 29 common frames omitted
  2015.10.16 11:31:12 INFO  web[jruby.rack] jruby 1.7.9 (ruby-1.8.7p370) 2013-12-06 87b108a on Java HotSpot(TM) 64-Bit Server VM 1.8.0_60-b27 [Windows Server 2012-amd64]
  2015.10.16 11:31:12 INFO  web[jruby.rack] using a shared (threadsafe!) runtime
  2015.10.16 11:31:33 INFO  web[jruby.rack] An exception happened during JRuby-Rack startup
  undefined method `controllers' for nil:NilClass
  --- System
  jruby 1.7.9 (ruby-1.8.7p370) 2013-12-06 87b108a on Java HotSpot(TM) 64-Bit Server VM 1.8.0_60-b27 [Windows Server 2012-amd64]
  Time: Fri Oct 16 11:31:33 +0100 2015
  Server: Apache Tomcat/8.0.18
  jruby.home: file:/D:/Apps/sonarqube-5.1.2/lib/server/jruby-complete-1.7.9.jar!/META-INF/jruby.home
  
  --- Context Init Parameters:
  crowd.application = sonar
  crowd.password = pa55word
  crowd.url = http://crowd.mfl.co.uk/crowd-2.4.0/services/
  jruby.compat.version = 1.8
  jruby.max.runtimes = 1
  jruby.min.runtimes = 1
  jruby.rack.logging = slf4j
  process.index = 1
  process.key = web
  process.sharedDir = D:\Apps\sonarqube-5.1.2\temp
  process.terminationTimeout = 60000
  public.root = /
  rails.env = production
  sonar.authenticator.class = org.sonar.plugins.crowd.CrowdAuthenticator
  sonar.authenticator.ignoreStartupFailure = true
  sonar.cluster.name = sonarqube
  sonar.jdbc.driverClassName = oracle.jdbc.OracleDriver
  sonar.jdbc.driverPath = D:\Apps\sonarqube-5.1.2\extensions\jdbc-driver\oracle\ojdbc6.jar
  sonar.jdbc.maxActive = 20
  sonar.jdbc.maxIdle = 5
  sonar.jdbc.maxWait = 5000
  sonar.jdbc.minEvictableIdleTimeMillis = 600000
  sonar.jdbc.minIdle = 2
  sonar.jdbc.password = sonar
  sonar.jdbc.schema = SONAR
  sonar.jdbc.timeBetweenEvictionRunsMillis = 30000
  sonar.jdbc.url = jdbc:oracle:thin:@zcgprtoolsdb01.mfl.co.uk:1521:TOOL
  sonar.jdbc.username = sonar
  sonar.node.name = sonar-1444991433854
  sonar.notifications.delay = 60
  sonar.path.data = D:\Apps\sonarqube-5.1.2\data
  sonar.path.home = D:\Apps\sonarqube-5.1.2
  sonar.path.logs = D:\Apps\sonarqube-5.1.2\logs
  sonar.path.temp = D:\Apps\sonarqube-5.1.2\temp
  sonar.path.web = D:\Apps\sonarqube-5.1.2\web
  sonar.search.javaAdditionalOpts = 
  sonar.search.javaOpts = -Xmx1G -Xms256m -Xss256k -Djava.net.preferIPv4Stack=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError
  sonar.search.port = 9001
  sonar.search.type = TRANSPORT
  sonar.web.javaAdditionalOpts = 
  sonar.web.javaOpts = -Xmx768m -XX:MaxPermSize=160m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true
  
  --- Backtrace
  NoMethodError: undefined method `controllers' for nil:NilClass
        add_java_ws_routes at D:/Apps/sonarqube-5.1.2/web/WEB-INF/config/../lib/java_ws_routing.rb:34
    load_java_web_services at D:/Apps/sonarqube-5.1.2/web/WEB-INF/config/../lib/database_version.rb:68
           automatic_setup at D:/Apps/sonarqube-5.1.2/web/WEB-INF/config/../lib/database_version.rb:75
                    (root) at D:/Apps/sonarqube-5.1.2/web/WEB-INF/config/environment.rb:272
                      load at org/jruby/RubyKernel.java:1094
                    (root) at file:/D:/Apps/sonarqube-5.1.2/lib/server/jruby-rack-1.1.13.2.jar!/jruby/rack/rails/environment2.rb:1
          load_environment at file:/D:/Apps/sonarqube-5.1.2/lib/server/jruby-rack-1.1.13.2.jar!/jruby/rack/rails/environment2.rb:25
          load_environment at file:/D:/Apps/sonarqube-5.1.2/lib/server/jruby-rack-1.1.13.2.jar!/jruby/rack/rails_booter.rb:79
  
  --- RubyGems
  Gem.dir: D:/Apps/sonarqube-5.1.2/web/WEB-INF/gems
  Gem.path:
  D:/Apps/sonarqube-5.1.2/web/WEB-INF/gems
  Activated gems:
    activesupport-2.3.15
    activerecord-2.3.15
    rack-1.1.6
    actionpack-2.3.15
    rails-2.3.15
    color-tools-1.3.0
    i18n-0.4.2
    json-jruby-1.2.3-universal-java-1.6
    activerecord-jdbc-adapter-1.1.3
    fastercsv-1.4.0
  
  --- Bundler
  undefined method `bundle_path' for Bundler:Module
  
  --- JRuby-Rack Config
  compat_version = RUBY1_8
  default_logger = org.jruby.rack.logging.StandardOutLogger@3d4149ea
  equals = &lt;error: &gt;
  err = java.io.PrintStream@13cedf4d
  filter_adds_html = true
  filter_verifies_resource = false
  ignore_environment = false
  initial_memory_buffer_size = 
  initial_runtimes = 1
  jms_connection_factory = 
  jms_jndi_properties = 
  logger = org.jruby.rack.logging.Slf4jLogger@67cbb92
  logger_class_name = slf4j
  logger_name = jruby.rack
  maximum_memory_buffer_size = 
  maximum_runtimes = 1
  num_initializer_threads = 
  out = java.io.PrintStream@5304a805
  rackup = 
  rackup_path = 
  rewindable = true
  runtime_arguments = 
  runtime_environment = 
  runtime_timeout_seconds = 
  serial_initialization = false
  servlet_context = org.apache.catalina.core.ApplicationContextFacade@2afc73de
  throw_init_exception = false
  
  2015.10.16 11:31:33 ERROR web[jruby.rack] initialization failed
  org.jruby.rack.RackInitializationException: undefined method `controllers' for nil:NilClass
      from D:/Apps/sonarqube-5.1.2/web/WEB-INF/config/../lib/java_ws_routing.rb:34:in `add_java_ws_routes'
      from D:/Apps/sonarqube-5.1.2/web/WEB-INF/config/../lib/database_version.rb:68:in `load_java_web_services'
      from D:/Apps/sonarqube-5.1.2/web/WEB-INF/config/../lib/database_version.rb:75:in `automatic_setup'
      from D:/Apps/sonarqube-5.1.2/web/WEB-INF/config/environment.rb:272:in `(root)'
      from org/jruby/RubyKernel.java:1094:in `load'
      from file:/D:/Apps/sonarqube-5.1.2/lib/server/jruby-rack-1.1.13.2.jar!/jruby/rack/rails/environment2.rb:1:in `(root)'
      from file:/D:/Apps/sonarqube-5.1.2/lib/server/jruby-rack-1.1.13.2.jar!/jruby/rack/rails/environment2.rb:25:in `load_environment'
      from file:/D:/Apps/sonarqube-5.1.2/lib/server/jruby-rack-1.1.13.2.jar!/jruby/rack/rails_booter.rb:79:in `load_environment'
  
      at org.jruby.rack.RackInitializationException.wrap(RackInitializationException.java:29) ~[jruby-rack-1.1.13.2.jar:na]
      at org.jruby.rack.RackApplicationFactoryDecorator.init(RackApplicationFactoryDecorator.java:98) ~[jruby-rack-1.1.13.2.jar:na]
      at org.jruby.rack.RackServletContextListener.contextInitialized(RackServletContextListener.java:50) ~[jruby-rack-1.1.13.2.jar:na]
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4720) [tomcat-embed-core-8.0.18.jar:8.0.18]
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5154) [tomcat-embed-core-8.0.18.jar:8.0.18]
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.0.18.jar:8.0.18]
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409) [tomcat-embed-core-8.0.18.jar:8.0.18]
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399) [tomcat-embed-core-8.0.18.jar:8.0.18]
      at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_60]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_60]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_60]
      at java.lang.Thread.run(Thread.java:745) [na:1.8.0_60]
  Caused by: org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `controllers' for nil:NilClass
      at RUBY.add_java_ws_routes(D:/Apps/sonarqube-5.1.2/web/WEB-INF/config/../lib/java_ws_routing.rb:34) ~[na:na]
      at RUBY.load_java_web_services(D:/Apps/sonarqube-5.1.2/web/WEB-INF/config/../lib/database_version.rb:68) ~[na:na]
      at RUBY.automatic_setup(D:/Apps/sonarqube-5.1.2/web/WEB-INF/config/../lib/database_version.rb:75) ~[na:na]
      at RUBY.(root)(D:/Apps/sonarqube-5.1.2/web/WEB-INF/config/environment.rb:272) ~[na:na]
      at org.jruby.RubyKernel.load(org/jruby/RubyKernel.java:1094) ~[jruby-complete-1.7.9.jar:na]
      at RUBY.(root)(file:/D:/Apps/sonarqube-5.1.2/lib/server/jruby-rack-1.1.13.2.jar!/jruby/rack/rails/environment2.rb:1) ~[na:na]
      at RUBY.load_environment(file:/D:/Apps/sonarqube-5.1.2/lib/server/jruby-rack-1.1.13.2.jar!/jruby/rack/rails/environment2.rb:25) ~[na:na]
      at RUBY.load_environment(file:/D:/Apps/sonarqube-5.1.2/lib/server/jruby-rack-1.1.13.2.jar!/jruby/rack/rails_booter.rb:79) ~[na:na]
  2015.10.16 11:31:33 ERROR web[o.a.c.c.StandardContext] Error listenerStart
  2015.10.16 11:31:33 ERROR web[o.a.c.c.StandardContext] Context [] startup failed due to previous errors
  2015.10.16 11:31:33 WARN  web[o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [JRubyJIT-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
   java.lang.Class.getDeclaredConstructors0(Native Method)
   java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
   java.lang.Class.getConstructor0(Class.java:3075)
   java.lang.Class.newInstance(Class.java:412)
   org.jruby.compiler.JITCompiler$JITTask.run(JITCompiler.java:269)
   java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
   java.util.concurrent.FutureTask.run(FutureTask.java:266)
   java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   java.lang.Thread.run(Thread.java:745)
  2015.10.16 11:31:33 WARN  web[o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [JRubyJIT-2] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
   java.lang.Class.getSuperclass(Native Method)
   sun.reflect.Reflection.isSubclassOf(Reflection.java:247)
   sun.reflect.ReflectionFactory.newConstructorAccessor(ReflectionFactory.java:180)
   java.lang.reflect.Constructor.acquireConstructorAccessor(Constructor.java:459)
   java.lang.reflect.Constructor.newInstance(Constructor.java:419)
   java.lang.Class.newInstance(Class.java:442)
   org.jruby.compiler.JITCompiler$JITTask.run(JITCompiler.java:269)
   java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
   java.util.concurrent.FutureTask.run(FutureTask.java:266)
   java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   java.lang.Thread.run(Thread.java:745)
  2015.10.16 11:31:33 INFO  web[o.a.c.l.WebappClassLoaderBase] Illegal access: this web application instance has been stopped already. Could not load [rubyjit.Module$$try_activate_8886A4129B2E74CFCEDF43C772E46C9A0410DFBB1742354412]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
  java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [rubyjit.Module$$try_activate_8886A4129B2E74CFCEDF43C772E46C9A0410DFBB1742354412]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
      at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1327) [tomcat-embed-core-8.0.18.jar:8.0.18]
      at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1313) [tomcat-embed-core-8.0.18.jar:8.0.18]
      at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1196) [tomcat-embed-core-8.0.18.jar:8.0.18]
      at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1157) [tomcat-embed-core-8.0.18.jar:8.0.18]
      at org.jruby.util.ClassCache.defineClass(ClassCache.java:119) [jruby-complete-1.7.9.jar:na]
      at org.jruby.util.ClassCache.cacheClassByKey(ClassCache.java:98) [jruby-complete-1.7.9.jar:na]
      at org.jruby.compiler.JITCompiler$JITTask.run(JITCompiler.java:257) [jruby-complete-1.7.9.jar:na]
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_60]
      at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_60]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_60]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_60]
      at java.lang.Thread.run(Thread.java:745) [na:1.8.0_60]
  2015.10.16 11:31:33 INFO  web[o.a.c.l.WebappClassLoaderBase] Illegal access: this web application instance has been stopped already. Could not load [rubyjit.Gem::Specification$$find_inactive_by_path_55080282EF8BA5B9D2574831061CD4B20CD990F21742354412]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
  java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [rubyjit.Gem::Specification$$find_inactive_by_path_55080282EF8BA5B9D2574831061CD4B20CD990F21742354412]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
      at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1327) [tomcat-embed-core-8.0.18.jar:8.0.18]
      at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1313) [tomcat-embed-core-8.0.18.jar:8.0.18]
      at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1196) [tomcat-embed-core-8.0.18.jar:8.0.18]
      at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1157) [tomcat-embed-core-8.0.18.jar:8.0.18]
      at org.jruby.util.ClassCache.defineClass(ClassCache.java:119) [jruby-complete-1.7.9.jar:na]
      at org.jruby.util.ClassCache.cacheClassByKey(ClassCache.java:98) [jruby-complete-1.7.9.jar:na]
      at org.jruby.compiler.JITCompiler$JITTask.run(JITCompiler.java:257) [jruby-complete-1.7.9.jar:na]
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_60]
      at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_60]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_60]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_60]
      at java.lang.Thread.run(Thread.java:745) [na:1.8.0_60]
  .......continues....
  2015.10.16 11:31:34 INFO  web[o.a.c.h.Http11NioProtocol] Stopping ProtocolHandler ["http-nio-0.0.0.0-9000"]
  2015.10.16 11:31:35 INFO  web[o.a.c.h.Http11NioProtocol] Destroying ProtocolHandler ["http-nio-0.0.0.0-9000"]
  2015.10.16 11:31:35 INFO  web[o.s.s.a.TomcatAccessLog] Web server is stopped
  Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=160m; support was removed in 8.0
  2015.10.16 11:31:35 INFO  app[o.s.p.m.TerminatorThread] Process[search] is stopping
  2015.10.16 11:31:35 INFO   es[o.s.p.StopWatcher]  Stopping process
  2015.10.16 11:31:35 INFO   es[o.elasticsearch.node]  [sonar-1444991433854] stopping ...
  2015.10.16 11:31:35 INFO   es[o.elasticsearch.node]  [sonar-1444991433854] stopped
  2015.10.16 11:31:35 INFO   es[o.elasticsearch.node]  [sonar-1444991433854] closing ...
  2015.10.16 11:31:35 INFO   es[o.elasticsearch.node]  [sonar-1444991433854] closed
  2015.10.16 11:31:35 INFO  app[o.s.p.m.TerminatorThread] Process[search] is stopped
  Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
  &lt;-- Wrapper Stopped
  </code></pre>
  
  <p>The full stack is <a href="https://gist.github.com/anonymous/c782bb36e4fb16b8a719" rel="nofollow">here</a></p>
  
  <p>Any help is appreciated,</p>
  
  <p>Thanks,</p>