Skip to content

Unable to view summary/tickets page #1237

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

Closed
drognisep opened this issue May 20, 2017 · 10 comments
Closed

Unable to view summary/tickets page #1237

drognisep opened this issue May 20, 2017 · 10 comments

Comments

@drognisep
Copy link

Originally posted on superuser

I'm currently unable to view the summary page on any repository, or view tickets. Please see the superuser link above for detailed information.

Here's the stack trace for attempting to load a summary page, specifically for jPortfolio:

2017-05-19 18:36:34 [ERROR] Can't instantiate page using constructor public com.gitblit.wicket.pages.SummaryPage(org.apache.wicket.PageParameters) and argument r = "jPortfolio.git"
org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor public com.gitblit.wicket.pages.SummaryPage(org.apache.wicket.PageParameters) and argument r = "jPortfolio.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 com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:88)
        at com.gitblit.servlet.EnforceAuthenticationFilter.doFilter(EnforceAuthenticationFilter.java:99)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:88)
        at com.gitblit.servlet.ProxyFilter$1.doFilter(ProxyFilter.java:89)
        at com.gitblit.servlet.ProxyFilter.doFilter(ProxyFilter.java:92)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:88)
        at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:120)
        at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:133)
        at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:130)
        at com.google.inject.servlet.GuiceFilter$Context.call(GuiceFilter.java:203)
        at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:130)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:789)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.GeneratedConstructorAccessor133.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:188)
        ... 41 more
Caused by: java.lang.NullPointerException
        at com.gitblit.manager.ServicesManager.getRepositoryUrls(ServicesManager.java:279)
        at com.gitblit.wicket.panels.RepositoryUrlPanel.onInitialize(RepositoryUrlPanel.java:83)
        at org.apache.wicket.Component.fireInitialize(Component.java:4105)
        at org.apache.wicket.MarkupContainer.initialize(MarkupContainer.java:433)
        at org.apache.wicket.MarkupContainer.addedComponent(MarkupContainer.java:1000)
        at org.apache.wicket.MarkupContainer.add(MarkupContainer.java:142)
        at com.gitblit.wicket.pages.SummaryPage.<init>(SummaryPage.java:130)
        ... 45 more
@martinspielmann
Copy link
Contributor

martinspielmann commented May 21, 2017

I just took a look at the code. The error occurs while trying to get the users preferred URL protocol.
The error can be reproduced by adding an unsupported url in gitblit.properties like this:
image

The error can be fixed locally by adding a null check to url.transport in ServicesManager.java:279
image

However it just fixes the "internal error" and shows the URL in the panel. The root cause is an unsupported protocol which is configured somewhere else.

@drognisep
Copy link
Author

drognisep commented May 22, 2017

@pingunaut I have nothing in that property in default.properties, and that property doesn't exists in gitblit.properties. Should I fill it with something like what is shown in the comments above the property, or are those values set already by default?

# Show other URLs on the summary page for accessing your git repositories
# Use spaces to separate urls.
#
# {0} is the token for the repository name
# {1} is the token for the username
#
# The username is only practical if you have setup your other git serving
# solutions accounts to have the same username as the Gitblit account.
#
# e.g.
# web.otherUrls = ssh://localhost/git/{0} git://localhost/git/{0} https://{1}@localhost/r/{0}
#
# SPACE-DELIMITED
# SINCE 0.5.0
web.otherUrls =

@drognisep
Copy link
Author

drognisep commented May 22, 2017

@pingunaut Tried overriding that property in gitblit.properties, but the same exception happened.

I did notice that this info message is popping up immediately before the stack trace in catalina.out, which shows up after I click on the repository link:

2017-05-21 19:22:00 [INFO ] Unknown transport, push rejected!

The URL for the link to the summary page on the repositories page is of the form https://example.com/git/summary/?r=jPortfolio.git

So I don't think that it should be getting "unknown transport" like the log message above says.

@drognisep
Copy link
Author

@pingunaut I had a break-through! Based on the "Unknown transport" message I changed my preferred transport in profile settings from HTTPS to SSH, and I'm now able to view the repository and ticket pages, but I'm still seeing the info message above in the log, so I'm wondering just how relevant it is to this particular issue.

Any ideas on this?

@martinspielmann
Copy link
Contributor

@drognisep this is good news. When you are on the summary page of a repository, what urls do you see in the dropdown panel? (the one that looks like this):
image

@drognisep
Copy link
Author

I have mostly the same, except that https link is quoted for some reason.

image

@martinspielmann
Copy link
Contributor

Alright here we go:
"https
is not a valid protocol :-)
the only remaining questions is: how did the quotes get there.. i'll try to have a look later

@drognisep
Copy link
Author

I don't think I've added quotes in configuration anywhere (not sure why I would). Makes sense why it's complaining. Do you think it's configuration or logic?

@martinspielmann
Copy link
Contributor

martinspielmann commented May 23, 2017

Hmm, didn't find anything in the logic that would explain it. Maybe it's your domain configuration (in gitblit.properties or defaults.properties)?
I was able to exactly reproduce the behavior by setting:
web.canonicalUrl = "https://saylorsolutions.com/git/"

The url has to be set without the quotes to work correctly

@drognisep
Copy link
Author

@pingunaut As it turns out, that's exactly what I did. Don't know why, but that's it. Thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants