Skip to content

Commit

Permalink
Fixed - Getting java.lang.ClassNotFoundException if same Redisson ins…
Browse files Browse the repository at this point in the history
…tance used in tomcat and application. #1668
  • Loading branch information
Nikita Koksharov committed Jan 17, 2019
1 parent 37b58db commit 79e03e1
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 30 deletions.
Expand Up @@ -36,7 +36,6 @@
import org.redisson.api.RTopic;
import org.redisson.api.RedissonClient;
import org.redisson.api.listener.MessageListener;
import org.redisson.client.codec.Codec;
import org.redisson.client.codec.StringCodec;
import org.redisson.codec.CompositeCodec;
import org.redisson.config.Config;
Expand Down Expand Up @@ -276,15 +275,6 @@ protected RedissonClient buildClient() throws LifecycleException {
}

try {
try {
Config c = new Config(config);
Codec codec = c.getCodec().getClass().getConstructor(ClassLoader.class)
.newInstance(Thread.currentThread().getContextClassLoader());
config.setCodec(codec);
} catch (Exception e) {
throw new IllegalStateException("Unable to initialize codec with ClassLoader parameter", e);
}

return Redisson.create(config);
} catch (Exception e) {
throw new LifecycleException(e);
Expand Down
Expand Up @@ -35,7 +35,6 @@
import org.redisson.api.RTopic;
import org.redisson.api.RedissonClient;
import org.redisson.api.listener.MessageListener;
import org.redisson.client.codec.Codec;
import org.redisson.client.codec.StringCodec;
import org.redisson.codec.CompositeCodec;
import org.redisson.config.Config;
Expand Down Expand Up @@ -275,15 +274,6 @@ protected RedissonClient buildClient() throws LifecycleException {
}

try {
try {
Config c = new Config(config);
Codec codec = c.getCodec().getClass().getConstructor(ClassLoader.class)
.newInstance(Thread.currentThread().getContextClassLoader());
config.setCodec(codec);
} catch (Exception e) {
throw new IllegalStateException("Unable to initialize codec with ClassLoader parameter", e);
}

return Redisson.create(config);
} catch (Exception e) {
throw new LifecycleException(e);
Expand Down
Expand Up @@ -35,7 +35,6 @@
import org.redisson.api.RTopic;
import org.redisson.api.RedissonClient;
import org.redisson.api.listener.MessageListener;
import org.redisson.client.codec.Codec;
import org.redisson.client.codec.StringCodec;
import org.redisson.codec.CompositeCodec;
import org.redisson.config.Config;
Expand Down Expand Up @@ -275,15 +274,6 @@ protected RedissonClient buildClient() throws LifecycleException {
}

try {
try {
Config c = new Config(config);
Codec codec = c.getCodec().getClass().getConstructor(ClassLoader.class)
.newInstance(Thread.currentThread().getContextClassLoader());
config.setCodec(codec);
} catch (Exception e) {
throw new IllegalStateException("Unable to initialize codec with ClassLoader parameter", e);
}

return Redisson.create(config);
} catch (Exception e) {
throw new LifecycleException(e);
Expand Down

0 comments on commit 79e03e1

Please sign in to comment.