2014-10-08 1 views
0

나는 sonarqube를 다운로드하여 구성했습니다. MySQL 5.6.21을 설치하고 localhost에서 실행했습니다. 이 예제 스크립트에 표시된 것 같이 나는 데이터베이스 '소나'와 암호 '소나'이있는 사용자 '소나'를 만들었습니다 : 나는 윈도우를 사용하고Sonarqube가 MySQL과 JDBCError를 던졌습니다.

https://github.com/SonarSource/sonar-examples/blob/master/scripts/database/mysql/create_database.sql

, 그래서에서 StartSonar.bat 시작 windows-x86-64 폴더. 아무 문제없이 시작된 것 같습니다.

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 E:/runnable/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract_adapter.rb:227:in `log' 
    from E:/runnable/sonarqube/web/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/jdbc/adapter.rb:183:in `execute' 
    from E:/runnable/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/schema_statements.rb:109:in `create_table' 
    from E:/runnable/sonarqube/web/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/mysql/adapter.rb:247:in `create_table' 
    from E:/runnable/sonarqube/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 E:/runnable/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:441:in `initialize' 
    from E:/runnable/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:401:in `up' 
    from E:/runnable/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:383:in `migrate' 
    from E:/runnable/sonarqube/web/WEB-INF/config/../lib/database_version.rb:62:in `upgrade_and_start' 
    from E:/runnable/sonarqube/web/WEB-INF/config/../lib/database_version.rb:74:in `automatic_setup' 
    from E:/runnable/sonarqube/web/WEB-INF/config/environment.rb:236:in `(root)' 
    from org/jruby/RubyKernel.java:1096:in `load' 
    from file:/E:/runnable/sonarqube/web/WEB-INF/lib/jruby-rack-1.1.13.2.jar!/jruby/rack/rails/environment2.rb:1:in `(root)' 
    from file:/E:/runnable/sonarqube/web/WEB-INF/lib/jruby-rack-1.1.13.2.jar!/jruby/rack/rails/environment2.rb:25:in `load_environment' 
    from file:/E:/runnable/sonarqube/web/WEB-INF/lib/jruby-rack-1.1.13.2.jar!/jruby/rack/rails_booter.rb:79:in `load_environment' 

    at org.jruby.rack.RackInitializationException.wrap(RackInitializationException.java:29) 
    at org.jruby.rack.RackApplicationFactoryDecorator.init(RackApplicationFactoryDecorator.java:98) 
    at org.jruby.rack.RackServletContextListener.contextInitialized(RackServletContextListener.java:50) 
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939) 
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434) 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) 
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) 
    at java.util.concurrent.FutureTask.run(Unknown Source) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 
    at java.lang.Thread.run(Unknown Source) 
Caused by: org.jruby.exceptions.RaiseException: (StatementInvalid) 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 
    at RUBY.log(E:/runnable/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract_adapter.rb:227) 
    at RUBY.execute(E:/runnable/sonarqube/web/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/jdbc/adapter.rb:183) 
    at RUBY.create_table(E:/runnable/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/schema_statements.rb:109) 
    at RUBY.create_table(E:/runnable/sonarqube/web/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/mysql/adapter.rb:247) 
    at RUBY.initialize_schema_migrations_table(E:/runnable/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/schema_statements.rb:371) 
    at RUBY.initialize(E:/runnable/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:441) 
    at RUBY.up(E:/runnable/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:401) 
    at RUBY.migrate(E:/runnable/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:383) 
    at RUBY.upgrade_and_start(E:/runnable/sonarqube/web/WEB-INF/config/../lib/database_version.rb:62) 
    at RUBY.automatic_setup(E:/runnable/sonarqube/web/WEB-INF/config/../lib/database_version.rb:74) 
    at RUBY.(root)(E:/runnable/sonarqube/web/WEB-INF/config/environment.rb:236) 
    at org.jruby.RubyKernel.load(org/jruby/RubyKernel.java:1096) 
    at RUBY.(root)(file:/E:/runnable/sonarqube/web/WEB-INF/lib/jruby-rack-1.1.13.2.jar!/jruby/rack/rails/environment2.rb:1) 
    at RUBY.load_environment(file:/E:/runnable/sonarqube/web/WEB-INF/lib/jruby-rack-1.1.13.2.jar!/jruby/rack/rails/environment2.rb:25) 
    at RUBY.load_environment(file:/E:/runnable/sonarqube/web/WEB-INF/lib/jruby-rack-1.1.13.2.jar!/jruby/rack/rails_booter.rb:79) 

내가 Sonarqube 4.5 및 4.0 시도 : 내 브라우저에서 http://localhost:9000을 열 때, 그것은 나에게이 JDBCError을 제공합니다. 둘 다 저에게 동일한 오류를주었습니다. 이 오류에 대해 아십니까? 내가 봤어 그리고 그것에 대해 아무것도 찾을 수 없습니다.

답변

1

데이터베이스 연결없이 서버를 시작하기 만하면됩니다. 데이터베이스 연결 문자열을 구성하는 데 문제가 있거나 데이터베이스 자체에서 문제가 발생하는 경우보다 정상적으로 시작됩니다. 이 작업이 완료되면 여기에서 결과를 공유 할 수 있습니다. 언젠가 다시 나는 mysql workbench로 음파 탐지기를 구성하려고 시도했는데 정상적으로 작동했다. 나는 너와 그 것들을 나눌 수있다.

관련 문제