Hazelcast Spring Boot java.lang.ClassNotFoundException
up vote
-3
down vote
favorite
I am starting hazelcast instance in my spring boot application.
Hazelcast configuration
@Configuration
@EnableCaching
public class HazelcastConfig
@Bean
public Config hazelCastConfig()
final Config config = new Config();
config.setClassLoader(getClass().getClassLoader());
config.setInstanceName("cache");
return config;
@Bean
public HazelcastInstance hazelcastInstance()
return Hazelcast.newHazelcastInstance(hazelCastConfig());
And it fails time to time with class not found exception when I call my HTTP endpoint that queries data from hazelcast Map.
java.lang.ClassNotFoundException: com.someOrg.SomeClass
at org.springframework.boot.web.embedded.tomcat.TomcatEmbeddedWebappClassLoader.loadClass(TomcatEmbeddedWebappClassLoader.java:70) ~[spring-boot-2.0.5.RELEASE.jar!/:2.0.5.RELEASE]
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1137) ~[tomcat-embed-core-8.5.34.jar!/:8.5.34]
at com.hazelcast.nio.ClassLoaderUtil.tryLoadClass(ClassLoaderUtil.java:173) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.nio.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:147) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.nio.IOUtil$ClassLoaderAwareObjectInputStream.resolveClass(IOUtil.java:593) ~[hazelcast-3.9.4.jar!/:3.9.4]
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1826) ~[na:1.8.0_131]
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1713) ~[na:1.8.0_131]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2000) ~[na:1.8.0_131]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1535) ~[na:1.8.0_131]
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:422) ~[na:1.8.0_131]
at com.hazelcast.internal.serialization.impl.JavaDefaultSerializers$JavaSerializer.read(JavaDefaultSerializers.java:79) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.internal.serialization.impl.JavaDefaultSerializers$JavaSerializer.read(JavaDefaultSerializers.java:72) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.internal.serialization.impl.StreamSerializerAdapter.read(StreamSerializerAdapter.java:48) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.internal.serialization.impl.AbstractSerializationService.toObject(AbstractSerializationService.java:191) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.query.impl.CachedQueryEntry.getValue(CachedQueryEntry.java:75) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.query.impl.CachedQueryEntry.getTargetObject(CachedQueryEntry.java:108) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.query.impl.QueryableEntry.extractAttributeValue(QueryableEntry.java:81) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.query.impl.QueryableEntry.getAttributeValue(QueryableEntry.java:48) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.query.impl.predicates.AbstractPredicate.readAttributeValue(AbstractPredicate.java:132) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.query.impl.predicates.AbstractPredicate.apply(AbstractPredicate.java:57) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.query.PredicateBuilder.apply(PredicateBuilder.java:51) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.map.impl.query.PartitionScanRunner.run(PartitionScanRunner.java:97) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.map.impl.query.CallerRunsPartitionScanExecutor.execute(CallerRunsPartitionScanExecutor.java:42) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.map.impl.query.QueryRunner.runPartitionScanQueryOnGivenOwnedPartition(QueryRunner.java:172) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.map.impl.query.QueryPartitionOperation.run(QueryPartitionOperation.java:55) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:194) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:409) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.process(OperationThread.java:115) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.run(OperationThread.java:100) ~[hazelcast-3.9.4.jar!/:3.9.4]
Tried with config.setClassLoader(getClass().getClassLoader());
in hazelcast configuration class and without it - it fails after some time with the same ClassNotFoundException issue.
Why hazelcast fails with this issue and how to fix it ?
java spring-boot hazelcast
|
show 1 more comment
up vote
-3
down vote
favorite
I am starting hazelcast instance in my spring boot application.
Hazelcast configuration
@Configuration
@EnableCaching
public class HazelcastConfig
@Bean
public Config hazelCastConfig()
final Config config = new Config();
config.setClassLoader(getClass().getClassLoader());
config.setInstanceName("cache");
return config;
@Bean
public HazelcastInstance hazelcastInstance()
return Hazelcast.newHazelcastInstance(hazelCastConfig());
And it fails time to time with class not found exception when I call my HTTP endpoint that queries data from hazelcast Map.
java.lang.ClassNotFoundException: com.someOrg.SomeClass
at org.springframework.boot.web.embedded.tomcat.TomcatEmbeddedWebappClassLoader.loadClass(TomcatEmbeddedWebappClassLoader.java:70) ~[spring-boot-2.0.5.RELEASE.jar!/:2.0.5.RELEASE]
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1137) ~[tomcat-embed-core-8.5.34.jar!/:8.5.34]
at com.hazelcast.nio.ClassLoaderUtil.tryLoadClass(ClassLoaderUtil.java:173) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.nio.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:147) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.nio.IOUtil$ClassLoaderAwareObjectInputStream.resolveClass(IOUtil.java:593) ~[hazelcast-3.9.4.jar!/:3.9.4]
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1826) ~[na:1.8.0_131]
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1713) ~[na:1.8.0_131]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2000) ~[na:1.8.0_131]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1535) ~[na:1.8.0_131]
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:422) ~[na:1.8.0_131]
at com.hazelcast.internal.serialization.impl.JavaDefaultSerializers$JavaSerializer.read(JavaDefaultSerializers.java:79) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.internal.serialization.impl.JavaDefaultSerializers$JavaSerializer.read(JavaDefaultSerializers.java:72) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.internal.serialization.impl.StreamSerializerAdapter.read(StreamSerializerAdapter.java:48) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.internal.serialization.impl.AbstractSerializationService.toObject(AbstractSerializationService.java:191) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.query.impl.CachedQueryEntry.getValue(CachedQueryEntry.java:75) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.query.impl.CachedQueryEntry.getTargetObject(CachedQueryEntry.java:108) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.query.impl.QueryableEntry.extractAttributeValue(QueryableEntry.java:81) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.query.impl.QueryableEntry.getAttributeValue(QueryableEntry.java:48) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.query.impl.predicates.AbstractPredicate.readAttributeValue(AbstractPredicate.java:132) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.query.impl.predicates.AbstractPredicate.apply(AbstractPredicate.java:57) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.query.PredicateBuilder.apply(PredicateBuilder.java:51) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.map.impl.query.PartitionScanRunner.run(PartitionScanRunner.java:97) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.map.impl.query.CallerRunsPartitionScanExecutor.execute(CallerRunsPartitionScanExecutor.java:42) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.map.impl.query.QueryRunner.runPartitionScanQueryOnGivenOwnedPartition(QueryRunner.java:172) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.map.impl.query.QueryPartitionOperation.run(QueryPartitionOperation.java:55) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:194) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:409) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.process(OperationThread.java:115) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.run(OperationThread.java:100) ~[hazelcast-3.9.4.jar!/:3.9.4]
Tried with config.setClassLoader(getClass().getClassLoader());
in hazelcast configuration class and without it - it fails after some time with the same ClassNotFoundException issue.
Why hazelcast fails with this issue and how to fix it ?
java spring-boot hazelcast
How do you usecom.someOrg.SomeClass
? Is it an entry, EntryProcessor, Listener, etc. class?
– Alparslan Avci
12 hours ago
It is simple POJO:Collection<SomeClass> o = map.values(getPredicate());
– Daryl
12 hours ago
when you say it fails time to time, do you imply every time you query or occasionally? What else changes on server side? That error simply means that the class definition does not exist on Hazelcast's class path. So the most important thing for you to figure out is the reason why com.someOrg.SomeClass is not on class path.
– wildnez
12 hours ago
I have a docker image and when I deploy it and call HTTP API - I can reproduce 2 options here: 1. it can work all the time until redeploy; 2. it can fail all the time until redeploy. It is simple Spring Boot app without any additional logic with class loading, etc. (hazelcast cluster with 1 member only)
– Daryl
11 hours ago
But need to mention, the issue is rarely reproduced. Almost always it works well.
– Daryl
11 hours ago
|
show 1 more comment
up vote
-3
down vote
favorite
up vote
-3
down vote
favorite
I am starting hazelcast instance in my spring boot application.
Hazelcast configuration
@Configuration
@EnableCaching
public class HazelcastConfig
@Bean
public Config hazelCastConfig()
final Config config = new Config();
config.setClassLoader(getClass().getClassLoader());
config.setInstanceName("cache");
return config;
@Bean
public HazelcastInstance hazelcastInstance()
return Hazelcast.newHazelcastInstance(hazelCastConfig());
And it fails time to time with class not found exception when I call my HTTP endpoint that queries data from hazelcast Map.
java.lang.ClassNotFoundException: com.someOrg.SomeClass
at org.springframework.boot.web.embedded.tomcat.TomcatEmbeddedWebappClassLoader.loadClass(TomcatEmbeddedWebappClassLoader.java:70) ~[spring-boot-2.0.5.RELEASE.jar!/:2.0.5.RELEASE]
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1137) ~[tomcat-embed-core-8.5.34.jar!/:8.5.34]
at com.hazelcast.nio.ClassLoaderUtil.tryLoadClass(ClassLoaderUtil.java:173) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.nio.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:147) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.nio.IOUtil$ClassLoaderAwareObjectInputStream.resolveClass(IOUtil.java:593) ~[hazelcast-3.9.4.jar!/:3.9.4]
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1826) ~[na:1.8.0_131]
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1713) ~[na:1.8.0_131]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2000) ~[na:1.8.0_131]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1535) ~[na:1.8.0_131]
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:422) ~[na:1.8.0_131]
at com.hazelcast.internal.serialization.impl.JavaDefaultSerializers$JavaSerializer.read(JavaDefaultSerializers.java:79) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.internal.serialization.impl.JavaDefaultSerializers$JavaSerializer.read(JavaDefaultSerializers.java:72) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.internal.serialization.impl.StreamSerializerAdapter.read(StreamSerializerAdapter.java:48) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.internal.serialization.impl.AbstractSerializationService.toObject(AbstractSerializationService.java:191) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.query.impl.CachedQueryEntry.getValue(CachedQueryEntry.java:75) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.query.impl.CachedQueryEntry.getTargetObject(CachedQueryEntry.java:108) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.query.impl.QueryableEntry.extractAttributeValue(QueryableEntry.java:81) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.query.impl.QueryableEntry.getAttributeValue(QueryableEntry.java:48) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.query.impl.predicates.AbstractPredicate.readAttributeValue(AbstractPredicate.java:132) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.query.impl.predicates.AbstractPredicate.apply(AbstractPredicate.java:57) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.query.PredicateBuilder.apply(PredicateBuilder.java:51) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.map.impl.query.PartitionScanRunner.run(PartitionScanRunner.java:97) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.map.impl.query.CallerRunsPartitionScanExecutor.execute(CallerRunsPartitionScanExecutor.java:42) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.map.impl.query.QueryRunner.runPartitionScanQueryOnGivenOwnedPartition(QueryRunner.java:172) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.map.impl.query.QueryPartitionOperation.run(QueryPartitionOperation.java:55) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:194) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:409) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.process(OperationThread.java:115) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.run(OperationThread.java:100) ~[hazelcast-3.9.4.jar!/:3.9.4]
Tried with config.setClassLoader(getClass().getClassLoader());
in hazelcast configuration class and without it - it fails after some time with the same ClassNotFoundException issue.
Why hazelcast fails with this issue and how to fix it ?
java spring-boot hazelcast
I am starting hazelcast instance in my spring boot application.
Hazelcast configuration
@Configuration
@EnableCaching
public class HazelcastConfig
@Bean
public Config hazelCastConfig()
final Config config = new Config();
config.setClassLoader(getClass().getClassLoader());
config.setInstanceName("cache");
return config;
@Bean
public HazelcastInstance hazelcastInstance()
return Hazelcast.newHazelcastInstance(hazelCastConfig());
And it fails time to time with class not found exception when I call my HTTP endpoint that queries data from hazelcast Map.
java.lang.ClassNotFoundException: com.someOrg.SomeClass
at org.springframework.boot.web.embedded.tomcat.TomcatEmbeddedWebappClassLoader.loadClass(TomcatEmbeddedWebappClassLoader.java:70) ~[spring-boot-2.0.5.RELEASE.jar!/:2.0.5.RELEASE]
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1137) ~[tomcat-embed-core-8.5.34.jar!/:8.5.34]
at com.hazelcast.nio.ClassLoaderUtil.tryLoadClass(ClassLoaderUtil.java:173) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.nio.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:147) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.nio.IOUtil$ClassLoaderAwareObjectInputStream.resolveClass(IOUtil.java:593) ~[hazelcast-3.9.4.jar!/:3.9.4]
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1826) ~[na:1.8.0_131]
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1713) ~[na:1.8.0_131]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2000) ~[na:1.8.0_131]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1535) ~[na:1.8.0_131]
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:422) ~[na:1.8.0_131]
at com.hazelcast.internal.serialization.impl.JavaDefaultSerializers$JavaSerializer.read(JavaDefaultSerializers.java:79) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.internal.serialization.impl.JavaDefaultSerializers$JavaSerializer.read(JavaDefaultSerializers.java:72) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.internal.serialization.impl.StreamSerializerAdapter.read(StreamSerializerAdapter.java:48) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.internal.serialization.impl.AbstractSerializationService.toObject(AbstractSerializationService.java:191) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.query.impl.CachedQueryEntry.getValue(CachedQueryEntry.java:75) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.query.impl.CachedQueryEntry.getTargetObject(CachedQueryEntry.java:108) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.query.impl.QueryableEntry.extractAttributeValue(QueryableEntry.java:81) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.query.impl.QueryableEntry.getAttributeValue(QueryableEntry.java:48) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.query.impl.predicates.AbstractPredicate.readAttributeValue(AbstractPredicate.java:132) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.query.impl.predicates.AbstractPredicate.apply(AbstractPredicate.java:57) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.query.PredicateBuilder.apply(PredicateBuilder.java:51) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.map.impl.query.PartitionScanRunner.run(PartitionScanRunner.java:97) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.map.impl.query.CallerRunsPartitionScanExecutor.execute(CallerRunsPartitionScanExecutor.java:42) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.map.impl.query.QueryRunner.runPartitionScanQueryOnGivenOwnedPartition(QueryRunner.java:172) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.map.impl.query.QueryPartitionOperation.run(QueryPartitionOperation.java:55) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:194) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:409) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.process(OperationThread.java:115) ~[hazelcast-3.9.4.jar!/:3.9.4]
at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.run(OperationThread.java:100) ~[hazelcast-3.9.4.jar!/:3.9.4]
Tried with config.setClassLoader(getClass().getClassLoader());
in hazelcast configuration class and without it - it fails after some time with the same ClassNotFoundException issue.
Why hazelcast fails with this issue and how to fix it ?
java spring-boot hazelcast
java spring-boot hazelcast
asked 12 hours ago
Daryl
351415
351415
How do you usecom.someOrg.SomeClass
? Is it an entry, EntryProcessor, Listener, etc. class?
– Alparslan Avci
12 hours ago
It is simple POJO:Collection<SomeClass> o = map.values(getPredicate());
– Daryl
12 hours ago
when you say it fails time to time, do you imply every time you query or occasionally? What else changes on server side? That error simply means that the class definition does not exist on Hazelcast's class path. So the most important thing for you to figure out is the reason why com.someOrg.SomeClass is not on class path.
– wildnez
12 hours ago
I have a docker image and when I deploy it and call HTTP API - I can reproduce 2 options here: 1. it can work all the time until redeploy; 2. it can fail all the time until redeploy. It is simple Spring Boot app without any additional logic with class loading, etc. (hazelcast cluster with 1 member only)
– Daryl
11 hours ago
But need to mention, the issue is rarely reproduced. Almost always it works well.
– Daryl
11 hours ago
|
show 1 more comment
How do you usecom.someOrg.SomeClass
? Is it an entry, EntryProcessor, Listener, etc. class?
– Alparslan Avci
12 hours ago
It is simple POJO:Collection<SomeClass> o = map.values(getPredicate());
– Daryl
12 hours ago
when you say it fails time to time, do you imply every time you query or occasionally? What else changes on server side? That error simply means that the class definition does not exist on Hazelcast's class path. So the most important thing for you to figure out is the reason why com.someOrg.SomeClass is not on class path.
– wildnez
12 hours ago
I have a docker image and when I deploy it and call HTTP API - I can reproduce 2 options here: 1. it can work all the time until redeploy; 2. it can fail all the time until redeploy. It is simple Spring Boot app without any additional logic with class loading, etc. (hazelcast cluster with 1 member only)
– Daryl
11 hours ago
But need to mention, the issue is rarely reproduced. Almost always it works well.
– Daryl
11 hours ago
How do you use
com.someOrg.SomeClass
? Is it an entry, EntryProcessor, Listener, etc. class?– Alparslan Avci
12 hours ago
How do you use
com.someOrg.SomeClass
? Is it an entry, EntryProcessor, Listener, etc. class?– Alparslan Avci
12 hours ago
It is simple POJO:
Collection<SomeClass> o = map.values(getPredicate());
– Daryl
12 hours ago
It is simple POJO:
Collection<SomeClass> o = map.values(getPredicate());
– Daryl
12 hours ago
when you say it fails time to time, do you imply every time you query or occasionally? What else changes on server side? That error simply means that the class definition does not exist on Hazelcast's class path. So the most important thing for you to figure out is the reason why com.someOrg.SomeClass is not on class path.
– wildnez
12 hours ago
when you say it fails time to time, do you imply every time you query or occasionally? What else changes on server side? That error simply means that the class definition does not exist on Hazelcast's class path. So the most important thing for you to figure out is the reason why com.someOrg.SomeClass is not on class path.
– wildnez
12 hours ago
I have a docker image and when I deploy it and call HTTP API - I can reproduce 2 options here: 1. it can work all the time until redeploy; 2. it can fail all the time until redeploy. It is simple Spring Boot app without any additional logic with class loading, etc. (hazelcast cluster with 1 member only)
– Daryl
11 hours ago
I have a docker image and when I deploy it and call HTTP API - I can reproduce 2 options here: 1. it can work all the time until redeploy; 2. it can fail all the time until redeploy. It is simple Spring Boot app without any additional logic with class loading, etc. (hazelcast cluster with 1 member only)
– Daryl
11 hours ago
But need to mention, the issue is rarely reproduced. Almost always it works well.
– Daryl
11 hours ago
But need to mention, the issue is rarely reproduced. Almost always it works well.
– Daryl
11 hours ago
|
show 1 more comment
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53224059%2fhazelcast-spring-boot-java-lang-classnotfoundexception%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
How do you use
com.someOrg.SomeClass
? Is it an entry, EntryProcessor, Listener, etc. class?– Alparslan Avci
12 hours ago
It is simple POJO:
Collection<SomeClass> o = map.values(getPredicate());
– Daryl
12 hours ago
when you say it fails time to time, do you imply every time you query or occasionally? What else changes on server side? That error simply means that the class definition does not exist on Hazelcast's class path. So the most important thing for you to figure out is the reason why com.someOrg.SomeClass is not on class path.
– wildnez
12 hours ago
I have a docker image and when I deploy it and call HTTP API - I can reproduce 2 options here: 1. it can work all the time until redeploy; 2. it can fail all the time until redeploy. It is simple Spring Boot app without any additional logic with class loading, etc. (hazelcast cluster with 1 member only)
– Daryl
11 hours ago
But need to mention, the issue is rarely reproduced. Almost always it works well.
– Daryl
11 hours ago