繁体   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