簡體   English   中英

使用mysql安裝Sonar:版本錯誤

[英]Installing Sonar with mysql: Version error

我有一個全新的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'

我通過將Windows的“格式”設置和“語言環境”設置更改為英語和英語來解決了該錯誤。

我知道錯誤和解決方案似乎無關,但這解決了我的問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM