|
From: Leif M. <le...@ta...> - 2006-11-11 11:36:22
|
Chuck,
From the log everything looks normal. I was thinking though. Is
there any chance that
your jar files are being overwritten due to a redeployment or
something? The java
classloaders will not be able to load from the new jars even if they are
the same things.
I have seen crashes in the past due to this. These are caused by JVM
and unrelated to
the Wrapper.
I often redeploy my apps with ant and sometimes forget to stop the
existing app first.
This can lead to problems like this because the original jar files were
overwritten.
I ask because you are finding the
com.metalincs.analysis.framework.Main. That would
have already been loaded from when the application was loaded. The
inner class in the
stop method would be getting loaded for the first time when the
Main.stop method was
called.
This does not show that classes are being unloaded. But that they
are not able to be
loaded the first time they are referenced.
Hope this helps.
Cheers,
Leif
Chuck Williams wrote:
> Cool, thanks. I didn't realize that would work with wrapper. The way
> I've handled it is to generate wrapper.conf automatically from a
> wrapper.conf.template that contains a marker for where the classpath
> gets inserted. Your way is cleaner!
>
> I've tried a bunch of times but don't yet have the classloading
> failure when running debug. They happen occassionally, once today,
> but before switching on wrapper.debug.
>
> I'll post it when as as it happens.
>
> In case it is helpful, here is the one that happened earlier without
> debug. This was after running the application for a while with no
> problem from the console, then typing control-C:
>
>> STATUS | wrapper | main | 2006/11/05 15:55:06 | INT trapped.
>> Shutting down.
>> INFO | jvm 1 | main | 2006/11/05 15:55:06 | Error in
>> WrapperListener.stop callback. java.lang.NoClassDefFoundError:
>> com/metalincs/analysis/framework/Main$1
>> INFO | jvm 1 | main | 2006/11/05 15:55:06 |
>> java.lang.NoClassDefFoundError: com/metalincs/analysis/framework/Main$1
>> INFO | jvm 1 | main | 2006/11/05 15:55:06 | at
>> com.metalincs.analysis.framework.Main.stop(Main.java:493)
>> INFO | jvm 1 | main | 2006/11/05 15:55:06 | at
>> org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:3134)
>> STATUS | wrapper | main | 2006/11/05 15:55:08 | <-- Wrapper Stopped
>
> Main is the class that implements WrapperListener. Main$1 is an inner
> class containing the Runnable for a thread that is launched to do some
> of the shutdown activity. Here is the method, Main.stop(), Line 493
> is what you'd expect, the first code line of the method, which creates
> an instance of the inner class. (And yes, I know that wrapper can
> accomplish the same thing using the configured shutdown timeout).
>
>> public int stop(int exitCode) {
>>
>> Thread cleanStop = new Thread(new Runnable(){
>> public void run() {
>> ComponentManager.getComponentManager().shutdown();
>> stopHttpServer(bootstrapServer);
>> bootstrapServer = null;
>> if (adminServer!=null) {
>> stopHttpServer(adminServer);
>> adminServer = null;
>> }
>> if (indexServer!=null) {
>> stopHttpServer(indexServer);
>> indexServer = null;
>> }
>> if (searchServer!=null) {
>> stopHttpServer(searchServer);
>> searchServer = null;
>> }
>> }
>> });
>> cleanStop.setDaemon(true);
>> cleanStop.start();
>>
>> try {
>> cleanStop.join(hardRestartTimeout);
>> } catch (InterruptedException e) {
>> throw new RuntimeException(e);
>> }
>> if (cleanStop.isAlive())
>> logger.warn("Hard restarting AnalysisService because soft restart timed out after " + hardRestartTimeout + " millis.");
>>
>> return exitCode;
>> }
>>
|