使用mysql安装Sonar:版本错误

时间:2014-03-25 09:19:32

标签: mysql sonarqube

我有一个全新的win7 x64安装。我想用mysql安装sonaqube。我安装了mysql 5.5.32版本和Sonarqube 4.1.2版本。 我创建了一个名为sonar

的新模式

这是我的配置文件:

sonar.jdbc.username=root
sonar.jdbc.password=
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true

当我启动bin/windows-x86-64/StartSonar.bat file时,服务器启动但在浏览器中我收到以下错误。

org.jruby.rack.RackInitializationException: ActiveRecord::JDBCError: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOT NULL) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin' at line 1: CREATE TABLE `schema_migrations` (`version` varchar NOT NULL) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin
    from C:/dev/sonar/sonarqube-4.1.2/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract_adapter.rb:227:in `log'
    from C:/dev/sonar/sonarqube-4.1.2/web/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/jdbc/adapter.rb:183:in `execute'
    from C:/dev/sonar/sonarqube-4.1.2/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/schema_statements.rb:109:in `create_table'
    from C:/dev/sonar/sonarqube-4.1.2/web/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/mysql/adapter.rb:247:in `create_table'
    from C:/dev/sonar/sonarqube-4.1.2/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/schema_statements.rb:371:in `initialize_schema_migrations_table'
    from C:/dev/sonar/sonarqube-4.1.2/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:441:in `initialize'
    from C:/dev/sonar/sonarqube-4.1.2/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:401:in `up'
    from C:/dev/sonar/sonarqube-4.1.2/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:383:in `migrate'
    from C:/dev/sonar/sonarqube-4.1.2/web/WEB-INF/config/../lib/database_version.rb:62:in `upgrade_and_start'
    from C:/dev/sonar/sonarqube-4.1.2/web/WEB-INF/config/../lib/database_version.rb:74:in `automatic_setup'
    from C:/dev/sonar/sonarqube-4.1.2/web/WEB-INF/config/environment.rb:239:in `(root)'
    from org/jruby/RubyKernel.java:1096:in `load'
    from file:/C:/dev/sonar/sonarqube-4.1.2/web/WEB-INF/lib/jruby-rack-1.1.13.2.jar!/jruby/rack/rails/environment2.rb:1:in `(root)'
    from file:/C:/dev/sonar/sonarqube-4.1.2/web/WEB-INF/lib/jruby-rack-1.1.13.2.jar!/jruby/rack/rails/environment2.rb:25:in `load_environment'
    from file:/C:/dev/sonar/sonarqube-4.1.2/web/WEB-INF/lib/jruby-rack-1.1.13.2.jar!/jruby/rack/rails_booter.rb:79:in `load_environment'

1 个答案:

答案 0 :(得分:0)

我通过将Windows的格式设置和区域设置更改为英语和英语来解决此错误。

我知道错误和解决方案似乎没有关系,但这解决了我的问题。