Project

General

Profile

Problems deploying Redmine 0.8.4 on JRuby/Warbler + Oracle

Added by Richard Nichols over 15 years ago

I've managed to get Redmine deployed on Oracle 10g / JRuby / Tomcat ok, except when clicking on the "Issues" link the following error is entered to the logs:

ActiveRecord::StatementInvalid (ActiveRecord::ActiveRecordError: ORA-01722: invalid number
: SELECT count(DISTINCT issues.id) AS count_all FROM issues  LEFT OUTER JOIN issue_statuses ON issue_statuses.id = issues.status_id  LEFT OUTER JOIN projects ON projects.id = issues.project_id WHERE ((issue_statuses.is_closed='f') AND projects.id = 2 AND projects.status=1 AND EXISTS (SELECT em.id FROM enabled_modules em WHERE em.name='issue_tracking' AND em.project_id=projects.id)) ):
    /vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:147:in `log'
    /gems/gems/activerecord-jdbc-adapter-0.8.2/lib/active_record/connection_adapters/jdbc_adapter.rb:537:in `execute'
    /gems/gems/activerecord-jdbc-adapter-0.8.2/lib/jdbc_adapter/jdbc_oracle.rb:333:in `select'
    /gems/gems/activerecord-jdbc-adapter-0.8.2/lib/active_record/connection_adapters/jdbc_adapter.rb:533:in `select_one'
    /vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:19:in `select_value'
    /vendor/rails/activerecord/lib/active_record/calculations.rb:225:in `execute_simple_calculation'
    /vendor/rails/activerecord/lib/active_record/calculations.rb:126:in `calculate'
    /vendor/rails/activerecord/lib/active_record/calculations.rb:122:in `catch'
    /vendor/rails/activerecord/lib/active_record/calculations.rb:122:in `calculate'
    /vendor/rails/activerecord/lib/active_record/calculations.rb:48:in `count'
    /app/controllers/issues_controller.rb:59:in `index'
    /vendor/rails/actionpack/lib/action_controller/base.rb:1166:in `perform_action'
    /vendor/rails/actionpack/lib/action_controller/filters.rb:579:in `call_filters'
    /vendor/rails/actionpack/lib/action_controller/filters.rb:572:in `perform_action_with_filters'
    /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'
    C:/Program Files/Apache Software Foundation/Tomcat 6.0/work/Catalina/localhost/redmine_test/loader/benchmark.rb:293:in `measure'
    /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'
    /vendor/rails/actionpack/lib/action_controller/rescue.rb:201:in `perform_action_with_rescue'
    /vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb:13:in `perform_action_with_caching'
    /vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache'
    /vendor/rails/activerecord/lib/active_record/query_cache.rb:8:in `cache'
    /vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb:12:in `perform_action_with_caching'
    /vendor/rails/actionpack/lib/action_controller/base.rb:529:in `process'
    /vendor/rails/actionpack/lib/action_controller/filters.rb:568:in `process_with_filters'
    /vendor/rails/actionpack/lib/action_controller/session_management.rb:130:in `process_with_session_management_support'
    /vendor/rails/actionpack/lib/action_controller/base.rb:389:in `process'
    /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:149:in `handle_request'
    /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:107:in `dispatch'
    /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:104:in `dispatch'
    /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:120:in `dispatch_cgi'
    /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:35:in `dispatch'
    C:/Program Files/Apache Software Foundation/Tomcat 6.0/work/Catalina/localhost/redmine_test/loader/rack/adapter/rails_cgi.rb:24:in `call'
    C:/Program Files/Apache Software Foundation/Tomcat 6.0/work/Catalina/localhost/redmine_test/loader/rack/adapter/rails.rb:35:in `serve_rails'
    C:/Program Files/Apache Software Foundation/Tomcat 6.0/work/Catalina/localhost/redmine_test/loader/rack/adapter/rails.rb:40:in `call'
    C:/Program Files/Apache Software Foundation/Tomcat 6.0/work/Catalina/localhost/redmine_test/loader/jruby/rack/rails.rb:144:in `call'
    /C:/Program Files/Apache Software Foundation/Tomcat 6.0/work/Catalina/localhost/redmine_test/loader/rack/handler/servlet.rb:17:in `call'
    <script>:2

The issue is the* issue_statuses.is_closed='f'* part. is_closed is a boolean 0/1 flag and being accessed as a character. I understand that this query is being generated by Rails? Why would it be doing an = 'f' on this field?

Any help would be appreciated!

Thanks in advance.


Replies (1)

RE: Problems deploying Redmine 0.8.4 on JRuby/Warbler + Oracle - Added by Richard Nichols over 15 years ago

PS. About info:

About your application's environment
Ruby version              1.8.6 (java)
RubyGems version          1.3.3
Rails version             2.1.2
Active Record version     2.1.2
Action Pack version       2.1.2
Active Resource version   2.1.2
Action Mailer version     2.1.2
Active Support version    2.1.2
Edge Rails revision       unknown
Application root          D:/IJS-Dev-Apps/javarails/redmine_prod
Environment               development
Database adapter          jdbc
    (1-1/1)