sonar 启动报错

发布于 11-30 11:55 字数 7197 浏览 1060 评论 7

自己部署了一个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)



如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

落墨2021-12-01 09:52:43

错误的原因是sonar使用的oracle数据库账号有DBA权限。

奈何桥上唱咆哮2021-12-01 09:45:15

怎么解决的?能介绍下吗

小瓶盖2021-12-01 08:59:49

解决了。。。。。

高跟鞋的旋律2021-12-01 06:35:14

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

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

小情绪2021-12-01 06:32:03

驱动放上去了,ojdbc6.jar

飘然心甜2021-12-01 01:55:39

oracle的驱动,是要放在 。。/sonarqube-4.5.1/extensions/-driver/oracle 这个目录下面

凯凯我们等你回来2021-11-30 17:07:20

sonarqube-4.5libjdbc   里面有Oracle11的JDBC包吗?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文