Project

General

Profile

Actions

Defect #2246

closed

Problem on acessing Subversion repository using JRuby

Added by Rodrigo Mesquita over 15 years ago. Updated about 15 years ago.

Status:
Closed
Priority:
High
Category:
SCM
Target version:
Start date:
2008-11-29
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Hi folks!

My enviroment is:

Redmine 0.7.3 [with a few mods on 001_setup.rb and 091 migrate files]
JRuby 1.1.4 (with Ruby 1.8.6 patchlevel 114)
Rails 2.2.2
Oracle Database XE
ocj14.jar  (JDBC connector)
Subversion 1.5.4

All steps on configuring and installing were made sucessfuly!

I can run Redmine with Oracle with no problems at all.

My problem resides on configuring a Subversion repositorie to be viewed on Redmine.
When a list the repositorie on tab appropriate, i get the following message:

The entry or revision was not found in the repository. 

The log shows this problem:

Processing RepositoriesController#show (for 127.0.0.1 at 2008-11-29 08:31:38) [G
ET]
  Session ID: 4d494983c2d1550844902d331ac6585d
  Parameters: {"controller"=>"repositories", "action"=>"show", "id"=>"sim2"}
  ←[4;35;1mSQL (0.001251)←[0m   ←[0mSELECT max(updated_on) AS max_updated_on FRO
M settings ←[0m
  ←[4;36;1mUser Load (0.001734)←[0m   ←[0;1mSELECT * FROM users WHERE (status =
1) AND (users.id = 10000) ←[0m
  ←[4;35;1mProject Load (0.002914)←[0m   ←[0mselect * from (select raw_sql_.*, r
ownum raw_rnum_ from (SELECT * FROM projects WHERE (projects.identifier = 'sim2'
) ) raw_sql_ where rownum <= 1) where raw_rnum_ > 0←[0m
  ←[4;36;1mRepository Load (0.001888)←[0m   ←[0;1mselect * from (select raw_sql_
.*, rownum raw_rnum_ from (SELECT * FROM repositories WHERE (repositories.projec
t_id = 10000) ) raw_sql_ where rownum <= 1) where raw_rnum_ > 0←[0m
  ←[4;35;1mEnabledModule Load (0.001719)←[0m   ←[0mSELECT * FROM enabled_modules
 WHERE (enabled_modules.project_id = 10000) ←[0m
  ←[4;36;1mSetting Load (0.001567)←[0m   ←[0;1mselect * from (select raw_sql_.*,
 rownum raw_rnum_ from (SELECT * FROM settings WHERE (settings.name = 'autofetch
_changesets') ) raw_sql_ where rownum <= 1) where raw_rnum_ > 0←[0m
Shelling out: svn info --xml 'svn://localhost/sedes/'
  ←[4;35;1mRepository::Subversion Update (0.005132)←[0m   ←[0mUPDATE repositorie
s SET login = null, password = null, project_id = 10000, root_url = null, type =
 'Subversion', url = 'svn://localhost/sedes' WHERE id = 10006←[0m
Shelling out: svn info --xml 'svn://localhost/sedes/'

-------------->

Processing RepositoriesController#show (for 127.0.0.1 at 2008-11-29 12:17:23) [G
ET]
  Session ID: db88113e3bb54dbb3a80b88a4405eaa5
  Parameters: {"controller"=>"repositories", "action"=>"show", "id"=>"sss1"}
Error parsing svn output: #<REXML::ParseException: No close tag for /lists/list>

C:/Java/jruby/lib/ruby/1.8/rexml/parsers/treeparser.rb:27:in `parse'
C:/Java/jruby/lib/ruby/1.8/rexml/document.rb:204:in `build'
C:/Java/jruby/lib/ruby/1.8/rexml/document.rb:42:in `initialize'
C:/Java/jruby/apps/redmine/lib/redmine/scm/adapters/subversion_adapter.rb:65:in
`entries'
C:/Java/jruby/apps/redmine/lib/redmine/scm/adapters/abstract_adapter.rb:127:in `
call'
C:/Java/jruby/apps/redmine/lib/redmine/scm/adapters/abstract_adapter.rb:127:in `
shellout'
<script>:1:in `shellout'
C:/Java/jruby/apps/redmine/lib/redmine/scm/adapters/subversion_adapter.rb:62:in
`entries'
C:/Java/jruby/apps/redmine/app/models/repository.rb:52:in `entries'
C:/Java/jruby/apps/redmine/vendor/rails/activerecord/lib/active_record/associati
ons/association_proxy.rb:125:in `method_missing'
C:/Java/jruby/apps/redmine/app/controllers/repositories_controller.rb:55:in `sho
w'
C:/Java/jruby/apps/redmine/vendor/rails/actionpack/lib/action_controller/base.rb
:1158:in `perform_action'
C:/Java/jruby/apps/redmine/vendor/rails/actionpack/lib/action_controller/filters
.rb:697:in `call_filters'
C:/Java/jruby/apps/redmine/vendor/rails/actionpack/lib/action_controller/filters
.rb:689:in `perform_action_with_filters'
C:/Java/jruby/apps/redmine/vendor/rails/actionpack/lib/action_controller/benchma
rking.rb:68:in `perform_action_with_benchmark'
C:/Java/jruby/lib/ruby/1.8/benchmark.rb:293:in `measure'
C:/Java/jruby/apps/redmine/vendor/rails/actionpack/lib/action_controller/benchma
rking.rb:68:in `perform_action_with_benchmark'
C:/Java/jruby/apps/redmine/vendor/rails/actionpack/lib/action_controller/rescue.
rb:199:in `perform_action_with_rescue'
C:/Java/jruby/apps/redmine/vendor/rails/actionpack/lib/action_controller/caching
.rb:678:in `perform_action_with_caching'
C:/Java/jruby/apps/redmine/vendor/rails/activerecord/lib/active_record/connectio
n_adapters/abstract/query_cache.rb:33:in `cache'
C:/Java/jruby/apps/redmine/vendor/rails/activerecord/lib/active_record/query_cac
he.rb:8:in `cache'
C:/Java/jruby/apps/redmine/vendor/rails/actionpack/lib/action_controller/caching
.rb:677:in `perform_action_with_caching'
C:/Java/jruby/apps/redmine/vendor/rails/actionpack/lib/action_controller/base.rb
:524:in `process'
C:/Java/jruby/apps/redmine/vendor/rails/actionpack/lib/action_controller/filters
.rb:685:in `process_with_filters'
C:/Java/jruby/apps/redmine/vendor/rails/actionpack/lib/action_controller/session
_management.rb:123:in `process_with_session_management_support'
C:/Java/jruby/apps/redmine/vendor/rails/actionpack/lib/action_controller/base.rb
:388:in `process'
C:/Java/jruby/apps/redmine/vendor/rails/actionpack/lib/action_controller/dispatc
her.rb:171:in `handle_request'
C:/Java/jruby/apps/redmine/vendor/rails/actionpack/lib/action_controller/dispatc
her.rb:115:in `dispatch'
C:/Java/jruby/apps/redmine/vendor/rails/actionpack/lib/action_controller/dispatc
her.rb:126:in `dispatch_cgi'
C:/Java/jruby/apps/redmine/vendor/rails/actionpack/lib/action_controller/dispatc
her.rb:9:in `dispatch'
C:/Java/jruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-java/bin/../lib/mongrel/rails
.rb:76:in `process'
C:/Java/jruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-java/bin/../lib/mongrel/rails
.rb:74:in `process'
C:/Java/jruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-java/lib/mongrel.rb:159:in `p
rocess_client'
C:/Java/jruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-java/lib/mongrel.rb:158:in `e
ach'
C:/Java/jruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-java/lib/mongrel.rb:158:in `p
rocess_client'
C:/Java/jruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-java/lib/mongrel.rb:285:in `r
un'
:1:in `initialize'
...
No close tag for /lists/list
Line:
Position:
Last 80 unconsumed characters:
Output was:
 <?xml version="1.0"?>
<lists>
<list
   path="&apos;svn://localhost/sedes/&apos;">
Rendering template within layouts/base
Completed in 0.68464 (1 reqs/sec) | Rendering: 0.10284 (15%) | DB: 0.00000 (0%)
| 500 Internal Server Error [http://localhost/repositories/show/sss1]

At a first view, can be inferred that the problem is on URL format, that added a apos simbol before and after the text.
This occurs because of Oracle, that considers strings in such format: 'nonono'

My question is: Is there some way to avoid this problem?

I really need to use Oracle DB and also need Subversion version control System to be used.

Thanks for help!

Actions #1

Updated by Jean-Philippe Lang over 15 years ago

  • Status changed from New to Resolved

Actually, your problem doesn't seem to be related to the fact you're using oracle (which is not supported by the way).
The problem must be that your OS (win32 vs. *nix) is not recognized properly because you're running JRuby. Under win32, the url should be double-quoted (not single-quoted) in the svn command.

Your problem is fixed in trunk (see r1753) but not in 0.7.3.

So you have 3 options:
  • upgrade to latest trunk
  • wait for 0.8 that should be released in decembre
  • patch lib/redmine/scm/adapters/abstract_adapter.rb so that the shell_quote method uses double-quotes instead of single-quotes.
Actions #2

Updated by Rodrigo Mesquita over 15 years ago

Thank you, Jean Phillipe!!

Problem Solved with option 3.

I will soon use Redmine 0.8 in our production enviroment.

Rodrigo

Actions #3

Updated by Jean-Philippe Lang over 15 years ago

  • Subject changed from Problem on acessing Subversion repository on Redmine to Problem on acessing Subversion repository using JRuby
  • Category changed from Database to SCM
  • Status changed from Resolved to Closed
  • Target version set to 0.8
  • Resolution set to Fixed

Thanks for the feedback.

Actions #4

Updated by Alexi Vereschaga about 15 years ago

  • Status changed from Closed to Reopened
  • Assignee set to Jean-Philippe Lang

Folks I seem to have a similar issue, here is how I am set up:

svn --version
svn, version 1.4.4 (r25188)
   compiled Sep 28 2007, 10:50:44

Copyright (C) 2000-2006 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).
svn info
Path: .
URL: http://redmine.rubyforge.org/svn/tags/0.8.3
Repository Root: http://redmine.rubyforge.org/svn
Repository UUID: e93f8b46-1217-0410-a6f0-8f06a7374b81
Revision: 2671
Node Kind: directory
Schedule: normal
Last Changed Author: jplang
Last Changed Rev: 2658
Last Changed Date: 2009-04-05 08:59:46 -0400 (Sun, 05 Apr 2009)

Repository integration used to work but for some reason it stopped working and I can't figure out what is the reason, here is my log:

Processing RepositoriesController#show (for 192.168.3.1 at 2009-04-18 18:13:44) [GET]
  Session ID: 665c37a310a5ee5ce29e3f9f1e2bae28
  Parameters: {"action"=>"show", "id"=>"mel", "controller"=>"repositories"}
Error parsing svn output: #<REXML::ParseException: No close tag for /lists/list>
/usr/lib/ruby/1.8/rexml/parsers/treeparser.rb:27:in `parse'
/usr/lib/ruby/1.8/rexml/document.rb:212:in `build'
/usr/lib/ruby/1.8/rexml/document.rb:46:in `initialize'
/www/redmine/src/lib/redmine/scm/adapters/subversion_adapter.rb:85:in `new'
/www/redmine/src/lib/redmine/scm/adapters/subversion_adapter.rb:85:in `entries'
/www/redmine/src/lib/redmine/scm/adapters/abstract_adapter.rb:177:in `call'
/www/redmine/src/lib/redmine/scm/adapters/abstract_adapter.rb:177:in `shellout'
/www/redmine/src/lib/redmine/scm/adapters/abstract_adapter.rb:175:in `popen'
/www/redmine/src/lib/redmine/scm/adapters/abstract_adapter.rb:175:in `shellout'
/www/redmine/src/lib/redmine/scm/adapters/abstract_adapter.rb:165:in `shellout'
/www/redmine/src/lib/redmine/scm/adapters/subversion_adapter.rb:82:in `entries'
/www/redmine/src/app/models/repository.rb:63:in `entries'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/associations/association_proxy.rb:173:in `send'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/associations/association_proxy.rb:173:in `method_missing'
/www/redmine/src/app/controllers/repositories_controller.rb:71:in `show'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/base.rb:1166:in `send'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/base.rb:1166:in `perform_action_without_filters'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/filters.rb:579:in `call_filters'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/filters.rb:572:in `perform_action_without_benchmark'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/rescue.rb:201:in `perform_action_without_caching'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/caching/sql_cache.rb:13:in `perform_action'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/query_cache.rb:8:in `cache'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/caching/sql_cache.rb:12:in `perform_action'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/base.rb:529:in `send'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/base.rb:529:in `process_without_filters'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/filters.rb:568:in `process_without_session_management_support'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/session_management.rb:130:in `process'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/base.rb:389:in `process'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/dispatcher.rb:149:in `handle_request'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/dispatcher.rb:107:in `dispatch'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/dispatcher.rb:104:in `synchronize'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/dispatcher.rb:104:in `dispatch'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/dispatcher.rb:120:in `dispatch_cgi'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/dispatcher.rb:35:in `dispatch'
/var/lib/gems/1.8/gems/mongrel-1.1.1/bin/../lib/mongrel/rails.rb:76:in `process'
/var/lib/gems/1.8/gems/mongrel-1.1.1/bin/../lib/mongrel/rails.rb:74:in `synchronize'
/var/lib/gems/1.8/gems/mongrel-1.1.1/bin/../lib/mongrel/rails.rb:74:in `process'
/var/lib/gems/1.8/gems/mongrel-1.1.1/bin/../lib/mongrel.rb:155:in `process_client'
/var/lib/gems/1.8/gems/mongrel-1.1.1/bin/../lib/mongrel.rb:154:in `each'
/var/lib/gems/1.8/gems/mongrel-1.1.1/bin/../lib/mongrel.rb:154:in `process_client'
/var/lib/gems/1.8/gems/mongrel-1.1.1/bin/../lib/mongrel.rb:281:in `run'
/var/lib/gems/1.8/gems/mongrel-1.1.1/bin/../lib/mongrel.rb:281:in `initialize'
/var/lib/gems/1.8/gems/mongrel-1.1.1/bin/../lib/mongrel.rb:281:in `new'
/var/lib/gems/1.8/gems/mongrel-1.1.1/bin/../lib/mongrel.rb:281:in `run'
/var/lib/gems/1.8/gems/mongrel-1.1.1/bin/../lib/mongrel.rb:264:in `initialize'
/var/lib/gems/1.8/gems/mongrel-1.1.1/bin/../lib/mongrel.rb:264:in `new'
/var/lib/gems/1.8/gems/mongrel-1.1.1/bin/../lib/mongrel.rb:264:in `run'
/var/lib/gems/1.8/gems/mongrel-1.1.1/bin/../lib/mongrel/configurator.rb:282:in `run'
/var/lib/gems/1.8/gems/mongrel-1.1.1/bin/../lib/mongrel/configurator.rb:281:in `each'
/var/lib/gems/1.8/gems/mongrel-1.1.1/bin/../lib/mongrel/configurator.rb:281:in `run'
/var/lib/gems/1.8/gems/mongrel-1.1.1/bin/mongrel_rails:128:in `run'
/var/lib/gems/1.8/gems/mongrel-1.1.1/bin/../lib/mongrel/command.rb:212:in `run'
/var/lib/gems/1.8/gems/mongrel-1.1.1/bin/mongrel_rails:281
/var/lib/gems/1.8/bin/mongrel_rails:16:in `load'
/var/lib/gems/1.8/bin/mongrel_rails:16
...
No close tag for /lists/list
Line: 
Position: 
Last 80 unconsumed characters:
Output was:
 <?xml version="1.0"?>
<lists>
<list
   path="https://svn.itlogy.com/svn/muebleseurolife/trunk">
Rendering template within layouts/base

On old projects that did work I am getting only the old revisions, on the new ones I am getting:

The entry or revision was not found in the repository.

If I need to patch that file lib/redmine/scm/adapters/abstract_adapter.rb then is there a patch or do I just do it manually?

Thanks,
-Alexi

Actions #5

Updated by Alexi Vereschaga about 15 years ago

I tried "patching it myself as follows:

def shell_quote(str)
#Commented out by alexi to fix repository integration
#          if Redmine::Platform.mswin?
            '"' + str.gsub(/"/, '\\"') + '"'
#          else
#            "'" + str.gsub(/'/, "'\"'\"'") + "'" 
#          end
        end

as I am running this on Ubuntu Server, but it did not make any difference, I am still getting this error.

-Alexi

Actions #6

Updated by Jean-Philippe Lang about 15 years ago

  • Status changed from Reopened to Closed

Your log shows that the SVN command fails.
Please run Redmine in development mode. The error should be logged in log/scm.stderr.log.
Create a new ticket with this log attached.

Actions #7

Updated by Alexi Vereschaga about 15 years ago

Thanks. For anyone out there who may run into the same problem here is how I fixed my issue:

I ran the site in the development mode once, and it fixed it. Then I switched to back to production mode and everything seems to be working fine. So running it once in development mode somehow magically fixed this issue. We've had this problem for about 4 months and I think I've tried everything possible to get it fixed. Here is the exact commands that i executed to run it in the development mode:

/www/redmine/src$ sudo /etc/init.d/redmine stop (to stop redmine or howeber you do it on your server...)
/www/redmine/src$ sudo /var/lib/gems/1.8/bin/mongrel_rails start -d -p 3000 -e development -c /www/redmine/src -P log/mongrel.pid

Thanks,
-Alexi

Actions

Also available in: Atom PDF