Error to "ADMIN| Project | Access"

243 views
Skip to first unread message

Baz

unread,
Jun 27, 2011, 6:19:56 PM6/27/11
to repo-d...@googlegroups.com
Hi,
 
When I init a new project via ssh as instructed in document, I can access "ADMIN| Project | Access".
 
However, if i "clone --bare" a project from another machine, then run "java -jar gerrit.war init --batch --site-path /home/gerrit2/review_site", and when I try to access "ADMIN| Project | Access", the gerrit UI/webpage will return "Application Error Server Error Internal Server Error".
 
Why? How can i fix it?
 
What is the proper way to import an existing project (git repo) from another location? (I had related discussion from anther thread but I think this is beyond that point already).
 
Thank you.
 
B.

Baz

unread,
Jun 27, 2011, 6:34:51 PM6/27/11
to repo-d...@googlegroups.com
From Error_log:
 
[2011-06-27 15:35:10,859] WARN  / : Error in projectAccess
java.lang.NullPointerException
        at com.google.gerrit.server.git.VersionedMetaData.getRevision(VersionedMetaData.java:69)
        at com.google.gerrit.httpd.rpc.project.ProjectAccessFactory.call(ProjectAccessFactory.java:9
2)
        at com.google.gerrit.httpd.rpc.project.ProjectAccessFactory.call(ProjectAccessFactory.java:4
0)
        at com.google.gerrit.httpd.rpc.Handler.to(Handler.java:65)
        at com.google.gerrit.httpd.rpc.project.ProjectAdminServiceImpl.projectAccess(ProjectAdminSer
viceImpl.java:75)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)

Shawn Pearce

unread,
Jun 27, 2011, 10:02:49 PM6/27/11
to Baz, repo-d...@googlegroups.com
On Mon, Jun 27, 2011 at 15:34, Baz <bazt...@gmail.com> wrote:
> From Error_log:
>
> [2011-06-27 15:35:10,859] WARN  / : Error in projectAccess
> java.lang.NullPointerException
>         at
> com.google.gerrit.server.git.VersionedMetaData.getRevision(VersionedMetaData.java:69)

This is a known bug in Gerrit 2.2.1. You need to make sure you have an
empty refs/meta/config branch in each project.

Baz

unread,
Jun 28, 2011, 3:20:33 AM6/28/11
to Shawn Pearce, repo-d...@googlegroups.com
Shawn, thanks for the quick reply. I added the config file to the specific project that i am going to access as you described: refs/meta/config but still having the same error. Am i missing anything?

[2011-06-28 00:17:15,094] WARN  / : Error in projectAccess

java.lang.NullPointerException
    at com.google.gerrit.server.git.VersionedMetaData.getRevision(VersionedMetaData.java:69)
    at com.google.gerrit.httpd.rpc.project.ProjectAccessFactory.call(ProjectAccessFactory.java:92)
    at com.google.gerrit.httpd.rpc.
project.ProjectAccessFactory.call(ProjectAccessFactory.java:40)

    at com.google.gerrit.httpd.rpc.Handler.to(Handler.java:65)

* Shawn, sorry, hitting the "reply" instead of "reply all"...

Baz

unread,
Jun 29, 2011, 1:25:02 AM6/29/11
to repo-d...@googlegroups.com
Any thoughts? I am still having internal server error message when going into Access link for projects that are imported (git clone --bare).

Manuel Doninger

unread,
Jun 29, 2011, 1:40:33 AM6/29/11
to Baz, repo-d...@googlegroups.com
On Wed, Jun 29, 2011 at 07:25, Baz <bazt...@gmail.com> wrote:
> Any thoughts? I am still having internal server error message when going
> into Access link for projects that are imported (git clone --bare).
>

refs/meta/config is not a config file, but a branch in that repository.
Did you consider that?

Manuel

Baz

unread,
Jun 29, 2011, 1:14:29 PM6/29/11
to Manuel Doninger, repo-d...@googlegroups.com
Manuel, thanks for the quick reply. How can i create such a branch? If I create a branch after cloning a repo, the config branch will not appear. Is there any specific way to resolve this?
 
In general, are you saying that the internal error is causing by incorrect import of project/repo into Gerrit? If so, what is the proper way to do it?
 
Thanks. B.

Baz

unread,
Jun 29, 2011, 1:44:14 PM6/29/11
to repo-d...@googlegroups.com
Ah, I found another post discussed the same issue and solution. I have created the refs/meta/config branch and the internal error message is gone. Here is the link to the post and solution in brief. Thank you all for help me with this. B.
 
 
Quote from the post:
 
This is caused by the project not having a "refs/meta/config" branch.
I'm fixing it in the next release (2.2.2), but in the interim you can
work around it by creating this branch yourself. The hack looks like
this:

  mkdir tmp
  cd tmp
  git init
  touch project.config
  git add project.config
  git commit -m "Initially empty project.config"

  # Execute this push as your Gerrit "user", directly into the repository

  git push path/to/your/repository HEAD:refs/meta/config



Saša Živkov

unread,
Aug 13, 2012, 11:25:58 AM8/13/12
to Tariq Mehmood, repo-d...@googlegroups.com
On Mon, Aug 13, 2012 at 1:03 PM, Tariq Mehmood <tari...@gmail.com> wrote:
> Hi all,
>
> Is this also a know bug in Gerrit (2.4.2)?
No, not the NPE which you posted in your previous post(s).

>
> I am getting the same error.
Are you sure you are getting exactly the same error?
Does the stack trace from the error log look identical?
Looking at the bug fix for this issue [1] it looks quite impossible to get a NPE
at this place if you are running 2.4.2.

Saša

[1] https://gerrit-review.googlesource.com/23691
> --
> To unsubscribe, email repo-discuss...@googlegroups.com
> More info at http://groups.google.com/group/repo-discuss?hl=en
Reply all
Reply to author
Forward
0 new messages