davideuler / gitblit

Automatically exported from code.google.com/p/gitblit
Apache License 2.0
0 stars 0 forks source link

Creating new repo fails if user does not have email #458

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If a user with no email address creates a new repository, an exception is 
thrown in the middle of the creation process.  The creation is then non-atomic: 
the repo does exist after the exception, but the creation process did not get 
through entirely.

** Reproduce

1. log in with a user with no email address in his/her profile
2. create a new repository xxx/yyy
3. probably not relevant, but the project xxx did not exist yet
4. the next screen after pressing "create" is an error screen

I did not take a screenshot of the error screen, unfortunately, but it looked 
like a default error page from the application server, like if Gitblit threw an 
uncaught exception.

** The universe after the error

The repo was created.  I could see it in the list of repositories.  But the 
creation process did not get through entirely.  If only, I selected the option 
to create a README file, and there was none.

** Work-around

Given the exception in the log file (see below), I checked whether the user had 
an email address in his profile, and he did not (it was admin).  I added one.  
I deleted the repo and created it again, and it worked.

** Log

2014-07-06 15:49:53 [INFO ] create repository xxx/yyy.git 2014-07-06 15:49:53 [ERROR] Method onFormSubmitted of interface org.apache.wicket.markup.html.form.IFormSubmitListener targeted at component [MarkupContainer [Component id = editForm]] threw an exception org.apache.wicket.WicketRuntimeException: Method onFormSubmitted of interface org.apache.wicket.markup.html.form.IFormSubmitListener targeted at component [MarkupContainer [Component id = editForm]] threw an exception at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:193) at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1279) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1358) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1465) at org.apache.wicket.RequestCycle.request(RequestCycle.java:545) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1639) at com.gitblit.servlet.EnforceAuthenticationFilter.doFilter(EnforceAuthenticationFilter.java:87) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1639) at com.gitblit.servlet.ProxyFilter$1.doFilter(ProxyFilter.java:74) at com.gitblit.servlet.ProxyFilter.doFilter(ProxyFilter.java:67) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1631) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:549) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:568) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1111) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:478) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1045) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) at org.eclipse.jetty.server.Server.handle(Server.java:462) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:279) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:232) at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:534) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536) at java.lang.Thread.run(Thread.java:724) Caused by: java.lang.reflect.InvocationTargetException 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:606) at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182) ... 31 more Caused by: java.lang.IllegalArgumentException: E-mail address of PersonIdent must not be null. at org.eclipse.jgit.lib.PersonIdent.(PersonIdent.java:186) at org.eclipse.jgit.lib.PersonIdent.(PersonIdent.java:162) at org.eclipse.jgit.lib.PersonIdent.(PersonIdent.java:101) at com.gitblit.wicket.pages.NewRepositoryPage.initialCommit(NewRepositoryPage.java:246) at com.gitblit.wicket.pages.NewRepositoryPage$1.onSubmit(NewRepositoryPage.java:141) at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1595) at org.apache.wicket.markup.html.form.Form.process(Form.java:960) at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:922) ... 36 more

Original issue reported on code.google.com by fgeorges on 6 Jul 2014 at 2:24

GoogleCodeExporter commented 9 years ago
By the way, this does not block me, this is just in case it might help.

Original comment by fgeorges on 6 Jul 2014 at 2:32

GoogleCodeExporter commented 9 years ago
Thanks for the report.  I'll get this fixed after my vacation.

Original comment by James.Mo...@gmail.com on 10 Jul 2014 at 12:27

GoogleCodeExporter commented 9 years ago
Sure.  Enjoy your holidays!

Original comment by fgeorges on 10 Jul 2014 at 2:11

GoogleCodeExporter commented 9 years ago
Fix merged to master.

Original comment by James.Mo...@gmail.com on 4 Sep 2014 at 5:25

GoogleCodeExporter commented 9 years ago
Issue 484 has been merged into this issue.

Original comment by James.Mo...@gmail.com on 4 Sep 2014 at 5:26

GoogleCodeExporter commented 9 years ago
Great, thanks!  Will test when possible.

Original comment by fgeorges on 4 Sep 2014 at 6:25

GoogleCodeExporter commented 9 years ago
v1.6.1 released

Original comment by James.Mo...@gmail.com on 20 Oct 2014 at 9:36