My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 1127: NullPointerException in changeProjectAccess
2 people starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


Sign in to add a comment
 
Reported by kurtharr...@gmail.com, Sep 13, 2011
Affected Version:
2.2.1

What steps will reproduce the problem?
1 New installation of gerrit using defaults
2 Signed up with my google account and uploaded ssh key
3 created a new project ssh -p 29418 localhost gerrit create-project --name new/project
4 reconfigured my git repo to push to refs/for/* and installed hook as described here
http://www.infoq.com/articles/Gerrit-jenkins-hudson
5 pushed changeset
6 created a ssh key and user for jenkins server
 cat jenkins_rsa.pub | ssh -p 29418 localhost gerrit create-account --ssh-key - jenkins
7. Added jenkins to the Non-Interactive Users Group
8. Attempted to grant label verified permission to non-interactive users group.
    Received an internal server error, stacktrace from log file is included below. 


I believe the issue is that when I created the user I did not specify a full name and shows up in the tool currently as Anonymous Coward.  

What is the expected output? What do you see instead?
This should be handled more gracefully or the name should be required during creation or something.  

Please provide any additional information below.

2011-09-13 09:30:06,065] WARN  / : Error in changeProjectAccess
java.lang.NullPointerException
	at com.google.gerrit.httpd.rpc.project.ChangeProjectAccess.call(ChangeProjectAccess.java:134)
	at com.google.gerrit.httpd.rpc.project.ChangeProjectAccess.call(ChangeProjectAccess.java:53)
	at com.google.gerrit.httpd.rpc.Handler.to(Handler.java:65)
	at com.google.gerrit.httpd.rpc.project.ProjectAdminServiceImpl.changeProjectAccess(ProjectAdminServiceImpl.java:89)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.google.gwtjsonrpc.server.MethodHandle.invoke(MethodHandle.java:91)
	at com.google.gwtjsonrpc.server.JsonServlet.doService(JsonServlet.java:382)
	at com.google.gwtjsonrpc.server.JsonServlet.service(JsonServlet.java:268)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:216)
	at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:141)
	at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:93)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:63)
	at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59)
	at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59)
	at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59)
	at com.google.gwtexpui.server.CacheControlFilter.doFilter(CacheControlFilter.java:76)
	at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:129)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59)
	at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59)
	at com.google.gerrit.httpd.RequestCleanupFilter.doFilter(RequestCleanupFilter.java:54)
	at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:129)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59)
	at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:122)
	at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:110)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1322)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:473)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:921)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:403)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:856)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114)
	at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:59)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114)
	at org.eclipse.jetty.server.Server.handle(Server.java:352)
	at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:596)
	at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1069)
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:805)
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218)
	at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:426)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:510)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:450)
	at java.lang.Thread.run(Thread.java:680)

Apr 13, 2012
#1 p...@akeo.ie
Same issue with version 2.3. I don't have Anonymous Coward as user, but obtain a similar exception when adding jenkins to Non-Interactive Users Group and attempt to grant label verified permission:

[2012-04-14 00:02:09,696] WARN  / : Error in changeProjectAccess
java.lang.NullPointerException
        at com.google.gerrit.httpd.rpc.project.ChangeProjectAccess.replace(ChangeProjectAccess.java:182)
        at com.google.gerrit.httpd.rpc.project.ChangeProjectAccess.call(ChangeProjectAccess.java:143)
        at com.google.gerrit.httpd.rpc.project.ChangeProjectAccess.call(ChangeProjectAccess.java:53)
        at com.google.gerrit.httpd.rpc.Handler.to(Handler.java:65)
        at com.google.gerrit.httpd.rpc.project.ProjectAdminServiceImpl.changeProjectAccess(ProjectAdminServiceImpl.java:115)
        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)
        at com.google.gwtjsonrpc.server.MethodHandle.invoke(MethodHandle.java:91)
        at com.google.gwtjsonrpc.server.JsonServlet.doService(JsonServlet.java:382)
        at com.google.gwtjsonrpc.server.JsonServlet.service(JsonServlet.java:268)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:216)
        at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:141)
        at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:93)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:63)
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59)
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59)
        at com.google.gwtexpui.server.CacheControlFilter.doFilter(CacheControlFilter.java:76)
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:129)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59)
        at com.google.gerrit.httpd.RequestCleanupFilter.doFilter(RequestCleanupFilter.java:54)
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:129)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59)
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59)
        at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:122)
        at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:110)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1322)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:473)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:921)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:403)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:856)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114)
        at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:59)
        at com.google.gerrit.pgm.http.jetty.JettyServer$1.handle(JettyServer.java:139)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114)
        at org.eclipse.jetty.server.Server.handle(Server.java:352)
        at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:596)
        at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1069)
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:805)
        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218)
        at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:426)
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:510)
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34)
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:450)
        at java.lang.Thread.run(Thread.java:636)

Apr 13, 2012
#2 p...@akeo.ie
One way to work around the issue. Under your gerrit account, assuming that ~/git/ is the directory that contains All-Projects.git:
mkdir tmp
cd tmp
git clone ~/git/All-Projects.git
cd All-Projects.git
vi project.config # Add the following:
  [access "refs/heads/*"]
        label-Verified = -1..+1 group Non-Interactive Users
git add project.config
git commit
git push ~/git/All-Projects.git HEAD:refs/meta/config

You should be able to verify through the gitweb link (near History) that your change has been applied. I also found that I was able to edit settings in the web interface after that.


Sign in to add a comment

Powered by Google Project Hosting