Opened 8 years ago

Closed 8 years ago

#915 closed defect (not a bug)

error when opening graphs page in 0.9.5-4

Reported by: DISABLED Owned by:
Priority: minor Milestone: 0.9.6
Component: apps/console Version: 0.9.5
Keywords: Cc:
Parent Tickets: Sensitive: no

Description (last modified by zzz)

Error 500: /viewstat.jsp Server Error

     at sun.awt.X11FontManager.getDefaultPlatformFont(
     at sun.font.SunFontManager$
     at Method)
     at sun.font.SunFontManager.<init>(
     at sun.awt.X11FontManager.<init>(
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
     at java.lang.reflect.Constructor.newInstance(
     at java.lang.Class.newInstance0(
     at java.lang.Class.newInstance(
     at sun.font.FontManagerFactory$
     at Method)
     at sun.font.FontManagerFactory.getInstance(
     at java.awt.Font.getFont2D(
     at java.awt.Font.access$000(
     at java.awt.Font$FontAccessImpl.getFont2D(
     at sun.font.FontUtilities.getFont2D(
     at sun.font.StandardGlyphVector.initFontData(
     at sun.font.StandardGlyphVector.init(
     at sun.font.StandardGlyphVector.<init>(
     at java.awt.Font.getStringBounds(
     at java.awt.Font.getStringBounds(
     at java.awt.Font.getStringBounds(
     at org.jrobin.graph.ImageWorker.getStringWidth(Unknown Source)
     at org.jrobin.graph.RrdGraph.getSmallFontCharWidth(Unknown Source)
     at org.jrobin.graph.RrdGraph.initializeLimits(Unknown Source)
     at org.jrobin.graph.RrdGraph.createGraph(Unknown Source)
     at org.jrobin.graph.RrdGraph.<init>(Unknown Source)
     at net.i2p.router.web.SummaryRenderer.render(
     at net.i2p.router.web.SummaryListener.renderPng(
     at net.i2p.router.web.SummaryListener.renderPng(
     at net.i2p.router.web.StatSummarizer.locked_renderPng(
     at net.i2p.router.web.StatSummarizer.renderPng(
     at net.i2p.router.web.jsp.viewstat_jsp._jspService(
     at org.apache.jasper.runtime.HttpJspBase.service(
     at javax.servlet.http.HttpServlet.service(
     at org.eclipse.jetty.servlet.ServletHolder.handle(
     at org.eclipse.jetty.servlet.ServletHandler.doHandle(
     at org.eclipse.jetty.server.handler.ScopedHandler.handle(
     at org.eclipse.jetty.server.session.SessionHandler.doHandle(
     at org.eclipse.jetty.server.handler.ContextHandler.doHandle(
     at org.eclipse.jetty.servlet.ServletHandler.doScope(
     at org.eclipse.jetty.server.session.SessionHandler.doScope(
     at org.eclipse.jetty.server.handler.ContextHandler.doScope(
     at org.eclipse.jetty.server.handler.ScopedHandler.handle(
     at org.eclipse.jetty.server.handler.HandlerWrapper.handle(
     at net.i2p.router.web.LocaleWebAppHandler.handle(
     at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(
     at org.eclipse.jetty.server.handler.HandlerCollection.handle(
     at org.eclipse.jetty.server.handler.HandlerWrapper.handle(
     at org.eclipse.jetty.server.Server.handle(
     at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(
     at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(
     at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(
     at org.eclipse.jetty.http.HttpParser.parseNext(
     at org.eclipse.jetty.http.HttpParser.parseAvailable(
     at org.eclipse.jetty.server.AsyncHttpConnection.handle(
     at java.util.concurrent.ThreadPoolExecutor.runWorker(
     at java.util.concurrent.ThreadPoolExecutor$

I2P version: 0.9.5-4
Java version: Oracle Corporation 1.7.0 (OpenJDK Runtime Environment 1.7.0-root_2011_12_03_14_00-b00)
Wrapper version: 3.5.15
Server version: 7.6.10.v20130312
Servlet version: Jasper JSP 2.1 Engine
Platform: FreeBSD i386 9.1-RELEASE
Processor: Athlon (Thoroughbred) (athlon)
Jbigi: Locally optimized native BigInteger library loaded from file
Encoding: US-ASCII
Charset: US-ASCII


Change History (3)

comment:1 Changed 8 years ago by zzz

Component: unspecifiedapps/console
Description: modified (diff)

I thought it might be related to my recent work on ticket #890 - but no.

A quick search shows that it's caused by a missing font package, together with Oracle's refusal to throw a decent error message instead of an NPE. Please investigate and see if you can install a font package that will fix it. Please report results.

Links and quotes:

I seen this failure on 32bit OpenJDK/IcedTea installed on 64bit system.
The problem was caused by wrong architecture (i386/x86_64) of libfreetype
library. If you have 32bit JDK @ 64bit RHEL, please make sure the
libfreetype is 32bit/i386 too.

dditional info:

The workaround is to install any font package, for example:

# yum install dejavu-sans-fonts

After that fc-list will detect the new fonts and the Java program will run correctly (if given a correct .ttf file).

add the fontconfig package…

On my fedora 17 64Bit machine, I had OpenJDK 1.7 installed and I yum installed Jenkins which was having the same issue. Setting up -Djava.awt.headless=true did not help.

Finally found a solution.

Believe it or not, it was actually just a matter of installing ttf-dejavu font!

Finally solved the issue by installing dejavu-sans-fonts:

yum install dejavu-sans-fonts

comment:2 Changed 8 years ago by zzz

Catch the NPE in 0.9.5-7 rev d2d54890899eebb887fecc8231243b0f405563b5 .

This will still spew errors in the log the first time you load the graphs page. But after that the graph generation will be disabled until restart.

comment:3 Changed 8 years ago by zzz

Resolution: not a bug
Status: newclosed

Closing with the workaround above, but it's really a java bug.

Note: See TracTickets for help on using tickets.