Shutdown thread error, classDefNotFound

101 views
Skip to first unread message

bitfinfo

unread,
Feb 7, 2012, 12:37:03 PM2/7/12
to Hazelcast
Hi,
We have tried our own shutdown hook and tried using HZ's built in
shutdown hook and consistently see this:

2012-02-07 12:25:08,041 ERROR [STDERR] Exception in thread
"Thread-160" java.lang.NoClassDefFoundError: com/hazelcast/impl/
ClientService$Worker$1
2012-02-07 12:25:08,042 ERROR [STDERR] at
com.hazelcast.impl.ClientService$Worker.stop(ClientService.java:211)
2012-02-07 12:25:08,042 ERROR [STDERR] at
com.hazelcast.impl.ClientService.shutdown(ClientService.java:173)
2012-02-07 12:25:08,042 ERROR [STDERR] at
com.hazelcast.impl.Node.shutdown(Node.java:346)
2012-02-07 12:25:08,042 ERROR [STDERR] at
com.hazelcast.impl.Node.shutdown(Node.java:323)
2012-02-07 12:25:08,042 ERROR [STDERR] at
com.hazelcast.impl.FactoryImpl.shutdown(FactoryImpl.java:308)
2012-02-07 12:25:08,042 ERROR [STDERR] at
com.hazelcast.impl.LifecycleServiceImpl.shutdown(LifecycleServiceImpl.java:
105)
2012-02-07 12:25:08,042 ERROR [STDERR] at
com.hazelcast.impl.FactoryImpl.shutdown(FactoryImpl.java:486)
2012-02-07 12:25:08,042 ERROR [STDERR] at
com.hazelcast.impl.FactoryImpl.shutdownAll(FactoryImpl.java:291)
2012-02-07 12:25:08,042 ERROR [STDERR] at
com.hazelcast.core.Hazelcast.shutdownAll(Hazelcast.java:327)
2012-02-07 12:25:08,042 ERROR [STDERR] at
com.mypackage.concurrency.hazelcast.HazelcastLockProvider
$HazelcastShutdownHook.run(HazelcastLockProvider.java:438)
2012-02-07 12:25:08,042 ERROR [STDERR] at
java.lang.Thread.run(Thread.java:662)
2012-02-07 12:25:08,042 ERROR [STDERR] Caused by:
java.lang.ClassNotFoundException: Failed to load class
com.hazelcast.impl.ClientService$Worker$1
2012-02-07 12:25:08,042 ERROR [STDERR] at
org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoaderManager.java:
181)
2012-02-07 12:25:08,042 ERROR [STDERR] at
org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:
280)
2012-02-07 12:25:08,042 ERROR [STDERR] at
org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:
1172)
2012-02-07 12:25:08,042 ERROR [STDERR] at
org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:
886)
2012-02-07 12:25:08,043 ERROR [STDERR] at
org.jboss.classloader.spi.base.BaseClassLoader.doLoadClass(BaseClassLoader.java:
505)
2012-02-07 12:25:08,043 ERROR [STDERR] at
org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:
450)
2012-02-07 12:25:08,043 ERROR [STDERR] at
java.lang.ClassLoader.loadClass(ClassLoader.java:248)
2012-02-07 12:25:08,043 ERROR [STDERR] ... 11 more

bitfinfo

unread,
Feb 9, 2012, 10:52:32 AM2/9/12
to Hazelcast
Anyone have any ideas on this and why it fails?

Chris

unread,
Feb 9, 2012, 12:32:39 PM2/9/12
to Hazelcast
How are you calling the shutdown?

bitsof...@gmail.com

unread,
Feb 15, 2012, 5:22:01 PM2/15/12
to haze...@googlegroups.com
We tried calling it via Hazelcast's own "shutdown thread" and got this error. Then we tried our own Shutdown thread that just calls Hazelcast.shutdownAll() and same thing.

In addition to this kind of error, we have code that will detect a condition where hazelcast is not initialized. The code does a Hazelcast.shutdownAll(). The most bothersome thing about this is that sometimes (not all the time) when this is called, after the call we start getting tons of other ClassDefNotFoundExceptions, even for things like "javax/mail/Messaging" when other unrelated code executes. Almost like calling shutdownAll somehow affects our entire classloader, messing up the entire application. 

Any assistance appreciated.

bitsof...@gmail.com

unread,
Feb 15, 2012, 5:54:04 PM2/15/12
to haze...@googlegroups.com
Also can someone clarify the difference between hazelcastInstance.shutdown() or hazelcastInstance.getLifecycleService().shutdown and just Hazelcast.shutdownAll(). What is bothersome is that after a Hazelcast.shutdownAll() we cannot do a Hazelcast.init() against our conf file. Because the conf file (in our jar on the classpath) cannot be found after a shutdownAll(), (in addition to other ClassDefNotFoundExceptions for other classes)

Mehmet Dogan

unread,
Feb 16, 2012, 9:47:00 AM2/16/12
to haze...@googlegroups.com
hazelcastInstance.shutdown() is deprecated and calls hazelcastInstance.getLifecycleService().shutdown() inside.

hazelcastInstance.getLifecycleService().shutdown() shutdowns current HazelcastInstance.
 
Hazelcast.shutdownAll() shutdowns all HazelcastInstances created inside current JVM/Classloader.


@mmdogan




On Thu, Feb 16, 2012 at 12:54 AM, <bitsof...@gmail.com> wrote:
Also can someone clarify the difference between hazelcastInstance.shutdown() or hazelcastInstance.getLifecycleService().shutdown and just Hazelcast.shutdownAll(). What is bothersome is that after a Hazelcast.shutdownAll() we cannot do a Hazelcast.init() against our conf file. Because the conf file (in our jar on the classpath) cannot be found after a shutdownAll(), (in addition to other ClassDefNotFoundExceptions for other classes)

--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To view this discussion on the web visit https://groups.google.com/d/msg/hazelcast/-/WpI25hrQUB8J.

To post to this group, send email to haze...@googlegroups.com.
To unsubscribe from this group, send email to hazelcast+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/hazelcast?hl=en.

Reply all
Reply to author
Forward
0 new messages