[Announce] gitblit-plugin bumped to GitBlit 1.3.1

475 views
Skip to first unread message

Luca Milanesio

unread,
Jul 24, 2013, 7:29:40 PM7/24/13
to repo-discuss@googlegroups.com Discussion
Hi all,
I've pushed the changes needed to get GitBlit 1.3.1 working with Gerrit 2.8-SNAPSHOT (master).

Please get the patches up to https://gerrit-review.googlesource.com/#/c/48143/ and try to build it and make it work for you :-)

Thank you.

Luca.

Bassem Rabil

unread,
Jul 25, 2013, 11:49:44 AM7/25/13
to repo-d...@googlegroups.com
I tried it, and the build went smoothly and it seems the plugin is working fine.

Thanks
Bassem

Luca Milanesio

unread,
Jul 25, 2013, 11:56:01 AM7/25/13
to Bassem Rabil, repo-d...@googlegroups.com
Cool, will merge the changes then.

James have setup an official maven repo for GitBlit ... so that from now on we can refer to the official GitBlit builds :-)

Luca.

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
 
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Jeff

unread,
Jul 26, 2013, 4:05:58 PM7/26/13
to repo-d...@googlegroups.com, Bassem Rabil
Luca,
What commit would you recommend we build to work with Gerrit 2.7-rc3?  I had gitblit working with 2.7-rc2, unfortunately I updated both Gitblit and Gerrit at roughly the same time, and seem to have misplaced my old build (and can't remember what it was built from).  Should these changes work in 2.7, with the pom.xml updated to Gerrit-api 2.7-SNAPSHOT?  

Luca Milanesio

unread,
Jul 26, 2013, 5:37:06 PM7/26/13
to Jeff, repo-d...@googlegroups.com, Bassem Rabil
In theory what is on gitblit-plugin master should work with 2.7 and 2.8.
Someone tried as well with 2.6 and reported good behaviour there as well.

With regards to the API specs, it is compliant with all of the API starting from 2.6, however the problem was at GitBlit level with the JGit dependencies :-(

Luca.

Jeff

unread,
Jul 29, 2013, 11:33:33 AM7/29/13
to repo-d...@googlegroups.com, Jeff
Luca,
I have the plugin working partially on Gerrit 2.7-rc3.  I've run a couple of different builds from the latest commit on master, one with the pom.xml set to 2.7-SNAPSHOT, and one with 2.8-SNAPSHOT.  I did have to make a minor change, which I had forgotten about - essentially, because we're running behind a reverse proxy, I had to add a "reverseProxyString" to the gitblit config section of gerrit.config, then remove that string from the hostName used in GitBlitUrlsConfig, I'm sure there's a better way to do this, but it was the most direct way I could think of.  If you're interested, I will push the change for review (someone will need to test it who isn't using a reverse proxy for sure).  

However, I am running into problems still, on the "My Dashboard" page, I am getting an Internal Error, that looks to be coming from MyDashboardPage(), and is caused by a NPE on GitBlit.getStarCount.  Do you have any suggestions for this?  I think I may need to try building an earlier commit to run with 2.7.

Thanks,
Jeff

Bassem Rabil

unread,
Jul 29, 2013, 11:58:36 AM7/29/13
to Jeff, repo-d...@googlegroups.com
Hi Jeff

Can you please include me in your proposed change, we are using here reverse proxy and would be interested to use your workaround if it applies to our setup.

Thanks and Regards
Bassem Rabil Guendy



You received this message because you are subscribed to a topic in the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/repo-discuss/Kcl0JIGNiGk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to repo-discuss...@googlegroups.com.

Luca Milanesio

unread,
Jul 29, 2013, 1:26:07 PM7/29/13
to Bassem Rabil, Jeff, repo-discuss@googlegroups.com Discussion
Feel free to contribute patches :-)

Luca.

Jeff

unread,
Jul 31, 2013, 10:26:58 AM7/31/13
to repo-d...@googlegroups.com, Bassem Rabil, Jeff
Luca, Baseem,
Apparently, I got confused on the change necessary for reverse proxy to work with Gitblit.  
I have built the gitblit-plugin master, and it is working happily behind a reverse proxy on 2.7-rc3 (Pointing to the Gerrit 2.7 plugin API).  The version I am running does have a few issues that I am going to look into:
1) It does not seem to support the plugin reload command, I am starting/stopping the server on each revision I build. (not a huge deal)
2) The project clone URL for https includes the reverse-proxy string in the URL (which I was attempting to fix with reverse-proxy-string parameter change that I was referring to earlier - I may just push changes to the plugin/gitblit itself to allow a config change to disable the https clone link if it's been disabled in Gerrit)
3) The dashboard page throws a NPE on GitBlit.getStarCount.  Researching this currently.

Bassem Rabil

unread,
Jul 31, 2013, 12:41:02 PM7/31/13
to repo-d...@googlegroups.com, Bassem Rabil, Jeff
Jeff, 

We have the same setup with no https cloning enabled, even removing all relevant [download] section of gerrit.config. The URLs for https are still showing, we will need this fix to avoid adding these un-used URLs. Keep us posted with your research outcomes for dashboard page.

Thanks
Bassem

Jeff

unread,
Jul 31, 2013, 1:50:21 PM7/31/13
to repo-d...@googlegroups.com, Bassem Rabil, Jeff

Bassem,

Try looking at GerritWicketFilter, you need to remove the config.getGitHtptUrl() calls from the properties.put(“web.otherUrls”...) calls.  I’ve made this fix locally and it seems to work, once I get some time I will make this a bit more elegant by reading gerrit.config to determine if https cloning is enabled. 

Bassem Rabil

unread,
Aug 1, 2013, 8:14:05 AM8/1/13
to repo-d...@googlegroups.com, Bassem Rabil, Jeff
Jeff,

Thanks for contributing your patch to avoid adding HTTP URLs if not defined in download section in gerrit configuration.

Regards
Bassem

Luca Milanesio

unread,
Aug 1, 2013, 8:15:43 AM8/1/13
to Bassem Rabil, Jeff, repo-discuss@googlegroups.com Discussion
Thanks to both and welcome into the list of GitBlit plugin contributors :-)

Luca.

Bassem Rabil

unread,
Aug 5, 2013, 9:08:06 AM8/5/13
to repo-d...@googlegroups.com, Bassem Rabil, Jeff
Hi Jeff

Do you have updates regarding your research about the NPE with the dashboard page ? 

Thanks 
Bassem




On Wednesday, July 31, 2013 10:26:58 AM UTC-4, Jeff wrote:

Jeff

unread,
Aug 5, 2013, 9:16:57 AM8/5/13
to repo-d...@googlegroups.com, Bassem Rabil, Jeff
No fix yet, I have been looking at other stuff.  It seems to be related to LDAP auth, but I have not completely narrowed it down.  Attempting to star a project will also cause problems.

Can you confirm the same behavior on 2.8 by chance?

Luca Milanesio

unread,
Aug 5, 2013, 9:18:31 AM8/5/13
to Jeff, repo-d...@googlegroups.com, Bassem Rabil
mmm ... strange that the LDAP auth could make a difference :-O

@Bassem: have you posted the full stack-trace of the NPE ?

Luca.

Bassem Rabil Guendy

unread,
Aug 5, 2013, 9:19:00 AM8/5/13
to Jeff, repo-d...@googlegroups.com

I can confirm this behaviour with Gerrit 2.6.1 which we are testing currently.

 

Regards

Bassem

Bassem Rabil Guendy

unread,
Aug 5, 2013, 9:26:46 AM8/5/13
to Luca Milanesio, Jeff, repo-d...@googlegroups.com

Hi Luca

 

Here below the full stack trace with Gerrit 2.6.1:

 

        at java.lang.Thread.run(Thread.java:722)

[2013-08-05 09:22:50,449] ERROR org.apache.wicket.RequestCycle : Can't instantiate page using constructor public com.gitblit.wicket.pages.MyDashboardPage()

org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor public com.gitblit.wicket.pages.MyDashboardPage()

        at org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:212)

        at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:57)

        at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:298)

        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:481)

        at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319)

        at com.googlesource.gerrit.plugins.gitblit.GerritWicketFilter.doFilter(GerritWicketFilter.java:141)

        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)

        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)

        at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)

        at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)

        at com.google.gerrit.httpd.plugins.HttpPluginServlet.service(HttpPluginServlet.java:222)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

        at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263)

        at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178)

        at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)

        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62)

        at com.google.gerrit.pgm.http.jetty.GetUserFilter.doFilter(GetUserFilter.java:76)

        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)

        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)

        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)

        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)

        at com.google.gwtexpui.server.CacheControlFilter.doFilter(CacheControlFilter.java:70)

        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)

        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)

        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)

        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)

        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)

        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)

        at com.google.gerrit.httpd.AllRequestFilter$FilterProxy$1.doFilter(AllRequestFilter.java:64)

        at com.google.gerrit.httpd.AllRequestFilter$FilterProxy.doFilter(AllRequestFilter.java:57)

        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)

        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)

        at com.google.gerrit.httpd.RequestContextFilter.doFilter(RequestContextFilter.java:75)

        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)

        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)

        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)

        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)

        at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)

        at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)

        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307)

        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453)

        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229)

        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072)

        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382)

        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)

        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006)

        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)

        at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485)

        at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:926)

        at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:988)

        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)

        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)

        at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)

        at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:627)

        at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:51)

        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)

        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)

        at java.lang.Thread.run(Thread.java:722)

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:525)

        at org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:192)

        ... 68 more

Caused by: java.lang.NullPointerException

        at com.gitblit.GitBlit.getStarCount(GitBlit.java:1731)

        at com.gitblit.wicket.panels.FilterableRepositoryList.onInitialize(FilterableRepositoryList.java:126)

        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.MyDashboardPage.setup(MyDashboardPage.java:176)

        at com.gitblit.wicket.pages.MyDashboardPage.<init>(MyDashboardPage.java:58)

        ... 73 more

 

From: Luca Milanesio [mailto:luca.mi...@gmail.com]
Sent: August-05-13 9:19 AM
To: Jeff
Cc: repo-d...@googlegroups.com; Bassem Rabil Guendy
Subject: Re: [Announce] gitblit-plugin bumped to GitBlit 1.3.1

 

mmm ... strange that the LDAP auth could make a difference :-O

Luca Milanesio

unread,
Aug 5, 2013, 9:51:57 AM8/5/13
to Bassem Rabil Guendy, Jeff, repo-d...@googlegroups.com
The problem is clear I think: look there (as you highlighted):

Caused by: java.lang.NullPointerException
        at com.gitblit.GitBlit.getStarCount(GitBlit.java:1731)
        at com.gitblit.wicket.panels.FilterableRepositoryList.onInitialize(FilterableRepositoryList.java:126)

The GitBlit.getStarCount() does this:

/**
* Returns the star count of the repository.
* @param repository
* @return the star count
*/
public long getStarCount(RepositoryModel repository) {
long count = 0;
for (UserModel user : getAllUsers()) {
if (user.getPreferences().isStarredRepository(repository.name)) {
count++;
}
}
return count;
}

public List<UserModel> getAllUsers() {
List<UserModel> users = userService.getAllUsers();
return users;
}

Bhowever the GitBlit user service for Gerrit does not implement the getAllUsers() and returns null ... so then NPE :-(

So there are two solutions:

a) Implement the getAllUsers() in the GerritToGitBlitUserService 
b) Override the getStarCount() in GerritGitBlit

... I would opt for b) as the starred does not make so much sense in this context.
Just override that method and return a zero, so that we can kill the NPE.

Luca.



Bassem Rabil

unread,
Aug 5, 2013, 11:34:20 AM8/5/13
to Luca Milanesio, Jeff, repo-d...@googlegroups.com
Thanks Luca for the hint. I fixed this NPE using your proposed option (b). I will submit a patch soon for your review.

Thanks
Bassem

Jeff

unread,
Aug 7, 2013, 12:20:07 PM8/7/13
to repo-d...@googlegroups.com, Luca Milanesio, Jeff
I have attempted to fix the errors on starring a project following a similar technique (overriding updateUserModel inside of GerritGitBlit) - which does prevent the error from occurring, however it feels a bit "heavy-handed" to me, since it's effectively removed GitBlit's ability to update the UserModel across the entire app (might have unexpected consequences).  I'm wondering if there's some way to trick Gitblit(the app) into thinking it is running in non-authenticated mode (thus removing the user settings, avatar, etc entirely) while still respecting Gerrit's ACL's -- as in not showing repositories which have restricted read privileges (or better yet, still show protected read privileges, if the current user is granted those read privileges).  
Luca, do you have any thoughts on this?

Luca Milanesio

unread,
Aug 7, 2013, 12:27:04 PM8/7/13
to Jeff, repo-d...@googlegroups.com
Honestly the best way to do it is to perform a proper mapping of Gerrit resources on the user to what GitBlit needs ... much of the stuff is out there :-)

It requires more time though ... happy to review it if you can invest some time on it.
(that I don't have ;-( )

Luca.

lucamilanesio

unread,
Nov 11, 2013, 3:13:17 AM11/11/13
to repo-d...@googlegroups.com, Jeff
For fixing the NPEs in the GitBlit plugin (the ones mentioned in the threads and potentially others due to methods not yet supported), get the latest commits from GitBlit-Plugin master: see https://gerrit-review.googlesource.com/50752

HTH.

Luca.

Bruce Zu

unread,
Nov 11, 2013, 3:26:37 AM11/11/13
to repo-d...@googlegroups.com, Jeff
 I cherry-pick ae2618e to 2a66cf4  and update  pom.xml  to update the version 
 then  'mvn clean  package'
 deploy to Gerrit 2.7 (auth is 'HTTP_LDAP') successfuly now without any error found from catalina.out 
 thanks a lot to Luca's  ae2618e ! 
 
 related config in  gerrit.config  follow  the gitbliT/README
   [gitweb]
        type = custom
        url = /plugins/gitblit/
        linkname = gitblit
        project = summary/${project}.git
        revision = commit/${project}.git/${commit}
        branch = log/${project}.git/${branch}
        filehistory = history/${project}.git/${branch}/${file}

 But now when I click a link  of a change patchset , e.g. 
 <a class="gwt-Anchor patchSetLink" href="/plugins/gitblit/commit/tools%2Fgerrit.git/e8d4d7f6c6137b340280679a294dac98c170fc00">(gitblit)</a>
 Gitblit will say "Repository not specified for commit!"

 but  'http://<gerrit>/plugins/gitblit/repositories/'  works like a charm  

 welcome any hints :)

Bruce


---------------------------------
details for reference 
$ git diff 
diff --git i/pom.xml w/pom.xml
index 899f374..46a68fe 100644
--- i/pom.xml
+++ w/pom.xml
@@ -20,7 +20,7 @@ limitations under the License.
   <artifactId>gitblit-plugin</artifactId>
   <description>GitBlit for Gerrit integrated as a plugin</description>
   <name>Gerrit - GitBlit Plugin</name>
-  <version>2.8-SNAPSHOT</version>
+  <version>2.7</version>
   <properties>
     <Gerrit-ApiType>plugin</Gerrit-ApiType>
     <Gerrit-ApiVersion>${project.version}</Gerrit-ApiVersion>


$ git log  --oneline 
ae2618e Avoid NPE on repositories and other GitBlit screens.
2a66cf4 Respect download.scheme in clone links
c5cdf4a Adding proxy for fallback GitBlit Logo Servlet
004c0ec Removing unused imports
1ecce49 Bump to GitBlit 1.3.1
c29b01f Allow compressed downloads
c5e3d38 Support for Source compressed download (ZIP, GZ).
829c6b9 Fixed 2.8-SNAPSHOT issue with web.otherUrls
e8ea1e0 web.otherUrls auto-config based on Gerrit SSH/HTTPD URLs.

Bruce Zu

unread,
Nov 11, 2013, 4:32:32 AM11/11/13
to repo-d...@googlegroups.com, Jeff
the issue I reported above seems is caused by this loop forever: 


[2013-11-11 10:14:40,292] DEBUG org.apache.wicket.Page : ending request for page [Page class = com.gitblit.wicket.pages.CommitPage, id = 69, version = 0], request [method = GET, protocol = HTTP/1.1, requestURL = http://review-test.sonyericsson.net/plugins/gitblit/commit/, contentType = null, contentLength = -1, contextPath = /plugins/gitblit, pathInfo = gitblit/commit/, requestURI = /plugins/gitblit/commit/, servletPath = /commit/, pathTranslated = /srv/tomcat/webapps/ROOT/gitblit/commit]
[2013-11-11 10:14:40,303] ERROR org.apache.wicket.Session : Exception when detaching/serializing page
java.lang.StackOverflowError
        at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1319)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1171)
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1541)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1506)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1429)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1175)
        at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1375)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1171)
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1541)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1506)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1429)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1175)
        at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1375)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1171)
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1541)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1506)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1429)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1175)
        at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1375)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1171)
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1541)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1506)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1429)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1175)
        at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1375)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1171)
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1541)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1506)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1429)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1175)
        at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1375)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1171)
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1541)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1506)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1429)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1175)
        at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1375)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1171)

Bruce Zu

unread,
Nov 11, 2013, 4:36:03 AM11/11/13
to repo-d...@googlegroups.com, Jeff
it works smoothly now after I update the config to be 
[gitweb]
        type = custom
        url = /plugins/gitblit/
        linkname = gitblit
        project = summary/${project}.git
       #revision = commit/${project}.git/${commit}
revision = commit/?r=${project}.git&h=${commit}
        branch = log/${project}.git/${branch}
        filehistory = history/${project}.git/${branch}/${file}




Luca Milanesio

unread,
Nov 11, 2013, 5:03:04 AM11/11/13
to Bruce Zu, repo-discuss, Jeff
Actually the web.mountParameters should always be set to false in the gitblit.properties.
This is due to the lack of repository name with slashes mounted in the Gerrit URL path.

The correct (and auto-generated) gitweb config should look like:

[gitweb]
        type = custom
        url = plugins/
        project = gitblit/summary/?r=${project}
        revision = gitblit/commit/?r=${project}&h=${commit}
        branch = gitblit/log/?r=${project}&h=${branch}
        filehistory = gitblit/history/?f=${file}&r=${project}&h=${branch}
        linkname = GitBlit
        urlencode = false

Using the mounted notation could be dangerous :-(

Luca.

Doug Kelly

unread,
Nov 11, 2013, 11:30:57 AM11/11/13
to repo-d...@googlegroups.com, Jeff


On Monday, November 11, 2013 3:32:32 AM UTC-6, Bruce Zu wrote:
the issue I reported above seems is caused by this loop forever: 


[2013-11-11 10:14:40,292] DEBUG org.apache.wicket.Page : ending request for page [Page class = com.gitblit.wicket.pages.CommitPage, id = 69, version = 0], request [method = GET, protocol = HTTP/1.1, requestURL = http://review-test.sonyericsson.net/plugins/gitblit/commit/, contentType = null, contentLength = -1, contextPath = /plugins/gitblit, pathInfo = gitblit/commit/, requestURI = /plugins/gitblit/commit/, servletPath = /commit/, pathTranslated = /srv/tomcat/webapps/ROOT/gitblit/commit]
[2013-11-11 10:14:40,303] ERROR org.apache.wicket.Session : Exception when detaching/serializing page
java.lang.StackOverflowError
        at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1319)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1171) 
 ...

For what it's worth, this is actually due to some interesting design problems with Wicket and Gitblit.  Wicket tries to serialize all the pages (I believe for caching) once they've displayed, and gitblit stores a *bunch* of information in-scope of what Wicket tries to serialize.   So, you can set something like a 50MB max stack size, and this will (eventually) go away, or you can just ignore it.  We opted for the latter solution, as a HUGE number of refs (i.e. several thousand reviews, maybe?) will also cause Wicket to throw the StackOverflowException.  By using some maven magic (the maven-dependency-plugin), I replaced the part of Wicket that serializes the page and caught the StackOverflowException explicitly and just printed out a warning, so you don't see several hundred lines of backtrace each time it happens.  Really not at all pretty, but hey, it worked!

--Doug

Bruce Zu

unread,
Nov 11, 2013, 10:18:06 PM11/11/13
to repo-d...@googlegroups.com, Bruce Zu, Jeff


On Monday, November 11, 2013 6:03:04 PM UTC+8, lucamilanesio wrote:
Actually the web.mountParameters should always be set to false in the gitblit.properties.
This is due to the lack of repository name with slashes mounted in the Gerrit URL path.

yes I keep the 'web.mountParameters = false' with no touched.  
The correct (and auto-generated) gitweb config should look like:

 
how to make gitblit auto -generate the gitweb config ?

Bruce Zu

unread,
Nov 11, 2013, 10:20:24 PM11/11/13
to repo-d...@googlegroups.com, Jeff
cool! Thanks!  Doug :) I will try.
Reply all
Reply to author
Forward
0 new messages