Have You Seen This Before?

(2008年08月21日)发表于java.blogs Hot Blog Entries

Weiqi Gao's Observations (24 reads)

When I got up, I found my blog down. Tomcat 5.5 on OpenJDK 6 crashed five hours earlier. My first thought was that this was OpenJDK 6's fault. Checking /var/log/tomcat55/catalina_2008-08-20.log, I saw:

2008-08-20 00:31:35,987 [TP-Processor15] INFO  net.sourceforge.pebble.event.resp
onse.SpamScoreListener  - Good site rejected : spam score is 3, threshold is 1
#
# An unexpected error has been detected by Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00002ab5d55c3353, pid=22489, tid=1075845456
#
# Java VM: OpenJDK 64-Bit Server VM (1.6.0_0-b11 mixed mode linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x472353]
#
# An error report file with more information is saved as:
# /tmp/hs_err_pid22489.log
#
# If you would like to submit a bug report, please visit:
#   http://icedtea.classpath.org/bugzilla
#

When I tried to restart Tomcat, it errored out with a peculiar exception:

Using CATALINA_BASE:   /var/lib/tomcat5.5
Using CATALINA_HOME:   /usr/share/tomcat5.5
Using CATALINA_TMPDIR: /var/lib/tomcat5.5/temp
Using JRE_HOME:       /usr/lib/jvm/java-6-openjdk
Using Security Manager
Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: org.apache.commons.logging.LogConfigurationException: java.lang.NoSuc
hMethodError: java.util.logging.LogManager.getStringProperty(Ljava/lang/String;L
java/lang/String;)Ljava/lang/String; (Caused by java.lang.NoSuchMethodError: jav
a.util.logging.LogManager.getStringProperty(Ljava/lang/String;Ljava/lang/String;
)Ljava/lang/String;)
        at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactory
Impl.java:538)
        at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactory
Impl.java:235)
        at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactory
Impl.java:209)
        at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
        at org.apache.catalina.startup.Bootstrap.(Bootstrap.java:53)
Caused by: java.lang.NoSuchMethodError: java.util.logging.LogManager.getStringPr
operty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
        at java.util.logging.StreamHandler.configure(StreamHandler.java:78)
        at java.util.logging.StreamHandler.(StreamHandler.java:94)
        at java.util.logging.ConsoleHandler.(ConsoleHandler.java:88)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
        at java.lang.Class.newInstance0(Class.java:372)
        at java.lang.Class.newInstance(Class.java:325)
        at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLo
gManager.java:397)
        at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLo
gManager.java:341)
        at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLo
gManager.java:236)
        at java.util.logging.LogManager$2.run(LogManager.java:277)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.util.logging.LogManager.readPrimordialConfiguration(LogManager.j
ava:275)
        at java.util.logging.LogManager.getLogManager(LogManager.java:258)
        at java.util.logging.Logger.(Logger.java:238)
        at java.util.logging.LogManager$RootLogger.(LogManager.java:966)
        at java.util.logging.LogManager$RootLogger.(LogManager.java:963)
        at java.util.logging.LogManager$1.run(LogManager.java:198)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.util.logging.LogManager.(LogManager.java:175)
        at java.util.logging.Logger.getLogger(Logger.java:291)
        at org.apache.commons.logging.impl.Jdk14Logger.getLogger(Jdk14Logger.jav
a:152)
        at org.apache.commons.logging.impl.Jdk14Logger.(Jdk14Logger.java:5
3)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
        at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactory
Impl.java:529)
        ... 4 more
Exception in thread "Thread-0" java.lang.NoClassDefFoundError: Could not initial
ize class java.util.logging.LogManager
        at java.util.logging.LogManager$Cleaner.run(LogManager.java:221)
Could not find the main class: org.apache.catalina.startup.Bootstrap. Program wi
ll exit.

Tomcat 5.5 is essentially saying that it could not find the method:

class java.util.logging.LogManager {
  String getStringProperty(String, String);
}

"This can't be good," I said. When I tried to look at the methods in java.util.logging.LogManager with javap, I was surprised to find the following:

[weiqi@gao] $     javap java.util.logging.LogManager
Compiled from "LogManager.java"
public class java.util.logging.LogManager extends java.lang.Object{
    public static final java.lang.String LOGGING_MXBEAN_NAME;
    protected java.util.logging.LogManager();
    public static java.util.logging.LogManager getLogManager();
    public void addPropertyChangeListener(java.beans.PropertyChangeListener) 
   throws java.lang.SecurityException;
    public void removePropertyChangeListener(java.beans.PropertyChangeListener) 
      throws java.lang.SecurityException;
    synchronized java.util.logging.Logger demandLogger(java.lang.String);
    public synchronized boolean addLogger(java.util.logging.Logger);
    public synchronized java.util.logging.Logger getLogger(java.lang.String);
    public synchronized java.util.Enumeration getLoggerNames();
    public void readConfiguration()       throws java.io.IOException, java.lang.
SecurityException;
    public void reset()       throws java.lang.SecurityException;
    public void readConfiguration(java.io.InputStream)       throws java.io.IOEx
ception, java.lang.SecurityException;
    public java.lang.String getProperty(java.lang.String);
    java.lang.StRing getStringProperty(java.lang.String, java.lang.String);
    int getIntProperty(java.lang.String, int);
    boolean getBooleanProperty(java.lang.String, boolean);
    java.util.logging.Level getLevelProperty(java.lang.String, java.util.logging
.Level);
    java.util.logging.Filter getFilterProperty(java.lang.String, java.util.loggi
ng.Filter);
    java.util.logging.Formatter getFormatterProperty(java.lang.String, java.util
.logging.Formatter);
    public void checkAccess()       throws java.lang.SecurityException;
    public static synchronized java.util.logging.LoggingMXBean getLoggingMXBean(
);
    static java.util.logging.LogManager access$002(java.util.logging.LogManager)
;
    static java.util.logging.LogManager access$000();
    static java.util.logging.Logger access$102(java.util.logging.LogManager, jav
a.util.logging.Logger);
    static java.util.logging.Logger access$100(java.util.logging.LogManager);
    static boolean access$302(java.util.logging.LogManager, boolean);
    static boolean access$402(java.util.logging.LogManager, boolean);
    static java.lang.String[] access$600(java.util.logging.LogManager, java.lang
.String);
    static void access$700(java.util.logging.Logger, java.util.logging.Logger);
    static java.util.logging.Level access$800();
    static void access$900(java.util.logging.LogManager);
    static {};
}

No wonder Tomcat 5.5 can't find the method! The methods return type was all messed up. Time for a reboot. When I reboot, Debian threw up some message on the console which essentially said "can't do it, pal, you need to press the reset button."

After pressing the reset button, Tomcat 5.5 start up OK.

The point of this post? There are no points. I just feel that this is peculiar. It's one of those situations where a reboot "fixed" the problem. Something is wrong in this box. But I don't know what it is. I'll just have to wait until the problem recurs in the future.

If you have dealt with such problems before, I would be glad to hear your opinions.

阅读全文...
本站相关内容:

Have you seen the Batman? (评论: The Dark Knight)

Kyd评论: The Dark Knight (http://www.douban.com/subject/1851857/) 评价: 力荐 当布什的空军一号抵达北京时,布什下了飞机,对中国外交部长杨洁篪的第一句话就是:have you seen the batman?你看过蝙蝠侠了没?布什还连问了2遍。显然使得对好莱坞大片从不关心的杨洁篪有些措手不及。一句“Next Time(下次再看)”蒙混过关。今年7月18日上映的《蝙蝠侠:黑暗骑士》如今已在北美席...

Dear Digg: Girl Missing. Have You Seen Her?

Ok, so a friend of mine tipped me on to this. If you've got any information, it'd be hugely appreciated.

互联网相关内容:
Have you seen Lambo? (2007年12月15日)
Have You Seen This Cat? (2008年10月21日)
You Haven't Seen Any Pan Flute Bands Have You? (2008年10月31日)
Have you seen the Batman? (评论: The Dark Knight) (2008年08月10日)
Dear Digg: Girl Missing. Have You Seen Her? (2008年10月15日)
VID - Have you ever seen a Cuttlefish Use it's Camouflage? (2008年11月10日)
Oriental Gallery - Oriental Design Inspiration, We Show Websites Design You Have Never Seen (2008年01月15日)
Geek Army: Cool - 25 Unbelievable Pictures You May Have Never Seen Before Part 1 (2008年06月10日)
I have seen the future of CMDBf (2008年05月21日)