thusharaK thusharaK -4 years ago 70
Java Question

ClassNotFoundException: org.objectweb.jotm.SubCoordinator_Stub

I'm getting below JOTM exception in my application log. I didn't found any functionality that brakes due to this. I tried to figure out from where it is starting and end up finding 0 custom codes that start this error. Other than that I tried replacing jotm jar(
) from the lib directory(
project) but I still could not get rid of this error. Is there anybody who had a same or similar kind of a stack trace before and overcome it?

Kindly share any useful thought to get rid of this error message.

2017-02-16 14:41:56,524 [] - TransactionImpl.timeoutExpired
DEBUG [JotmBatch] ( - make subcoordinator
2017-02-16 14:41:56,524 [] - make subcoordinator
ERROR [JotmBatch] ( - new SubCoordinator raised exception:
java.rmi.StubNotFoundException: Stub class not found: org.objectweb.jotm.SubCoordinator_Stub; nested exception is:
java.lang.ClassNotFoundException: org.objectweb.jotm.SubCoordinator_Stub
at sun.rmi.server.Util.createStub(
at sun.rmi.server.Util.createProxy(
at sun.rmi.server.UnicastServerRef.exportObject(
at sun.rmi.server.UnicastServerRef.exportObject(
at org.objectweb.carol.rmi.jrmp.server.JUnicastServerRef.exportObject(
at org.objectweb.carol.rmi.jrmp.server.JUnicastRemoteObject.exportObjectR(
at org.objectweb.carol.rmi.jrmp.server.JUnicastRemoteObject.exportObject(
at org.objectweb.carol.rmi.multi.JrmpPRODelegate.exportObject(
at org.objectweb.carol.rmi.multi.MultiPRODelegate.exportObject(
at javax.rmi.PortableRemoteObject.exportObject(
at javax.rmi.PortableRemoteObject.<init>(
at org.objectweb.jotm.SubCoordinator.<init>(
at org.objectweb.jotm.TransactionImpl.makeSubCoord(
at org.objectweb.jotm.TransactionImpl.timeoutExpired(
at org.objectweb.jotm.TimerEvent.process(
at org.objectweb.jotm.TimerManager.batch(
Caused by: java.lang.ClassNotFoundException: org.objectweb.jotm.SubCoordinator_Stub
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(
at sun.rmi.server.Util.createStub(
... 16 more

Answer Source

It is hard to figure out the exact reasons but ClassNotFoundException most likely means that runtime dependencies of your project are not configured properly. Some library code tries to load the class by its name but the class is not in the classpath.

The next steps will help to solve it:

1) Find the jar which contains SubCoordinator_Stub and makes sure this jar is included to runtime dependencies of your project.

2) If the first option is already done but it does not help you might probably have different ClassLoaders in your application. Figure out which one is used to load the class and try to understand why doesn't it have the dependency.

Final Answer: The missing jar was jotm-core.jar which is easily can be found using a google search. However, I missed this because I thought jotm is the standalone library which includes all the things, which is wrong.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download