Java 5 classloader not making static calls.

A

Adam Maass

Stefan Schulz said:
An ExceptionInInitializerError gets thrown

That's the immediate effect, yes, but I've seen that Error logged to a log
file and the rest of system just go blithely on until some other Throwable
gets raised -- typically a NoClassDefFoundError or some such. Those are
blazingly hard to debug.

-- Adam Maass
 
S

Stefan Schulz

Adam said:
That's the immediate effect, yes, but I've seen that Error logged to a log
file and the rest of system just go blithely on until some other Throwable
gets raised -- typically a NoClassDefFoundError or some such. Those are
blazingly hard to debug.

Those should not happen. Anyone just logging and discarding an Error
should be drawn and quartered. An Error means something went so majorly
wrong that the system can't be expected to recover. Okay, so sometimes
this might not be true, and sometimes, it might be possibly to at least
fail gracefully. But just discarding one is about the worst thing you
can do.
 
A

Adam Maass

Stefan Schulz said:
Those should not happen. Anyone just logging and discarding an Error
should be drawn and quartered. An Error means something went so majorly
wrong that the system can't be expected to recover. Okay, so sometimes
this might not be true, and sometimes, it might be possibly to at least
fail gracefully. But just discarding one is about the worst thing you
can do.

This is Tomcat, at least in some of its 4.1.x incarnations.

The problem is partly due to the notion of multiple webapps residing in the
same servlet container -- if one of them raises ExceptionInInitializerError,
that one webapp is bad, but does not imply that the whole JVM instance is
bad. Therefore, the JVM itself does not shut down. Webapps (can) have
multiple initialization hooks, so if one part of it raises
ExceptionInInitializerError, in principle, the other parts might still
successfully initialize and run. Of course, that generally isn't the case...

I wonder if the Tomcat 5 series have addressed this any better... I'll have
to go check....

-- Adam Maass
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,123
Latest member
Layne6498
Top