Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
gitblit opened this issue Aug 12, 2015 · 7 comments
Closed

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

gitblit opened this issue Aug 12, 2015 · 7 comments

Comments

@gitblit
Copy link
Owner

@gitblit gitblit commented Aug 12, 2015

Originally reported on Google Code with ID 458

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


Reported by fgeorges on 2014-07-06 14:24:18

@gitblit
Copy link
Owner Author

@gitblit gitblit commented Aug 12, 2015

By the way, this does not block me, this is just in case it might help.

Reported by fgeorges on 2014-07-06 14:32:07

@gitblit
Copy link
Owner Author

@gitblit gitblit commented Aug 12, 2015

Thanks for the report.  I'll get this fixed after my vacation.

Reported by James.Moger on 2014-07-10 12:27:53

  • Status changed: Accepted
  • Labels added: Milestone-1.6.1

@gitblit
Copy link
Owner Author

@gitblit gitblit commented Aug 12, 2015

Sure.  Enjoy your holidays!

Reported by fgeorges on 2014-07-10 14:11:49

@gitblit
Copy link
Owner Author

@gitblit gitblit commented Aug 12, 2015

Fix merged to master.

Reported by James.Moger on 2014-09-04 17:25:15

  • Status changed: Queued

@gitblit
Copy link
Owner Author

@gitblit gitblit commented Aug 12, 2015

Issue 780 has been merged into this issue.

Reported by James.Moger on 2014-09-04 17:26:04

@gitblit
Copy link
Owner Author

@gitblit gitblit commented Aug 12, 2015

Great, thanks!  Will test when possible.

Reported by fgeorges on 2014-09-04 18:25:38

@gitblit
Copy link
Owner Author

@gitblit gitblit commented Aug 12, 2015

v1.6.1 released

Reported by James.Moger on 2014-10-20 21:36:03

  • Status changed: Done

@gitblit gitblit closed this as completed Aug 12, 2015
@flaix flaix added this to the 1.6.1 milestone Dec 13, 2016
@flaix flaix added this to the 1.6.1 milestone Dec 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants