简体   繁体   中英

Installing Sonar with mysql: Version error

I have a fresh win7 x64 installation. I want to install sonaqube with mysql. I installed mysql 5.5.32 version and Sonarqube 4.1.2 version. I created a new schema named sonar

Here is my config file:

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

When I start bin/windows-x86-64/StartSonar.bat file , server starts but in browser I get the following error.

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'

I solved this error by changing my windows's Format setting and Locale settings to English and UK.

I know the error and solution dont seem related but this solved my problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM