postgresql - sonar V.4.3.1 不启动postgresql

标签 postgresql sonarqube

步骤 - 安装服务器 - 更改 JDBC URL 以指向新创建的 poststreSQL 数据库(默认模式/使用 Sonar 用户)。那里默认的 H2 JDBC URL 是禁用的,只激活 postgreSQL JDBC URL - 数据库用户名和密码仍然是默认的( Sonar/Sonar ) - 启动服务器时,我看到表已成功创建,但服务器未成功启动。以下显示在日志中。

----------------部分日志开始------------

2014.06.19 16:18:00 ERROR [jruby.rack]  initialization failed
org.jruby.rack.RackInitializationException: org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: org.postgresql.util.PSQLException: ERROR: stack depth limit exceeded
  Hint: Increase the configuration parameter "max_stack_depth" (currently 2048kB), after ensuring the platform's stack depth limit is adequate.
### The error may exist in org.sonar.core.rule.RuleMapper
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: SELECT       rrt.id, rrt.rule_id as "ruleId", rrt.rule_tag_id as "tagId", rrt.tag_type as "type", rt.tag         FROM rules_rule_tags rrt     JOIN rule_tags rt ON rrt.rule_tag_id = rt.id      WHERE  ((rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=? or rrt.rule_id=?

------------ 结束------------

sql select 语句继续执行,直到出现以下内容:

------------ 开始------------

### Cause: org.postgresql.util.PSQLException: ERROR: stack depth limit exceeded
  Hint: Increase the configuration parameter "max_stack_depth" (currently 2048kB), after ensuring the platform's stack depth limit is adequate.
    at org.jruby.rack.RackInitializationException.wrap(RackInitializationException.java:31) ~[jruby-rack-1.1.13.2.jar:na]
    at org.jruby.rack.RackApplicationFactoryDecorator.init(RackApplicationFactoryDecorator.java:98) ~[jruby-rack-1.1.13.2.jar:na]
    at org.jruby.rack.RackServletContextListener.contextInitialized(RackServletContextListener.java:50) ~[jruby-rack-1.1.13.2.jar:na]
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939) [tomcat-embed-core-7.0.42.jar:7.0.42]
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434) [tomcat-embed-core-7.0.42.jar:7.0.42]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-7.0.42.jar:7.0.42]
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) [tomcat-embed-core-7.0.42.jar:7.0.42]
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) [tomcat-embed-core-7.0.42.jar:7.0.42]
    at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_51]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_51]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_51]
    at java.lang.Thread.run(Thread.java:744) [na:1.7.0_51]

最佳答案

我猜这是 PostgreSQL 中的解析错误,而不是执行错误。由于这是 SQL,因此使用基于堆栈的解析器是正常的。这自然会使用像

这样的解析器生产
conditions ::== boolean_term
conditions ::== boolean_term boolean_op conditions 

其中每个额外的 boolean_term 都可能导致堆栈推送/递归。有一百多个 'a = ?'条款,可能更多,解析堆栈可能会变得非常大。

@HaythamMohamed,任何可能重复 2000 次或更多次的

或 rrt.rule_id = ?

在这个查询中?

如果是这样,您需要更改 Sonar、JRuby.rack 或 apache abatis 使用的 SQL 生成。

关于postgresql - sonar V.4.3.1 不启动postgresql,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24335563/

相关文章:

ruby-on-rails - rails 3/postgres - 如果不应用 :limit in schema 字符串有多长

postgresql - 在 PL/pgSQL 中插入后获取默认序列值

database - 使用外键进行适当的数据库设计

python - 从 setup.py 运行 Sonar 扫描仪

gradle - sonarqube gradle 插件,不包括 jacoco 集成测试

sonarqube - 无法将结果发布到 Sonarqube 服务器

sql - 如何将具有树结构的表聚合到单个嵌套 JSON 对象?

java - Wicket - 用户数据国际化

sonarqube - Sonar 安装问题

mysql - 如何访问安装在 Centos Linux 中的 SonarQube 服务器?