-
Notifications
You must be signed in to change notification settings - Fork 871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.NoClassDefFoundError: com/hazelcast/util/ExceptionUtil #6701
Comments
ExceptionUtil should be in hazelcast jar. That is strange. |
I see only one hazelcast jar in my classpath: hazelcast-all-3.5.3.jar I do see a com/hazelcast/util/ExceptionUtil.class in the JAR file. I am attaching a log excerpt so that you can better understand the context of the error. |
The problem seems to be in the classpath: please assure you have |
Yes, it's in the classpath for sure. This is a WAR file. The hazelcast jar has the exact same characteristics as all other libraries in the application. |
If you open the Hazelcast jar, can you find the missing class? |
Yes I do see a com/hazelcast/util/ExceptionUtil.class in the hazelcast-all-3.5.3.jar file. |
so that should means that or you don't have hazelcast-all-3.5.3.jar in the classpath when running your app or actually you have it twice. |
I suspected that WebSphere may ship with a version of hazelcast. However, it does not appear to be the case either. Also, my application uses the "parent last" class loading strategy which would use the application libraries when there is a conflict. I have also searched application jars for references to hazelcast: I cleared WebSphere "class cache" and tried to reproduce the issue again. The first error is what I would expect. But then it throws the attached Hazelcast exception stack. Also, although my testing has been light, database replication seems to work just fine otherwise. I can run two instance of my application on separate JVMs, configure their ips in hazelcast.xml and they synchronize beautifully. |
Note that this event also affected my other active node. I had to restart both JVMs to get the database running again. Caused by: |
You have to restart the OrientDB node after that change. However, if a class that exists cannot be found, it's not related to OrientDB, but to your container and your configuration. To prove it, please run OrientDB in standalone mode to see if works. |
Any news on this? |
It's not of an issue with the hazelcast jar not being in the classpath for sure. I verified that. Other than this particular exception condition, data replication works just fine. I have also verified that it is not duplicated in the classpath. I did not try to validate the same condition in "standalone mode". However, I am confident that it won't be an issue under such perfect conditions. Unfortunately, my conditions are different from the "standalone mode". My application runs inside an EJB container which means different classloaders. The hazelcast jar is in the classpath of the ejb classloader. I suspect that hazelcast may be performing some asynchronous method invocation under those particular conditions which might result in a callback under a different classloader scope. I did not have time to test this hypothesis further. |
Since replication worked fine, I'm closing this issue. |
OrientDB Version, operating system, or hardware.
Operating System
Windows Server 2012
WAS 8.5
Expected behavior and actual behavior
I created an error condition assigning two nodes to the same "database" local directory. While I expected an error, what I followed was unexpected. The exception was thrown every few milliseconds in an indefinite loop. Part of the problem seems to be that my hazelcast library does not include the required Exception util.
[9/15/16 16:50:05:058 EDT] 00000a1a ClassicOperat E com.hazelcast.spi.impl.operationexecutor.classic.ClassicOperationExecutor [localhost]:2435 [orientdb] [3.5.3] Failed to process packet: Packet{header=17, isResponse=false, isOperation=true, isEvent=false, partitionId=10, conn=Connection [/127.0.0.1:54033 -> localhost/127.0.0.1:2434], endpoint=Address[localhost]:2434, live=true, type=MEMBER} on hz._hzInstance_1_orientdb.partition-operation.thread-0
java.lang.NoClassDefFoundError: com/hazelcast/util/ExceptionUtil
at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:321)
at com.hazelcast.spi.impl.operationexecutor.classic.OperationThread.processPacket(OperationThread.java:142)
at com.hazelcast.spi.impl.operationexecutor.classic.OperationThread.process(OperationThread.java:115)
at com.hazelcast.spi.impl.operationexecutor.classic.OperationThread.doRun(OperationThread.java:101)
at com.hazelcast.spi.impl.operationexecutor.classic.OperationThread.run(OperationThread.java:76)
[9/15/16 16:50:05:058 EDT] 00000a1b ClassicOperat E com.hazelcast.spi.impl.operationexecutor.classic.ClassicOperationExecutor [localhost]:2435 [orientdb] [3.5.3] Failed to process packet: Packet{header=17, isResponse=false, isOperation=true, isEvent=false, partitionId=11, conn=Connection [/127.0.0.1:54033 -> localhost/127.0.0.1:2434], endpoint=Address[localhost]:2434, live=true, type=MEMBER} on hz._hzInstance_1_orientdb.partition-operation.thread-1
java.lang.NoClassDefFoundError: com/hazelcast/util/ExceptionUtil
at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:321)
at com.hazelcast.spi.impl.operationexecutor.classic.OperationThread.processPacket(OperationThread.java:142)
at com.hazelcast.spi.impl.operationexecutor.classic.OperationThread.process(OperationThread.java:115)
at com.hazelcast.spi.impl.operationexecutor.classic.OperationThread.doRun(OperationThread.java:101)
at com.hazelcast.spi.impl.operationexecutor.classic.OperationThread.run(OperationThread.java:76)
Steps to reproduce the problem
I am running a distributed database embedded in my Java EE application. I am importing the libraries using Maven using the dependencies listed below. Looking at the dependency graph, I expect all hazelcast dependency to come with "orientdb-distributed".
The text was updated successfully, but these errors were encountered: