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

Internal Error after forking a repository #716

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

Internal Error after forking a repository #716

gitblit opened this issue Aug 12, 2015 · 13 comments

Comments

@gitblit
Copy link
Owner

gitblit commented Aug 12, 2015

Originally reported on Google Code with ID 420

What steps will reproduce the problem?
1. Create a repository.
2. Fork this repository.
3. In the forked repository, go to "forks" tab.

What is the expected output? What do you see instead?
I want to see the origin repository.
I see an "Internal Error" on Web UI and an error in log file:
[ERROR] Can't instantiate page using constructor public com.gitblit.wicket.pages.ForksPage(org.apache.wicket.PageParameters)
and argument r = "~julienr16/MyRepository.git"

What version of the product are you using? On what operating system?
1.5.0 on Debian 7.4

Reported by julienr16 on 2014-05-06 08:07:00

@gitblit
Copy link
Owner Author

gitblit commented Aug 12, 2015

The name of this issue must be: "Internal Error after forking a repository".
I was testing some things and I was enabled to simplify actions to identify the error
(ie. not deleting the origin fork is required to see the error).

Reported by julienr16 on 2014-05-06 08:11:04

@gitblit
Copy link
Owner Author

gitblit commented Aug 12, 2015

Can you paste the complete stacktrace, not just the top?

Reported by James.Moger on 2014-05-06 11:31:21

@gitblit
Copy link
Owner Author

gitblit commented Aug 12, 2015

Reported by James.Moger on 2014-05-06 11:31:35

@gitblit
Copy link
Owner Author

gitblit commented Aug 12, 2015

Here are the complete stacktrace:

2014-05-06 09:59:49 [ERROR] Can't instantiate page using constructor public com.gitblit.wicket.pages.ForksPage(org.apache.wicket.PageParameters)
and argument r = "~julienr16/OriginRepository.git"
org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor
public com.gitblit.wicket.pages.ForksPage(org.apache.wicket.PageParameters) and argument
r = "~julienr16/OriginRepository.git"
  at org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:212)
  at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:89)
  at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:305)
  at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:320)
  at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:234)
  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:86)
  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.GeneratedConstructorAccessor19.newInstance(Unknown Source)
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
  at org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:188)
  ... 31 more
Caused by: java.lang.NullPointerException
  at com.gitblit.manager.RepositoryManager.getForkNetwork(RepositoryManager.java:1015)
  at com.gitblit.wicket.pages.ForksPage.<init>(ForksPage.java:47)
  ... 35 more

Reported by julienr16 on 2014-05-06 11:34:19

@gitblit
Copy link
Owner Author

gitblit commented Aug 12, 2015

Thank you.  With Wicket, the underlying error is at the bottom of the stracktrace:

Caused by: java.lang.NullPointerException
   at  
com.gitblit.manager.RepositoryManager.getForkNetwork(RepositoryManager.java:1015)
   at com.gitblit.wicket.pages.ForksPage.<init>(ForksPage.java:47)
   ... 35 more

The first 25 lines of the stack are Wicket & container frames.

I think this may be a case-sensitivity issue in my caching.  Would you repeat this
test with an all lowercase repo name for both your origin and fork repos?  That would
be diagnostic for me.

Reported by James.Moger on 2014-05-06 11:46:04

@gitblit
Copy link
Owner Author

gitblit commented Aug 12, 2015

That's working for an all lowercase repo name on both. :)

Reported by julienr16 on 2014-05-06 12:17:23

@gitblit
Copy link
Owner Author

gitblit commented Aug 12, 2015

Fix pushed to master.

Reported by James.Moger on 2014-05-07 14:03:38

  • Status changed: Queued
  • Labels added: Milestone-1.5.1

@gitblit
Copy link
Owner Author

gitblit commented Aug 12, 2015

Fix or change deployed in 1.5.1 release.

Reported by James.Moger on 2014-05-07 17:48:03

  • Status changed: Done

@gitblit
Copy link
Owner Author

gitblit commented Aug 12, 2015

Hey James,

still got above issue in Gitblit 1.6.0:

2014-08-19 22:27:54 [ERROR] Can't instantiate page using constructor public com.gitblit.wicket.pages.CommitPage(org.apache.wicket.PageParameters)
and argument r = "~sebastian.jancke/gitblit-testing.git" h = "40813f90c2f7eafa45e1884df90d37162f0a879d"
org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor
public com.gitblit.wicket.pages.CommitPage(org.apache.wicket.PageParameters) and argument
r = "~sebastian.jancke/gitblit-testing.git" h = "40813f90c2f7eafa45e1884df90d37162f0a879d"
    at org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:212)
    at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:89)
    at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:305)
    at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:320)
    at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:234)
    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.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:188)
    ... 34 more
Caused by: java.lang.NullPointerException
    at com.gitblit.utils.BugtraqProcessor.processCommitMessage(BugtraqProcessor.java:59)
    at com.gitblit.wicket.pages.RepositoryPage.addFullText(RepositoryPage.java:545)
    at com.gitblit.wicket.pages.CommitPage.<init>(CommitPage.java:122)
    ... 39 more


Reported by sebastian.jancke on 2014-08-19 20:29:59

@gitblit
Copy link
Owner Author

gitblit commented Aug 12, 2015

To clarify: I can navigate to the forked repository, but cannot view any commit-details
or diff. Viewing filetree for the commit works.

Reported by sebastian.jancke on 2014-08-19 20:32:18

@gitblit
Copy link
Owner Author

gitblit commented Aug 12, 2015

@sebastian: This is actually a different issue.  Does the problem persist after a Gitblit
restart?

Reported by James.Moger on 2014-09-05 13:31:17

@gitblit
Copy link
Owner Author

gitblit commented Aug 12, 2015

I am having this issue as well. Cannot view any commit-details of diff, but I can see
the filetree. It does not appear to persist after a gitblit restart.

Reported by razzard on 2014-09-26 13:14:26

@gitblit
Copy link
Owner Author

gitblit commented Aug 12, 2015

I have observed the same problem as Sebastian in #9 after mirroring a repo from Github.
A restart of Gitblit seems to clear it up.

Should I open a new issue for that?

Reported by daff2k on 2014-11-02 22:50:40

@gitblit gitblit closed this as completed Aug 12, 2015
@flaix flaix modified the milestone: 1.5.1 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