Redisson 3.16.2 Unsupported protocol version 0 - redisson

I'm using Redisson 3.16.2 on my prodcution environment and getting "Unsupported protocol version 0" error. On test environment, I didn't get this error. What does this error mean?
Here is stack trace:
java.io.IOException: Unsupported protocol version 0
at org.jboss.marshalling.river.RiverUnmarshaller.start(RiverUnmarshaller.java:1375)
at org.redisson.codec.MarshallingCodec.lambda$new$0(MarshallingCodec.java:145)
at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:366)
at org.redisson.client.handler.CommandDecoder.decodeCommand(CommandDecoder.java:183)
at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:122)
at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:107)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:508)
at io.netty.handler.codec.ReplayingDecoder.callDecode(ReplayingDecoder.java:366)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)

I had the same problem but with version 3.14.0.
SOLUTION:
I updated the version to 3.16.3.
I deleted the old cached values.
EXPLANATION:
The version should not be the problem itself, but the cached data (in my case) was loaded with another version of reddis and this caused the error. Updating to the latest version is still recommended.

This happened because default codec has changed since 3.13.0 version to MarshallingCodec. Previously it was FstCodec. So data stored with previous codec can't be read with MarshallingCodec

Try changing the Codec:
Config config = new Config();
config.useSingleServer().setAddress("redis://127.0.0.1:16379");
config.setCodec(new StringCodec());
RedissonClient redisson = Redisson.create(config);

Related

I am getting error : Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.fs.store.audit.AuditSpanSource

I am trying to perform write function S3 using saveAsHadoopFile, my scala version is 3.2.1 and hadoop-aws version is 3.3.4, but it throws the error Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.fs.store.audit.AuditSpanSource, how to get that class or how to resolve this issue?
I tried changing hadoop-aws version, spark version, but I am not sure to which version I need to change to.

Error: it/crs4/pydoop/mapreduce/pipes/Submitter : Unsupported major.minor version 52.0 CentOS6 , Pydoop, Hue , Cloudera

When I try to run the script, I get this error. This is a Python script. Does anyone have this problem?
[cloudera-scm#ivana-namenode2 /opt/MapReduce/wordcount]$ pydoop script wc.py /user/cloudera-scm/MapReduce/wordcount/data/text /user/cloudera-scm/MapReduce/wordcount/output
Exception in thread "main" java.lang.UnsupportedClassVersionError: it/crs4/pydoop/mapreduce/pipes/Submitter : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
ERROR - RunCmdError: command exited with 1 status
When you turn to this existing question you find the explanation for the error message: you have some java class that was compiled for Java8.
But the JVM asked to execute that class is older than Java8.
In other words: you have an inconsistent setup. Some part of your environment wants to use something build for Java8, but that part that executes things is running an older version of Java.
So, the answer here is that you have to understand better what your setup is composed of, to either use an "older" version of the underlying library/tool, or to make sure that a Java8 JVM is available to run classes.

WSO2 Enterprise Integrator 6.0.0 unable to find snappy-java jar

Following the quick start guide in
https://docs.wso2.com/display/EI600/Quick+Start+Guide
Since I am using Windows, I have downloaded snappy-java and put into \wso2\analytics\lib
but the exception as below still occurs when starting the EI analytics
Exception in thread "dag-scheduler-event-loop" java.lang.NoClassDefFoundError: org/xerial/snappy/SnappyInputStream
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.apache.spark.util.Utils$.classForName(Utils.scala:175)
at org.apache.spark.io.CompressionCodec$.createCodec(CompressionCodec.scala:71)
at org.apache.spark.io.CompressionCodec$.createCodec(CompressionCodec.scala:65)
at org.apache.spark.broadcast.TorrentBroadcast.org$apache$spark$broadcast$TorrentBroadcast$$setConf(TorrentBroadcast.scala:73)
at org.apache.spark.broadcast.TorrentBroadcast.<init>(TorrentBroadcast.scala:80)
at org.apache.spark.broadcast.TorrentBroadcastFactory.newBroadcast(TorrentBroadcastFactory.scala:34)
at org.apache.spark.broadcast.BroadcastManager.newBroadcast(BroadcastManager.scala:63)
at org.apache.spark.SparkContext.broadcast(SparkContext.scala:1326)
at org.apache.spark.scheduler.DAGScheduler.submitMissingTasks(DAGScheduler.scala:1006)
at org.apache.spark.scheduler.DAGScheduler.org$apache$spark$scheduler$DAGScheduler$$submitStage(DAGScheduler.scala:921)
at org.apache.spark.scheduler.DAGScheduler.handleJobSubmitted(DAGScheduler.scala:861)
at org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.doOnReceive(DAGScheduler.scala:1607)
at org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:1599)
at org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:1588)
at org.apache.spark.util.EventLoop$$anon$1.run(EventLoop.scala:48)
Caused by: java.lang.ClassNotFoundException: org.xerial.snappy.SnappyInputStream cannot be found by spark-core_2.10_1.6.2.wso2v1
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 17 more
I am suspecting the guide is placing the jar at incorrect path, in previous version ESB 5.0.0, the path is in \repository\components\lib
as given by
https://docs.wso2.com/display/ESB500/Quick+Start+Guide
The right path is EI_HOME\lib . When you see "starting polling event receivers" and the error does not appear,it works. Then you can go on. :)
Try putting this version of snappy-java to lib.
http://mvnrepository.com/artifact/org.xerial.snappy/snappy-java/1.1.1.7
Make sure you remove the old version from both lib and dropins directories.

Error in Weka: error in opening zip file

I am trying to use Weka 3.8 and 3.9 (tried both versions in Mac and Windows) but I can't seem to install any additional packages. It always gives the error: error in opening zip file.
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:219)
at java.util.zip.ZipFile.<init>(ZipFile.java:149)
at java.util.zip.ZipFile.<init>(ZipFile.java:163)
at weka.core.packageManagement.DefaultPackageManager.getPackageArchiveInfo(DefaultPackageManager.java:354)
at weka.core.packageManagement.DefaultPackageManager.installPackageFromArchive(DefaultPackageManager.java:501)
at weka.core.packageManagement.DefaultPackageManager.installPackageFromURL(DefaultPackageManager.java:769)
at weka.core.packageManagement.DefaultPackageManager.installPackageFromRepository(DefaultPackageManager.java:753)
at weka.core.WekaPackageManager.installPackageFromRepository(WekaPackageManager.java:1938)
at weka.gui.PackageManager$InstallTask.doInBackground(PackageManager.java:1308)
at weka.gui.PackageManager$InstallTask.doInBackground(PackageManager.java:863)
at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at javax.swing.SwingWorker.run(SwingWorker.java:334)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
I have been facing the same problem in both Windows and Mac. What worked for me was to download the packages I was interested in at https://sourceforge.net/projects/weka/files/weka-packages/
After the download, open your package manager in weka and in Unofficial select File/Url and choose the downloaded package file. After this, you just have to close and open weka again and your packages should be available.
Hope this helps!
V.

java.lang.ExceptionInInitializerError groovy compiler loading error

I am getting below error when I executing my JUnit test case. I am using Expectations plugin for Grails Domain Test case.
BuildConfig.groovy file code:
plugins {
compile ":domain-expectations:0.6.1"
}
Error which I am getting:
java.lang.ExceptionInInitializerError
at org.codehaus.groovy.runtime.InvokerHelper.<clinit>(InvokerHelper.java:61)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallStaticSite(CallSiteArray.java:72)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:159)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at com.lonecyprus.grails.test.Specification.<clinit>(Specification.groovy)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at junit.framework.TestSuite.createTest(TestSuite.java:63)
at junit.framework.TestSuite.addTestMethod(TestSuite.java:310)
at junit.framework.TestSuite.addTestsFromTestCase(TestSuite.java:153)
at junit.framework.TestSuite.<init>(TestSuite.java:132)
at org.junit.internal.runners.JUnit38ClassRunner.<init>(JUnit38ClassRunner.java:72)
at org.junit.internal.builders.JUnit3Builder.runnerForClass(JUnit3Builder.java:11)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:26)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.<init>(JUnit4TestReference.java:33)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestClassReference.<init>(JUnit4TestClassReference.java:25)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:48)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:444)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: groovy.lang.GroovyRuntimeException: Conflicting module versions. Module [groovy-all is loaded in version 2.3.10 and you are trying to load version 2.3.7
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl$DefaultModuleListener.onModule(MetaClassRegistryImpl.java:509)
at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanExtensionModuleFromProperties(ExtensionModuleScanner.java:77)
at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanExtensionModuleFromMetaInf(ExtensionModuleScanner.java:71)
at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanClasspathModules(ExtensionModuleScanner.java:53)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:110)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:71)
at groovy.lang.GroovySystem.<clinit>(GroovySystem.java:33)
... 29 more
It means that you have 2 versions of Groovy on classpath: 2.3.10 and 2.3.7. One is probably brought by Grails while the other is by the plugin, which means they are incompatible. You should try to exclude Groovy from the plugin dependency.
maybe you had use groovy in two different denpendencies. For example : in com.jayway.restassured and io.rest-assured, both of them include groovy-xml.
For this 1st of you have chack the version of groovy in Maven Dependencies library and Built path. Version of groovy should be match so that this error will go else error will come because of version conflict.