2014-03-25 157 views
0

我有一個新的X64 Win7的安裝。我想用mysql安裝sonaqube。我安裝mysql 5.5.32版本和Sonarqube 4.1.2版本。 我創建了一個名爲sonar與MySQL安裝聲納:版本錯誤

這裏是我的配置文件中新的模式:

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' 

回答

0

我通過將Windows的格式設置和區域設置更改爲英語和英國來解決此錯誤。

我知道錯誤和解決方案似乎沒有關聯,但這個解決我的問題。