org.openqa.selenium.internal.SocketLock exception - selenium

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.

Related

java.net.UnknownHostException: messages.cucumber.io can't solve in selenium bdd

When running scripts in Selenium BDD, it was showing error like:
java.net.UnknownHostException: messages.cucumber.io
Error:
java.lang.RuntimeException: java.net.UnknownHostException: messages.cucumber.io
at io.cucumber.core.plugin.MessageFormatter.writeMessage(MessageFormatter.java:36)
at io.cucumber.core.eventbus.AbstractEventPublisher.send(AbstractEventPublisher.java:51)
at io.cucumber.core.eventbus.AbstractEventBus.send(AbstractEventBus.java:12)
This has been resolved: after heavy debugging I have identified the root cause:-cucumber was trying to publish the report on cloud which is prevented by the infrastructure. resolved by putting "cucumber.publish.enabled=false" in the properties file. Thank you all for the support

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.

Exception while running Seedstack Application

I have used seedstack dependecies for Hibernate and JPA to create DAO services that performs crud operations on Database.
I am trying to Launch this Seedstack application module through Java application Launcher in eclipse, by SeedMain class.
In pom.xml - dependecy for undertow is given.
<dependency>
<groupId>org.seedstack.seed</groupId>
<artifactId>seed-web-undertow</artifactId>
</dependency>
When executing the SeedMain class, I am getting the below error snakeyaml error:-
Exception in thread "main" java.lang.NoSuchMethodError: org.yaml.snakeyaml.DumperOptions.setSplitLines(Z)V
at com.fasterxml.jackson.dataformat.yaml.YAMLGenerator.buildDumperOptions(YAMLGenerator.java:259)
at com.fasterxml.jackson.dataformat.yaml.YAMLGenerator.<init>(YAMLGenerator.java:232)
at com.fasterxml.jackson.dataformat.yaml.YAMLFactory._createGenerator(YAMLFactory.java:447)
at com.fasterxml.jackson.dataformat.yaml.YAMLFactory.createGenerator(YAMLFactory.java:397)
at org.seedstack.seed.core.internal.diagnostic.DefaultDiagnosticReporter.writeDiagnosticReport(DefaultDiagnosticReporter.java:75)
at org.seedstack.seed.core.internal.diagnostic.DefaultDiagnosticReporter.writeDiagnosticReport(DefaultDiagnosticReporter.java:67)
at org.seedstack.seed.core.internal.diagnostic.DiagnosticManagerImpl.dumpDiagnosticReport(DiagnosticManagerImpl.java:70)
at org.seedstack.seed.core.SeedMain.handleException(SeedMain.java:68)
at org.seedstack.seed.core.SeedMain.main(SeedMain.java:61)
As per my understanding the Error is due to some version inconsistency for snakeyaml, But for Seedstack as the versions for dependecies are resolved by seedstack-bom dependecy, so where exactly should I do the changes to resolve the error.
Thanks in Advance!
From reading the stacktrace, it seems that you have some error on startup which is handled by the handleException() method. This method then tries to write a YAML diagnostic report but ultimately fails due to the snakeyaml version issue you mentioned.
You should do two things:
Fix the snakeyaml dependency issue by looking into the dependency tree. This kind of problem is often caused by some library that makes Maven choose an older version. SeedStack needs at least jackson-dataformat-yaml version 2.9.4 which in turn needs at least snakeyaml 1.18.
Fix the other error by looking at the full stacktrace. When a diagnostic report cannot be written, the original exception is still printed on the console (on stderr).

ai.grakn.redismock.exception.ParseErrorException

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.

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.