We have CentOS 5, OpenJDK 1.6 and Tomcat 6.

Every week or two our server fatally crashes with the following output in catalina.out:

Exception while removing reference: java.lang.NullPointerException
java.lang.NullPointerException
        at sun.font.FreetypeFontScaler.disposeNativeScaler(Native Method)
        at sun.font.FreetypeFontScaler.dispose(FreetypeFontScaler.java:167)
        at sun.java2d.Disposer.run(Disposer.java:146)
        at java.lang.Thread.run(Thread.java:636)
Exception while removing reference: java.lang.NullPointerException
java.lang.NullPointerException
        at sun.font.FreetypeFontScaler.disposeNativeScaler(Native Method)
        at sun.font.FreetypeFontScaler.dispose(FreetypeFontScaler.java:167)
        at sun.java2d.Disposer.run(Disposer.java:146)
        at java.lang.Thread.run(Thread.java:636)
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00002aaaab621c28, pid=12911, tid=1158957376
#
# JRE version: 6.0_17-b17
# Java VM: OpenJDK 64-Bit Server VM (14.0-b16 mixed mode linux-amd64 )
# Derivative: IcedTea6 1.7.5
# Distribution: Custom build (Wed Oct 13 13:04:40 EDT 2010)
# Problematic frame:
# J  java.lang.String.getBytes(Ljava/lang/String;)[B
#
# An error report file with more information is saved as:
# /tmp/hs_err_pid12911.log
#
# If you would like to submit a bug report, please include
# instructions how to reproduce the bug and visit:
#   http://icedtea.classpath.org/bugzilla
#

Could someone tell us how should we solve such a problem?

Thanks in advance!

link|improve this question

0% accept rate
what's in /tmp/hs_err_pid12911.log? – James Lawrie Nov 9 '10 at 19:56
Threads, processes, system dump. – Andrey Nov 9 '10 at 20:19
the hs_err should point to a "Library" and a "Current Java thread:" which caused the crash. Can you post those? – JoseK Nov 10 '10 at 5:38
Current thread (0x000000001084a000): JavaThread "Java2D Disposer" daemon [_thread_in_Java, id=14517, stack(0x0000000045044000,0x0000000045145000)] siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x000001000000001c – Andrey Nov 11 '10 at 6:40
The full log can be viewed there: var.imagebook.ru/tmp/hs_err_pid12911.log – Andrey Nov 11 '10 at 6:49
feedback

1 Answer

Usually OpenJDK gives lots of problems. I recommend you to install Sun JDK instead.

  • Download JDK from Oracle/Sun http://www.oracle.com/technetwork/java/javase/downloads/index.html
  • Install it. Note: The installation will be placed wherever you run it. So if you run it form your Desktop, it will be installed there.
  • If you like to use alternatives to add Oracle JDK as default Java program:

    alternatives --install /usr/bin/java java /opt/jdk1.6.0_25/bin/java 2

    alternatives --config java

    Select Oracle/SUN JDK

  • Set JAVA_HOME in your tomcat, edit catalina.sh and add:

    export JAVA_HOME=/opt/jdk1.6.0_25

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.