SonarQube 4.5.1无法启动 - 无法找到类org.sonar.application.StartServer

时间:2014-11-12 12:47:33

标签: java wrapper classnotfoundexception sonarqube

我在运行新的SonarQube时遇到了麻烦。日志如下:

OpenSCManager failed - Access is denied. (0x5)
OpenSCManager failed - Access is denied. (0x5)
--> Wrapper Started as Console
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
 Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.

WrapperSimpleApp: Unable to locate the class org.sonar.application.StartServer: java.lang.ClassNotFoundException: org.sonar.application.StartServer

WrapperSimpleApp Usage:
java org.tanukisoftware.wrapper.WrapperSimpleApp {app_class} [app_arguments]

Where:
 app_class:      The fully qualified class name of the application to run.
 app_arguments:  The arguments that would normally be passed to the
              application.
 <-- Wrapper Stopped

wrapper.conf:

wrapper.java.command=java wrapper.java.additional.1=-Djava.awt.headless=true wrapper.java.additional.2=-XX:MaxPermSize=160m wrapper.java.additional.3=-XX:+HeapDumpOnOutOfMemoryError wrapper.java.additional.4=-Dfile.encoding=UTF-8 wrapper.java.additional.5=-Djruby.management.enabled=false wrapper.java.additional.6=-Xmx1024M wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp wrapper.java.classpath.1=../../lib/jsw/.jar wrapper.java.classpath.2=../../lib/.jar wrapper.java.classpath.3=../../extensions/jdbc-driver/mysql/.jar wrapper.java.classpath.4=../../extensions/jdbc-driver/oracle/.jar wrapper.java.classpath.5=../../extensions/jdbc-driver/postgresql/.jar wrapper.java.classpath.6=../../extensions/jdbc-driver/mssql/.jar wrapper.java.classpath.7=../../conf wrapper.java.library.path.1=./lib wrapper.app.parameter.1=org.sonar.application.App wrapper.java.initmemory=256 wrapper.java.maxmemory=32 wrapper.app.parameter.1=org.sonar.application.StartServer wrapper.console.format=PM wrapper.console.loglevel=INFO wrapper.logfile=../../logs/sonar.log wrapper.logfile.format=M wrapper.logfile.loglevel=INFO wrapper.syslog.loglevel=NONE wrapper.console.title=SonarQube wrapper.single_invocation=true wrapper.ntservice.name=SonarQube wrapper.ntservice.displayname=SonarQube wrapper.ntservice.description=SonarQube wrapper.ntservice.dependency.1= wrapper.ntservice.starttype=AUTO_START wrapper.ntservice.interactive=false wrapper.disable_restarts=TRUE wrapper.ping.timeout=240 wrapper.shutdown.timeout=3000

sonar.properties:

sonar.jdbc.username=* sonar.jdbc.password=* sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true sonar.jdbc.maxActive=20 sonar.jdbc.maxIdle=5 sonar.jdbc.minIdle=2 sonar.jdbc.maxWait=5000 sonar.jdbc.minEvictableIdleTimeMillis=600000 sonar.jdbc.timeBetweenEvictionRunsMillis=30000 sonar.web.host=0.0.0.0 sonar.web.context= sonar.web.port=9000 sonar.notifications.delay=60

java -version:

C:>java -version java version "1.7.0_51" Java(TM) SE Runtime Environment (build 1.7.0_51-b13) Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

我做错了什么?

3 个答案:

答案 0 :(得分:0)

您的配置肯定会被破坏。如果您阅读"Release 4.5 Upgrade Notes"或最新"Installing" documentation page,您会注意到wrapper.conf文件中不应该进行任何配置 - 除了Java可执行文件的位置(如果需要)。

因此,我建议您按照安装文档从头开始重新安装。

答案 1 :(得分:0)

在某种程度上,Fabrice是对的,而不是尝试更新旧的Sonar,而是从头开始安装它并将其连接到现有数据库。然而,wrapper.config不是问题的根源,因为它现在是相同的并且运行得很好。 无论如何,全新安装帮我摆脱了这个问题。

答案 2 :(得分:0)

将jdk版本从1.7更新为1.8