Issue 2017: gerrit on centos 6 does not start with "String index out of range: -1" in log
Status:  Released
Owner: ----
Closed:  Aug 2013
Reported by ibogda...@evelopers.com, Jul 17, 2013
************************************************************
***** NOTE: THIS BUG TRACKER IS FOR GERRIT CODE REVIEW *****
***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, INTERNAL *****
***** ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC.    *****
***** THOSE ISSUE BELONG IN DIFFERENT ISSUE TRACKERS!  *****
************************************************************

Affected Version: 2.6.1

What steps will reproduce the problem?

1. install gerrit on Centos 6 x64 using this manual:
http://gerrit-documentation.googlecode.com/svn/Documentation/2.6/install.html
1.1 install and use java jre-7u21-linux-x64

2. get the error on installation:
-- 
*** Plugins
***
Prompt to install core plugins [y/N]? N
fatal: DbInjector failed
fatal: String index out of range: -1
--

3. try to start gerrit ang get the error:
--
[2013-07-16 17:29:20,899] ERROR com.google.gerrit.pgm.Daemon : Unable to start daemon
com.google.gerrit.pgm.util.Die: String index out of range: -1
...
Caused by: java.lang.RuntimeException: DbInjector failed
Caused by: com.google.inject.CreationException: Guice creation errors:

1) Error injecting constructor, java.lang.StringIndexOutOfBoundsException: String index out of range: -1
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1

(see full log attached)

--

Thanks for your help,

Ivan
error_log.zip
1.3 KB   Download
Jul 17, 2013
Project Member #1 david.pu...@sonymobile.com
Do you have a repository named ".git" in the root of Gerrit's "git" folder?

I've stepped through the code and it seems that's the case in which this crash will occur.
Jul 17, 2013
Project Member #2 david.pu...@sonymobile.com
https://gerrit-review.googlesource.com/#/c/47931/
Status: ChangeUnderReview
Jul 19, 2013
#3 ljupka.g...@gmail.com
I also had the same error when installing gerrit. It worked when I set the gerrits git folder to point directly to the .git folder instead of its parent folder. 
Jul 21, 2013
#4 U20101...@gmail.com
I got the same error_log when i restart the gerrit server,now it can not start,my gerrit server is broken now and don't know how to handle it,there is no any '.git' file in my 'review_site' folder!
Aug 8, 2013
#5 sop@google.com
(No comment was entered for this change.)
Status: Submitted
Labels: FixedIn-2.8
Dec 9, 2013
Project Member #6 david.pu...@sonymobile.com
(No comment was entered for this change.)
Status: Released