ai.grakn.redismock.exception.ParseErrorException - redis

Running JUnit test of code doing jedis.get(key), via command line mvn test. The test seems to succeed, but seeing multiple stack traces from RedisServer thread. Using redis-mock 1.0.6 and jedis 2.9.0.
In IntelliJ, setting breakpoint on the throw doesn't yield much as far as diagnostics. The server is trying to read messageInput and gets an EOFException in consumeCount. Are these errors significant? How are they caused?
Exception in thread "Thread-3" Exception in thread "Thread-5" ai.grakn.redismock.exception.ParseErrorException
at ai.grakn.redismock.SliceParser.consumeCount(SliceParser.java:83)
at ai.grakn.redismock.RedisCommandParser.parse(RedisCommandParser.java:27)
at ai.grakn.redismock.RedisClient.nextCommand(RedisClient.java:69)
at ai.grakn.redismock.RedisClient.run(RedisClient.java:45)
at java.lang.Thread.run(Thread.java:748)
ai.grakn.redismock.exception.ParseErrorException
at ai.grakn.redismock.SliceParser.consumeCount(SliceParser.java:83)
at ai.grakn.redismock.RedisCommandParser.parse(RedisCommandParser.java:27)
at ai.grakn.redismock.RedisClient.nextCommand(RedisClient.java:69)
at ai.grakn.redismock.RedisClient.run(RedisClient.java:45)
at java.lang.Thread.run(Thread.java:748)

I've had this exception come up when I used a single Jedis instance in multiple threads; it's not thread-safe.

Related

NoClassDefFoundError caused by Kotlin readLine function

Whenever i try to execute a .jar file containing my code, it throws NoClassDefFoundError: kotlin/io/ConsoleKt. So far i haven't found a solution to this problem but I think the problem has something to do with the readLine() function I have in the script but I don't know what. The weird thing is that my code ran perfectly in Intellij itself but once I built it started throwing this exception that never happened outside of IntelliJ. The specific error is:
Exception in thread "main" java.lang.NoClassDefFoundError: kotlin/io/ConsoleKt
at com.quantumzizo.calcualtorkotlin.DisplayKt.main(Display.kt:23)
at com.quantumzizo.calcualtorkotlin.DisplayKt.main(Display.kt)
Caused by: java.lang.ClassNotFoundException: kotlin.io.ConsoleKt
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
... 2 more
Is there solution that can solve this?
So it turns out all I had to do was build a fat jar with all the dependencies. I used the Gradle plugin Shadow to make a fat jar.
Props to #Endzeit for suggesting that I use it.

Karate 0.9.1 - Exception in thread "main" java.lang.StackOverflowError

When I'm trying to run *.feature file or a single scenario with "right-click" (IntelliJ Idea), I've always received an exception:
Exception in thread "main" java.lang.StackOverflowError
at java.util.HashMap.<init>(HashMap.java:457)
at java.util.LinkedHashMap.<init>(LinkedHashMap.java:347)
at java.util.HashSet.<init>(HashSet.java:162)
at java.util.LinkedHashSet.<init>(LinkedHashSet.java:154)
at jdk.nashorn.internal.runtime.ScriptObject$KeyIterator.init(ScriptObject.java:2467)
at jdk.nashorn.internal.runtime.ScriptObject$ScriptObjectIterator.hasNext(ScriptObject.java:2441)
at jdk.nashorn.api.scripting.ScriptObjectMirror$13.call(ScriptObjectMirror.java:368)
at jdk.nashorn.api.scripting.ScriptObjectMirror$13.call(ScriptObjectMirror.java:363)
at jdk.nashorn.api.scripting.ScriptObjectMirror.inGlobal(ScriptObjectMirror.java:858)
at jdk.nashorn.api.scripting.ScriptObjectMirror.entrySet(ScriptObjectMirror.java:363)
at net.minidev.json.reader.JsonWriter$7.writeJSONString(JsonWriter.java:135)
at net.minidev.json.reader.JsonWriter$7.writeJSONString(JsonWriter.java:128)
at com.intuit.karate.JsonUtils$NashornObjectJsonWriter.writeJSONString(JsonUtils.java:77)
at com.intuit.karate.JsonUtils$NashornObjectJsonWriter.writeJSONString(JsonUtils.java:67)
...
Same scenario works fine if I run with TestRunner.java. Looks like that problem is in IJ cucumber plugin.
Maybe someone has a solution or workaround for this issue.
I'm using karate 0.9.1, cucumber for Java plugin: v183.4284.148, Idea 2018.3.3
No one has reported this - and from the stack-trace it looks like some JSON that you are using is being printed to the console - has some circular references, maybe you are using a Map of object references. But yes I can't explain why this works fine in the runner.
Can you follow the instructions here and submit a sample project, we can try open it in IntelliJ: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue
EDIT: this was a cyclic reference, but we have fixed it to be safe in future.

IllegalAccessError for RequestHedgingRMFailoverProxyProvider while launching Apache Twill Application in hadoop cluster after HDP upgrade

I'm trying to launch Apache Twill application from hadoop cluster, the cluster is recently upgraded from HDP 2.2 to HDP 2.5 but I'm getting llegalAccessError for RequestHedgingRMFailoverProxyProvider class . This class is part of org.apache.hadoop.yarn.client package. I'm getting this error in the Application Master. The job status goes directy to 'not running state' right after 'accepted state'.
Exception in thread "Hadoop22YarnAMClient STARTING" Exception in thread "YarnAMClientService STARTING" java.lang.IllegalAccessError: tried to access method org.apache.hadoop.yarn.client.ConfiguredRMFailoverProxyProvider.getProxyInternal()Ljava/lang/Object; from class org.apache.hadoop.yarn.client.RequestHedgingRMFailoverProxyProvider
at org.apache.hadoop.yarn.client.RequestHedgingRMFailoverProxyProvider.init(RequestHedgingRMFailoverProxyProvider.java:75)
at org.apache.hadoop.yarn.client.RMProxy.createRMFailoverProxyProvider(RMProxy.java:163)
at org.apache.hadoop.yarn.client.RMProxy.createRMProxy(RMProxy.java:93)
at org.apache.hadoop.yarn.client.ClientRMProxy.createRMProxy(ClientRMProxy.java:72)
at org.apache.hadoop.yarn.client.api.impl.AMRMClientImpl.serviceStart(AMRMClientImpl.java:186)
at org.apache.hadoop.service.AbstractService.start(AbstractService.java:193)
at org.apache.twill.internal.yarn.Hadoop21YarnAMClient.startUp(Hadoop21YarnAMClient.java:77)
at com.google.common.util.concurrent.AbstractIdleService$1$1.run(AbstractIdleService.java:43)
at java.lang.Thread.run(Thread.java:745)
com.google.common.util.concurrent.ExecutionError: java.lang.IllegalAccessError: tried to access method org.apache.hadoop.yarn.client.ConfiguredRMFailoverProxyProvider.getProxyInternal()Ljava/lang/Object; from class org.apache.hadoop.yarn.client.RequestHedgingRMFailoverProxyProvider
at com.google.common.util.concurrent.Futures.wrapAndThrowUnchecked(Futures.java:1008)
at com.google.common.util.concurrent.Futures.getUnchecked(Futures.java:1001)
at com.google.common.util.concurrent.AbstractService.startAndWait(AbstractService.java:220)
at com.google.common.util.concurrent.AbstractIdleService.startAndWait(AbstractIdleService.java:106)
at org.apache.twill.internal.appmaster.ApplicationMasterMain$YarnAMClientService.startUp(ApplicationMasterMain.java:221)
at com.google.common.util.concurrent.AbstractIdleService$1$1.run(AbstractIdleService.java:43)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalAccessError: tried to access method org.apache.hadoop.yarn.client.ConfiguredRMFailoverProxyProvider.getProxyInternal()Ljava/lang/Object; from class org.apache.hadoop.yarn.client.RequestHedgingRMFailoverProxyProvider
at org.apache.hadoop.yarn.client.RequestHedgingRMFailoverProxyProvider.init(RequestHedgingRMFailoverProxyProvider.java:75)
at org.apache.hadoop.yarn.client.RMProxy.createRMFailoverProxyProvider(RMProxy.java:163)
at org.apache.hadoop.yarn.client.RMProxy.createRMProxy(RMProxy.java:93)
at org.apache.hadoop.yarn.client.ClientRMProxy.createRMProxy(ClientRMProxy.java:72)
at org.apache.hadoop.yarn.client.api.impl.AMRMClientImpl.serviceStart(AMRMClientImpl.java:186)
at org.apache.hadoop.service.AbstractService.start(AbstractService.java:193)
at org.apache.twill.internal.yarn.Hadoop21YarnAMClient.startUp(Hadoop21YarnAMClient.java:77)
... 2 more
In general when you see IllegalAccessError this means you have a runtime incompatibility between compiled and runtime code. In this case,
the getProxyInternal() method of ConfiguredRMFailoverProxyProvider is now private. You need to recompile your client code and/or use updated hadoop client libraries to connect to your cluster.

Bytecode verification issue tool

We are facing a VerifyError in our application while deploying to WAS environment. The following is the exception:
Error 500: org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.VerifyError: JVMVRFY012 stack shape inconsistent; class=com/org/jaxb/Input_JAXB_Deserialization_Stub, method=write(ILjava/lang/Object;)V, pc=356
We are still trying to identify the issue, but all efforts not going well. Is there any way that the libraries used in run time is good in bytecode compatibility?. For example, we can add all the libraries and run the byte code verification.

org.openqa.selenium.internal.SocketLock exception

I am using ivy for dependency management. i am getting the following exception now,suddenly this exception came but before it was working fine..
java.lang.NoSuchMethodError: org.apache.http.conn.scheme.Scheme.(Ljava/lang/String;ILorg/apache/http/conn/scheme/SchemeSocketFactory;)V
at org.openqa.selenium.remote.internal.HttpClientFactory.getClientConnectionManager(HttpClientFactory.java:64)
at org.openqa.selenium.remote.internal.HttpClientFactory.(HttpClientFactory.java:50)
at org.openqa.selenium.remote.HttpCommandExecutor.(HttpCommandExecutor.java:111)
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:78)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:187)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:93)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:142)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:88)
at com.ensarm.crawler.web.browser.FirefoxBrowser.initialize(FirefoxBrowser.java:296)
at com.ensarm.crawler.navigator.IpProxyNavigator.initialize(IpProxyNavigator.java:46)
at com.ensarm.crawler.Crawler.run(Crawler.java:23)
at java.lang.Thread.run(Thread.java:619)
The firefox driver for selenium doesn't have the ephemeral socket issue fixed, which often causes the stack trace above. There may be some test cases being run by ivy which if you turn off would solve this particular issue.