开发者社区> 问答> 正文

sonar 启动报错?报错

自己部署了一个sonar环境,数据库用的是oracle11g,jdk是jdk1.7.0_71版本。

sonar.properties的配置修改如下:

sonar.jdbc.username=sonar
sonar.jdbc.password=sonar
sonar.jdbc.url=jdbc:oracle:thin:@10.10.10.126:1521:ora11g

sonar.web.javaOpts=-Xmx768m -XX:MaxPermSize=160m -XX:+HeapDumpOnOutOfMemoryError -server

sonar.web.context=/sonar

wrapper.conf的修改如下:

wrapper.java.command=/opt/aspire/product/sonar/jdk1.7.0_71/bin/java

oracle11g上已经创建了相应的表空间并分配了 connect,resource,dba create session,create table,unlimited tablespace 权限。

但启动sonar后报错如下:

org.jruby.rack.RackInitializationException: ActiveRecord::JDBCError: ORA-00942: ???????
: SELECT version FROM schema_migrations
	from /opt/aspire/product/sonar/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract_adapter.rb:227:in `log'
	from /opt/aspire/product/sonar/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/jdbc/adapter.rb:183:in `execute'
	from /opt/aspire/product/sonar/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/oracle/adapter.rb:422:in `select'
	from /opt/aspire/product/sonar/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/jdbc/adapter.rb:217:in `select_rows'
	from /opt/aspire/product/sonar/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/database_statements.rb:27:in `select_values'
	from /opt/aspire/product/sonar/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:421:in `get_all_versions'
	from /opt/aspire/product/sonar/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:537:in `migrated'
	from /opt/aspire/product/sonar/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:446:in `current_version'
	from /opt/aspire/product/sonar/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:463:in `migrate'
	from org/jruby/RubyEnumerable.java:573:in `detect'
	from /opt/aspire/product/sonar/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:463:in `migrate'
	from /opt/aspire/product/sonar/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:401:in `up'
	from /opt/aspire/product/sonar/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:383:in `migrate'
	from /opt/aspire/product/sonar/sonarqube-4.5.1/web/WEB-INF/lib/database_version.rb:62:in `upgrade_and_start'
	from /opt/aspire/product/sonar/sonarqube-4.5.1/web/WEB-INF/lib/database_version.rb:73:in `automatic_setup'
	from /opt/aspire/product/sonar/sonarqube-4.5.1/web/WEB-INF/config/environment.rb:243:in `(root)'
	from org/jruby/RubyKernel.java:1094:in `load'
	from file:/opt/aspire/product/sonar/sonarqube-4.5.1/lib/server/jruby-rack-1.1.13.2.jar!/jruby/rack/rails/environment2.rb:1:in `(root)'
	from file:/opt/aspire/product/sonar/sonarqube-4.5.1/lib/server/jruby-rack-1.1.13.2.jar!/jruby/rack/rails/environment2.rb:25:in `load_environment'
	from file:/opt/aspire/product/sonar/sonarqube-4.5.1/lib/server/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:4973)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
	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(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.jruby.exceptions.RaiseException: (StatementInvalid) ActiveRecord::JDBCError: ORA-00942: ???????
: SELECT version FROM schema_migrations
	at RUBY.log(/opt/aspire/product/sonar/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract_adapter.rb:227)
	at RUBY.execute(/opt/aspire/product/sonar/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/jdbc/adapter.rb:183)
	at RUBY.select(/opt/aspire/product/sonar/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/oracle/adapter.rb:422)
	at RUBY.select_rows(/opt/aspire/product/sonar/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/jdbc/adapter.rb:217)
	at RUBY.select_values(/opt/aspire/product/sonar/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/database_statements.rb:27)
	at RUBY.get_all_versions(/opt/aspire/product/sonar/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:421)
	at RUBY.migrated(/opt/aspire/product/sonar/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:537)
	at RUBY.current_version(/opt/aspire/product/sonar/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:446)
	at RUBY.migrate(/opt/aspire/product/sonar/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:463)
	at org.jruby.RubyEnumerable.detect(org/jruby/RubyEnumerable.java:573)
	at RUBY.migrate(/opt/aspire/product/sonar/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:463)
	at RUBY.up(/opt/aspire/product/sonar/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:401)
	at RUBY.migrate(/opt/aspire/product/sonar/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:383)
	at RUBY.upgrade_and_start(/opt/aspire/product/sonar/sonarqube-4.5.1/web/WEB-INF/lib/database_version.rb:62)
	at RUBY.automatic_setup(/opt/aspire/product/sonar/sonarqube-4.5.1/web/WEB-INF/lib/database_version.rb:73)
	at RUBY.(root)(/opt/aspire/product/sonar/sonarqube-4.5.1/web/WEB-INF/config/environment.rb:243)
	at org.jruby.RubyKernel.load(org/jruby/RubyKernel.java:1094)
	at RUBY.(root)(file:/opt/aspire/product/sonar/sonarqube-4.5.1/lib/server/jruby-rack-1.1.13.2.jar!/jruby/rack/rails/environment2.rb:1)
	at RUBY.load_environment(file:/opt/aspire/product/sonar/sonarqube-4.5.1/lib/server/jruby-rack-1.1.13.2.jar!/jruby/rack/rails/environment2.rb:25)
	at RUBY.load_environment(file:/opt/aspire/product/sonar/sonarqube-4.5.1/lib/server/jruby-rack-1.1.13.2.jar!/jruby/rack/rails_booter.rb:79)



展开
收起
爱吃鱼的程序员 2020-06-14 19:13:01 497 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    sonarqube-4.5\lib\jdbc 里面有Oracle11的JDBC包吗?oracle的驱动,是要放在。。/sonarqube-4.5.1/extensions/-driver/oracle这个目录下面驱动放上去了,ojdbc6.jar

    没人回答么?自己顶一下。

    网上看到的文章都好像没有遇到这样的错误。。。

    解决了。。。。。怎么解决的?能介绍下吗错误的原因是sonar使用的oracle数据库账号有DBA权限。

    2020-06-14 19:13:17
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载