wellington-junio / gitblit

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

java.util.IllegalFormatConversionException exception using GitBlit 1.6.2 #546

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install the version 1.6.2 of GitBlit Go
2. Enable log4j debug log

What version of the product are you using? On what operating system?
GitBlit 1.6.2 on Windows Server 2008 R2

Please provide any additional information below.
We have seen that with the last version of jetty (jetty-all-9.2.3.v20140905) 
introduced by GitBlit 1.6.1 there is the following error on the class 
org.eclipse.jetty.servlet.DefaultServlet during the normal navigation on the 
web site:

java.util.IllegalFormatConversionException: d != java.lang.String
    at java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4045)
    at java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2748)
    at java.util.Formatter$FormatSpecifier.print(Formatter.java:2702)
    at java.util.Formatter.format(Formatter.java:2488)
    at java.util.Formatter.format(Formatter.java:2423)
    at java.lang.String.format(String.java:2797)
    at org.eclipse.jetty.server.ResourceCache$Content.toString(ResourceCache.java:507)
    at java.util.Formatter$FormatSpecifier.printString(Formatter.java:2838)
    at java.util.Formatter$FormatSpecifier.print(Formatter.java:2718)
    at java.util.Formatter.format(Formatter.java:2488)
    at java.util.Formatter.format(Formatter.java:2423)
    at java.lang.String.format(String.java:2797)
    at org.eclipse.jetty.servlet.DefaultServlet.doGet(DefaultServlet.java:497)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:769)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1667)
    at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:370)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
    at com.gitblit.servlet.EnforceAuthenticationFilter.doFilter(EnforceAuthenticationFilter.java:87)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
    at com.gitblit.servlet.ProxyFilter$1.doFilter(ProxyFilter.java:74)
    at com.gitblit.servlet.ProxyFilter.doFilter(ProxyFilter.java:77)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)
    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:497)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)
    at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:610)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:539)
    at java.lang.Thread.run(Thread.java:745)

"EXCEPTION" is the message logged
Browser-side some css/js/jpg are not downloaded with the following error 
message: Error 500 d != java.lang.String

It is a known issue?
It is possible that the bug is introduced by the following added code? (class 
org.eclipse.jetty.servlet.DefaultServlet)

if (LOG.isDebugEnabled()) {
 LOG.debug(String.format("uri=%s, resource=%s, content=%s", new Object[] { request.getRequestURI(), resource, content }), new Object[0]);
}

Thanks e Regards,
Bottone Danny

Original issue reported on code.google.com by Danny041...@gmail.com on 19 Jan 2015 at 2:44

GoogleCodeExporter commented 9 years ago
That debug call certainly looks suspect.

Original comment by James.Mo...@gmail.com on 19 Jan 2015 at 2:59

GoogleCodeExporter commented 9 years ago

Original comment by James.Mo...@gmail.com on 7 Mar 2015 at 2:56

GoogleCodeExporter commented 9 years ago
Sorry, I specific better the steps for reproduce the problem

What steps will reproduce the problem?
1. Install the version 1.6.2 of GitBlit Go
2. Add log4j file with DEBUG level configured (log4j.properties to use 
attached) under "data" folder
3. Add "-Dlog4j.configuration=file:C:\GitBlit\data\log4j.properties" parameter 
to "Java" tab into gitblitw.exe for override log4j configuration and start the 
service
4. Use https (and http) for access to the GitBlit web application, as you can 
see from the attached screenshot the css style is broken. If you change the 
parameter log4j.rootCategory and log4j.logger.org.apache.wicket from DEBUG to 
INFO all is done on the web pages.

Thanks and regards,
Bottone Danny

Original comment by Danny041...@gmail.com on 10 Mar 2015 at 10:17

Attachments:

GoogleCodeExporter commented 9 years ago
This is a bug in Jetty, not Gitblit.  You could report this upstream or update 
Jetty and see if the issue still exists.

Original comment by James.Mo...@gmail.com on 10 Mar 2015 at 2:15