kandi background
Explore Kits

async-http-client | Asynchronous Http and WebSocket Client library for Java | Websocket library

 by   AsyncHttpClient Java Version: Current License: Non-SPDX

 by   AsyncHttpClient Java Version: Current License: Non-SPDX

Download this library from

kandi X-RAY | async-http-client Summary

async-http-client is a Java library typically used in Networking, Websocket applications. async-http-client has no bugs, it has build file available and it has medium support. However async-http-client has 3 vulnerabilities and it has a Non-SPDX License. You can download it from GitHub, Maven.
Follow @AsyncHttpClient on Twitter. The AsyncHttpClient (AHC) library allows Java applications to easily execute HTTP requests and asynchronously process HTTP responses. The library also supports the WebSocket Protocol. It's built on top of Netty. It's currently compiled on Java 8 but runs on Java 9 too.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • async-http-client has a medium active ecosystem.
  • It has 5763 star(s) with 1523 fork(s). There are 367 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 72 open issues and 1194 have been closed. On average issues are closed in 50 days. There are 15 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of async-http-client is current.
async-http-client Support
Best in #Websocket
Average in #Websocket
async-http-client Support
Best in #Websocket
Average in #Websocket

quality kandi Quality

  • async-http-client has 0 bugs and 0 code smells.
async-http-client Quality
Best in #Websocket
Average in #Websocket
async-http-client Quality
Best in #Websocket
Average in #Websocket

securitySecurity

  • async-http-client has 3 vulnerability issues reported (0 critical, 1 high, 2 medium, 0 low).
  • async-http-client code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.
async-http-client Security
Best in #Websocket
Average in #Websocket
async-http-client Security
Best in #Websocket
Average in #Websocket

license License

  • async-http-client has a Non-SPDX License.
  • Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.
async-http-client License
Best in #Websocket
Average in #Websocket
async-http-client License
Best in #Websocket
Average in #Websocket

buildReuse

  • async-http-client releases are not available. You will need to build from source code and install.
  • Deployable package is available in Maven.
  • Build file is available. You can build the component from source.
  • Installation instructions, examples and code snippets are available.
  • async-http-client saves you 17128 person hours of effort in developing the same functionality from scratch.
  • It has 34202 lines of code, 3479 functions and 381 files.
  • It has medium code complexity. Code complexity directly impacts maintainability of the code.
async-http-client Reuse
Best in #Websocket
Average in #Websocket
async-http-client Reuse
Best in #Websocket
Average in #Websocket
Top functions reviewed by kandi - BETA

kandi has reviewed async-http-client and discovered the below as its top functions. This is intended to give you an instant insight into async-http-client implemented functionality, and help decide if they suit your requirements.

  • Exit the proxy server after a 403 response .
  • Logs a 401 - Authenticate after the response .
  • Generate a token using SPNEGO .
  • Build a netty request from the given request .
  • Invoked after a redirect .
  • Handles a CONNECT request .
  • Sends a request to the proxy server using the given proxy server .
  • Called when an exception occurs .
  • Get a bootstrap from the given URI .
  • Convert Map to List .

async-http-client Key Features

MAJOR = huge refactoring

MINOR = new features and minor API changes, upgrading should require 1 hour of work to adapt sources

FIX = no API change, just bug fixes, only those are source and binary compatible with same minor version

Installation

copy iconCopydownload iconDownload
<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.asynchttpclient</groupId>
            <artifactId>async-http-client-bom</artifactId>
            <version>LATEST_VERSION</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

Dsl

copy iconCopydownload iconDownload
import static org.asynchttpclient.Dsl.*;

Client

copy iconCopydownload iconDownload
import static org.asynchttpclient.Dsl.*;

AsyncHttpClient asyncHttpClient = asyncHttpClient();

Configuration

copy iconCopydownload iconDownload
import static org.asynchttpclient.Dsl.*;

AsyncHttpClient c = asyncHttpClient(config().setProxyServer(proxyServer("127.0.0.1", 38080)));

Basics

copy iconCopydownload iconDownload
import org.asynchttpclient.*;

// bound
Future<Response> whenResponse = asyncHttpClient.prepareGet("http://www.example.com/").execute();

// unbound
Request request = get("http://www.example.com/").build();
Future<Response> whenResponse = asyncHttpClient.executeRequest(request);

Dealing with Responses

copy iconCopydownload iconDownload
Future<Response> whenResponse = asyncHttpClient.prepareGet("http://www.example.com/").execute();
Response response = whenResponse.get();

Setting callbacks on the ListenableFuture

copy iconCopydownload iconDownload
ListenableFuture<Response> whenResponse = ???;
Runnable callback = () -> {
	try  {
		Response response = whenResponse.get();
		System.out.println(response);
	} catch (InterruptedException | ExecutionException e) {
		e.printStackTrace();
	}
};
java.util.concurrent.Executor executor = ???;
whenResponse.addListener(() -> ???, executor);

WebSocket

copy iconCopydownload iconDownload
WebSocket websocket = c.prepareGet("ws://demos.kaazing.com/echo")
      .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(
          new WebSocketListener() {

          @Override
          public void onOpen(WebSocket websocket) {
              websocket.sendTextFrame("...").sendTextFrame("...");
          }

          @Override
          public void onClose(WebSocket websocket) {
          }
          
    		  @Override
          public void onTextFrame(String payload, boolean finalFragment, int rsv) {
          	System.out.println(payload);
          }

          @Override
          public void onError(Throwable t) {
          }
      }).build()).get();

WebDAV

copy iconCopydownload iconDownload
Request mkcolRequest = new RequestBuilder("MKCOL").setUrl("http://host:port/folder1").build();
Response response = c.executeRequest(mkcolRequest).get();

Launching chrome in headless mode with selenium in Java giving error

copy iconCopydownload iconDownload
System.setProperty("webdriver.chrome.driver", "src/main/extras/chromedriver.exe");
WebDriverManager.chromedriver().setup();
Exception in thread "Thread-3" java.lang.NullPointerException
-----------------------
System.setProperty("webdriver.chrome.driver", "src/main/extras/chromedriver.exe");
WebDriverManager.chromedriver().setup();
Exception in thread "Thread-3" java.lang.NullPointerException
-----------------------
System.setProperty("webdriver.chrome.driver", "src/main/extras/chromedriver.exe");
WebDriverManager.chromedriver().setup();
Exception in thread "Thread-3" java.lang.NullPointerException

Sttp Uri Avoid Decoding

copy iconCopydownload iconDownload
parsed.copy(
  pathSegments = Uri.AbsolutePath(parsed.pathSegments.segments
    .map(s => s.copy(encoding = QuerySegmentEncoding.All)).toList
  )
)
-----------------------
parsed.copy(
  pathSegments = Uri.AbsolutePath(parsed.pathSegments.segments
    .map(s => s.copy(encoding = QuerySegmentEncoding.All)).toList
  )
)

Community Discussions

Trending Discussions on async-http-client
  • Launching chrome in headless mode with selenium in Java giving error
  • Sttp Uri Avoid Decoding
  • Is synchronous HTTP request wrapped in a Future considered CPU or IO bound?
  • Using ForkJoinPool together with AsyncHttpClient - does it make sense?
  • Digest Authentication using async-http-client
Trending Discussions on async-http-client

QUESTION

Launching chrome in headless mode with selenium in Java giving error

Asked 2021-Dec-31 at 13:08

This is my code:

WebDriverManager.chromedriver().setup();
System.setProperty("webdriver.chrome.driver", "src/main/extras/chromedriver.exe");
ChromeOptions options = new ChromeOptions();
options.addArguments("--headless");
WebDriver driver = new ChromeDriver(options);
driver = new ChromeDriver();
driver.get(url);

The last line, getting the URL, is giving this error:

Exception in thread "Thread-3" java.lang.NullPointerException

I wasn't getting this error before I tried to launch the browser in headless mode.

This is my full error message thing:

"D:\Program Files\Amazon Corretto\jdk11.0.11_9\bin\java.exe" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2021.2\lib\idea_rt.jar=59273:C:\Program Files\JetBrains\IntelliJ IDEA 2021.2\bin" -Dfile.encoding=UTF-8 -classpath C:\Users\jackg\.m2\repository\org\openjfx\javafx-controls\11.0.2\javafx-controls-11.0.2.jar;C:\Users\jackg\.m2\repository\org\openjfx\javafx-graphics\11.0.2\javafx-graphics-11.0.2.jar;C:\Users\jackg\.m2\repository\org\openjfx\javafx-fxml\11.0.2\javafx-fxml-11.0.2.jar;C:\Users\jackg\.m2\repository\org\openjfx\javafx-web\11.0.2\javafx-web-11.0.2.jar;C:\Users\jackg\.m2\repository\org\openjfx\javafx-media\11.0.2\javafx-media-11.0.2.jar;C:\Users\jackg\.m2\repository\org\openjfx\javafx-base\11.0.1\javafx-base-11.0.1.jar;C:\Users\jackg\.m2\repository\org\seleniumhq\selenium\selenium-java\4.1.1\selenium-java-4.1.1.jar;C:\Users\jackg\.m2\repository\com\google\auto\service\auto-service-annotations\1.0.1\auto-service-annotations-1.0.1.jar;C:\Users\jackg\.m2\repository\com\google\auto\service\auto-service\1.0.1\auto-service-1.0.1.jar;C:\Users\jackg\.m2\repository\com\google\auto\auto-common\1.2\auto-common-1.2.jar;C:\Users\jackg\.m2\repository\org\seleniumhq\selenium\selenium-devtools-v85\4.1.1\selenium-devtools-v85-4.1.1.jar;C:\Users\jackg\.m2\repository\org\seleniumhq\selenium\selenium-devtools-v94\4.1.1\selenium-devtools-v94-4.1.1.jar;C:\Users\jackg\.m2\repository\org\seleniumhq\selenium\selenium-devtools-v95\4.1.1\selenium-devtools-v95-4.1.1.jar;C:\Users\jackg\.m2\repository\org\seleniumhq\selenium\selenium-devtools-v96\4.1.1\selenium-devtools-v96-4.1.1.jar;C:\Users\jackg\.m2\repository\org\seleniumhq\selenium\selenium-edge-driver\4.1.1\selenium-edge-driver-4.1.1.jar;C:\Users\jackg\.m2\repository\org\seleniumhq\selenium\selenium-firefox-driver\4.1.1\selenium-firefox-driver-4.1.1.jar;C:\Users\jackg\.m2\repository\org\seleniumhq\selenium\selenium-firefox-xpi-driver\4.1.1\selenium-firefox-xpi-driver-4.1.1.jar;C:\Users\jackg\.m2\repository\org\seleniumhq\selenium\selenium-ie-driver\4.1.1\selenium-ie-driver-4.1.1.jar;C:\Users\jackg\.m2\repository\org\seleniumhq\selenium\selenium-opera-driver\4.1.1\selenium-opera-driver-4.1.1.jar;C:\Users\jackg\.m2\repository\io\netty\netty-codec\4.1.70.Final\netty-codec-4.1.70.Final.jar;C:\Users\jackg\.m2\repository\io\netty\netty-handler\4.1.70.Final\netty-handler-4.1.70.Final.jar;C:\Users\jackg\.m2\repository\io\netty\netty-resolver\4.1.70.Final\netty-resolver-4.1.70.Final.jar;C:\Users\jackg\.m2\repository\io\opentelemetry\opentelemetry-exporter-logging\1.9.1\opentelemetry-exporter-logging-1.9.1.jar;C:\Users\jackg\.m2\repository\io\opentelemetry\opentelemetry-sdk-metrics\1.9.1-alpha\opentelemetry-sdk-metrics-1.9.1-alpha.jar;C:\Users\jackg\.m2\repository\io\opentelemetry\opentelemetry-sdk-logs\1.9.1-alpha\opentelemetry-sdk-logs-1.9.1-alpha.jar;C:\Users\jackg\.m2\repository\io\opentelemetry\opentelemetry-api-metrics\1.9.1-alpha\opentelemetry-api-metrics-1.9.1-alpha.jar;C:\Users\jackg\.m2\repository\org\asynchttpclient\async-http-client-netty-utils\2.12.3\async-http-client-netty-utils-2.12.3.jar;C:\Users\jackg\.m2\repository\io\netty\netty-codec-socks\4.1.60.Final\netty-codec-socks-4.1.60.Final.jar;C:\Users\jackg\.m2\repository\io\netty\netty-handler-proxy\4.1.60.Final\netty-handler-proxy-4.1.60.Final.jar;C:\Users\jackg\.m2\repository\io\netty\netty-transport-native-epoll\4.1.60.Final\netty-transport-native-epoll-4.1.60.Final-linux-x86_64.jar;C:\Users\jackg\.m2\repository\io\netty\netty-transport-native-kqueue\4.1.60.Final\netty-transport-native-kqueue-4.1.60.Final-osx-x86_64.jar;C:\Users\jackg\.m2\repository\org\reactivestreams\reactive-streams\1.0.3\reactive-streams-1.0.3.jar;C:\Users\jackg\.m2\repository\com\typesafe\netty\netty-reactive-streams\2.0.4\netty-reactive-streams-2.0.4.jar;C:\Users\jackg\.m2\repository\com\sun\activation\jakarta.activation\1.2.2\jakarta.activation-1.2.2.jar;C:\Users\jackg\.m2\repository\org\seleniumhq\selenium\selenium-safari-driver\4.1.1\selenium-safari-driver-4.1.1.jar;C:\Users\jackg\.m2\repository\org\slf4j\slf4j-api\1.7.32\slf4j-api-1.7.32.jar;C:\Users\jackg\.m2\repository\com\google\code\gson\gson\2.8.8\gson-2.8.8.jar;C:\Users\jackg\.m2\repository\org\jsoup\jsoup\1.14.2\jsoup-1.14.2.jar;C:\Users\jackg\.m2\repository\com\github\docker-java\docker-java\3.2.12\docker-java-3.2.12.jar;C:\Users\jackg\.m2\repository\com\github\docker-java\docker-java-core\3.2.12\docker-java-core-3.2.12.jar;C:\Users\jackg\.m2\repository\com\github\docker-java\docker-java-api\3.2.12\docker-java-api-3.2.12.jar;C:\Users\jackg\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.10.3\jackson-annotations-2.10.3.jar;C:\Users\jackg\.m2\repository\commons-io\commons-io\2.6\commons-io-2.6.jar;C:\Users\jackg\.m2\repository\org\apache\commons\commons-compress\1.21\commons-compress-1.21.jar;C:\Users\jackg\.m2\repository\commons-lang\commons-lang\2.6\commons-lang-2.6.jar;C:\Users\jackg\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.10.3\jackson-databind-2.10.3.jar;C:\Users\jackg\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.10.3\jackson-core-2.10.3.jar;C:\Users\jackg\.m2\repository\org\bouncycastle\bcpkix-jdk15on\1.64\bcpkix-jdk15on-1.64.jar;C:\Users\jackg\.m2\repository\org\bouncycastle\bcprov-jdk15on\1.64\bcprov-jdk15on-1.64.jar;C:\Users\jackg\.m2\repository\org\slf4j\jcl-over-slf4j\1.7.30\jcl-over-slf4j-1.7.30.jar;C:\Users\jackg\.m2\repository\com\github\docker-java\docker-java-transport-httpclient5\3.2.12\docker-java-transport-httpclient5-3.2.12.jar;C:\Users\jackg\.m2\repository\com\github\docker-java\docker-java-transport\3.2.12\docker-java-transport-3.2.12.jar;C:\Users\jackg\.m2\repository\org\apache\httpcomponents\client5\httpclient5\5.0.3\httpclient5-5.0.3.jar;C:\Users\jackg\.m2\repository\org\apache\httpcomponents\core5\httpcore5\5.0.2\httpcore5-5.0.2.jar;C:\Users\jackg\.m2\repository\commons-codec\commons-codec\1.13\commons-codec-1.13.jar;C:\Users\jackg\.m2\repository\com\google\guava\failureaccess\1.0.1\failureaccess-1.0.1.jar;C:\Users\jackg\.m2\repository\com\google\guava\listenablefuture\9999.0-empty-to-avoid-conflict-with-guava\listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar;C:\Users\jackg\.m2\repository\com\google\code\findbugs\jsr305\3.0.2\jsr305-3.0.2.jar;C:\Users\jackg\.m2\repository\org\checkerframework\checker-qual\3.8.0\checker-qual-3.8.0.jar;C:\Users\jackg\.m2\repository\com\google\errorprone\error_prone_annotations\2.5.1\error_prone_annotations-2.5.1.jar;C:\Users\jackg\.m2\repository\com\google\j2objc\j2objc-annotations\1.3\j2objc-annotations-1.3.jar;C:\Users\jackg\.m2\repository\org\brotli\dec\0.1.2\dec-0.1.2.jar;C:\Users\jackg\.m2\repository\org\apache\commons\commons-lang3\3.12.0\commons-lang3-3.12.0.jar;C:\Users\jackg\.m2\repository\org\apache\commons\commons-text\1.9\commons-text-1.9.jar;C:\Users\jackg\.m2\repository\commons-beanutils\commons-beanutils\1.9.4\commons-beanutils-1.9.4.jar;C:\Users\jackg\.m2\repository\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;C:\Users\jackg\.m2\repository\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar;C:\Users\jackg\.m2\repository\org\apache\commons\commons-collections4\4.4\commons-collections4-4.4.jar -p "C:\Users\jackg\.m2\repository\org\openjfx\javafx-base\11.0.1\javafx-base-11.0.1-win.jar;C:\Users\jackg\.m2\repository\io\netty\netty-transport-classes-kqueue\4.1.70.Final\netty-transport-classes-kqueue-4.1.70.Final.jar;C:\Users\jackg\.m2\repository\org\controlsfx\controlsfx\11.1.0\controlsfx-11.1.0.jar;C:\Users\jackg\.m2\repository\net\synedra\validatorfx\0.1.13\validatorfx-0.1.13.jar;C:\Users\jackg\.m2\repository\io\opentelemetry\opentelemetry-sdk\1.9.1\opentelemetry-sdk-1.9.1.jar;C:\Users\jackg\.m2\repository\org\openjfx\javafx-graphics\11.0.2\javafx-graphics-11.0.2-win.jar;C:\Users\jackg\.m2\repository\org\openjfx\javafx-fxml\11.0.2\javafx-fxml-11.0.2-win.jar;C:\Users\jackg\.m2\repository\com\beust\jcommander\1.81\jcommander-1.81.jar;C:\Users\jackg\.m2\repository\org\openjfx\javafx-controls\11.0.2\javafx-controls-11.0.2-win.jar;C:\Users\jackg\.m2\repository\org\seleniumhq\selenium\selenium-chromium-driver\4.1.1\selenium-chromium-driver-4.1.1.jar;C:\Users\jackg\.m2\repository\io\netty\netty-transport-classes-epoll\4.1.70.Final\netty-transport-classes-epoll-4.1.70.Final.jar;C:\Users\jackg\.m2\repository\org\seleniumhq\selenium\selenium-api\4.1.1\selenium-api-4.1.1.jar;C:\Users\jackg\.m2\repository\org\seleniumhq\selenium\selenium-json\4.1.1\selenium-json-4.1.1.jar;C:\Users\jackg\.m2\repository\net\java\dev\jna\jna\5.8.0\jna-5.8.0.jar;C:\Users\jackg\.m2\repository\io\opentelemetry\opentelemetry-sdk-extension-autoconfigure-spi\1.9.1\opentelemetry-sdk-extension-autoconfigure-spi-1.9.1.jar;C:\Users\jackg\.m2\repository\net\jodah\failsafe\2.4.4\failsafe-2.4.4.jar;C:\Users\jackg\.m2\repository\io\netty\netty-transport-native-unix-common\4.1.70.Final\netty-transport-native-unix-common-4.1.70.Final.jar;C:\Users\jackg\.m2\repository\io\netty\netty-codec-http\4.1.70.Final\netty-codec-http-4.1.70.Final.jar;C:\Users\jackg\.m2\repository\io\opentelemetry\opentelemetry-sdk-extension-autoconfigure\1.9.1-alpha\opentelemetry-sdk-extension-autoconfigure-1.9.1-alpha.jar;C:\Users\jackg\.m2\repository\net\bytebuddy\byte-buddy\1.12.2\byte-buddy-1.12.2.jar;C:\Users\jackg\.m2\repository\io\netty\netty-buffer\4.1.70.Final\netty-buffer-4.1.70.Final.jar;C:\Users\jackg\.m2\repository\io\github\bonigarcia\webdrivermanager\5.0.3\webdrivermanager-5.0.3.jar;C:\Users\jackg\.m2\repository\io\opentelemetry\opentelemetry-sdk-common\1.9.1\opentelemetry-sdk-common-1.9.1.jar;C:\Users\jackg\.m2\repository\org\apache\commons\commons-exec\1.3\commons-exec-1.3.jar;C:\Users\jackg\.m2\repository\io\netty\netty-common\4.1.70.Final\netty-common-4.1.70.Final.jar;C:\Users\jackg\.m2\repository\org\kordamp\ikonli\ikonli-javafx\12.2.0\ikonli-javafx-12.2.0.jar;C:\Users\jackg\.m2\repository\com\dlsc\formsfx\formsfx-core\11.4.2\formsfx-core-11.4.2.jar;C:\Users\jackg\.m2\repository\io\opentelemetry\opentelemetry-sdk-trace\1.9.1\opentelemetry-sdk-trace-1.9.1.jar;C:\Users\jackg\.m2\repository\io\opentelemetry\opentelemetry-api\1.9.1\opentelemetry-api-1.9.1.jar;C:\Users\jackg\.m2\repository\org\openjfx\javafx-web\11.0.2\javafx-web-11.0.2-win.jar;C:\Users\jackg\.m2\repository\io\opentelemetry\opentelemetry-context\1.9.1\opentelemetry-context-1.9.1.jar;C:\Users\jackg\.m2\repository\com\google\guava\guava\30.1.1-jre\guava-30.1.1-jre.jar;C:\Users\jackg\.m2\repository\org\seleniumhq\selenium\selenium-chrome-driver\4.1.1\selenium-chrome-driver-4.1.1.jar;C:\Users\jackg\.m2\repository\com\opencsv\opencsv\5.5.2\opencsv-5.5.2.jar;C:\Users\jackg\.m2\repository\org\seleniumhq\selenium\selenium-support\4.1.1\selenium-support-4.1.1.jar;C:\Users\jackg\.m2\repository\org\kordamp\bootstrapfx\bootstrapfx-core\0.4.0\bootstrapfx-core-0.4.0.jar;C:\Users\jackg\.m2\repository\org\openjfx\javafx-media\11.0.2\javafx-media-11.0.2-win.jar;C:\Users\jackg\.m2\repository\eu\hansolo\tilesfx\11.48\tilesfx-11.48.jar;C:\Users\jackg\.m2\repository\org\seleniumhq\selenium\selenium-http\4.1.1\selenium-http-4.1.1.jar;C:\Users\jackg\.m2\repository\org\asynchttpclient\async-http-client\2.12.3\async-http-client-2.12.3.jar;C:\Users\jackg\.m2\repository\io\opentelemetry\opentelemetry-semconv\1.9.1-alpha\opentelemetry-semconv-1.9.1-alpha.jar;C:\Users\jackg\.m2\repository\io\ous\jtoml\2.0.0\jtoml-2.0.0.jar;C:\Users\jackg\.m2\repository\org\seleniumhq\selenium\selenium-remote-driver\4.1.1\selenium-remote-driver-4.1.1.jar;C:\Users\jackg\.m2\repository\io\netty\netty-transport\4.1.70.Final\netty-transport-4.1.70.Final.jar;C:\Users\jackg\.m2\repository\org\kordamp\ikonli\ikonli-core\12.2.0\ikonli-core-12.2.0.jar;D:\Users\jackg\Desktop\Java Code\Ethermine Tracker JavaFX\target\classes" -m com.traptricker.etherminetrackerjavafx/com.traptricker.etherminetrackerjavafx.Main
Dec 30, 2021 9:22:25 PM javafx.fxml.FXMLLoader$ValueElement processValue
WARNING: Loading FXML document with JavaFX API of version 17 by JavaFX runtime of version 11.0.1
Starting program...
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Starting ChromeDriver 95.0.4638.17 (a9d0719444d4b035e284ed1fce73bf6ccd789df2-refs/branch-heads/4638@{#178}) on port 63013
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
[1640917354.440][WARNING]: This version of ChromeDriver has not been tested with Chrome version 96.
Dec 30, 2021 9:22:34 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
Dec 30, 2021 9:22:34 PM org.openqa.selenium.devtools.CdpVersionFinder findNearestMatch
INFO: Found exact CDP implementation for version 96
Starting ChromeDriver 95.0.4638.17 (a9d0719444d4b035e284ed1fce73bf6ccd789df2-refs/branch-heads/4638@{#178}) on port 53163
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
[1640917356.435][WARNING]: This version of ChromeDriver has not been tested with Chrome version 96.
Dec 30, 2021 9:22:36 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
Dec 30, 2021 9:22:36 PM org.openqa.selenium.devtools.CdpVersionFinder findNearestMatch
INFO: Found exact CDP implementation for version 96
Exception in thread "Thread-3" java.lang.NullPointerException
    at com.traptricker.etherminetrackerjavafx/com.traptricker.etherminetrackerjavafx.SeleniumScrapper.setUpWebdriver(SeleniumScrapper.java:31)
    at com.traptricker.etherminetrackerjavafx/com.traptricker.etherminetrackerjavafx.Controller.trackEthermine(Controller.java:54)
    at java.base/java.lang.Thread.run(Thread.java:829)

ANSWER

Answered 2021-Dec-31 at 13:08

You need to take care of a few things here:

  • You have already download the ChromeDriver and accessing it as:

System.setProperty("webdriver.chrome.driver", "src/main/extras/chromedriver.exe");
  • Additionally you are also downloading ChromeDriver through WebDriverManager as:

  • WebDriverManager.chromedriver().setup();
    

    As a result your program have access to multiple instances of ChromeDriver. Hence you see:

    Exception in thread "Thread-3" java.lang.NullPointerException
    

    Solution

    You need to use only one instance of ChromeDriver either the downloaded version or the one downloaded and accessed through WebDriverManager

    Source https://stackoverflow.com/questions/70538475

    Community Discussions, Code Snippets contain sources that include Stack Exchange Network

    Vulnerabilities

    Async Http Client (aka async-http-client) before 2.0.35 can be tricked into connecting to a host different from the one extracted by java.net.URI if a '?' character occurs in a fragment identifier. Similar bugs were previously identified in cURL (CVE-2016-8624) and Oracle Java 8 java.net.URL.
    main/java/com/ning/http/client/AsyncHttpClientConfig.java in Async Http Client (aka AHC or async-http-client) before 1.9.0 does not require a hostname match during verification of X.509 certificates, which allows man-in-the-middle attackers to spoof HTTPS servers via an arbitrary valid certificate.
    Async Http Client (aka AHC or async-http-client) before 1.9.0 skips X.509 certificate verification unless both a keyStore location and a trustStore location are explicitly set, which allows man-in-the-middle attackers to spoof HTTPS servers by presenting an arbitrary certificate during use of a typical AHC configuration, as demonstrated by a configuration that does not send client certificates.

    Install async-http-client

    Binaries are deployed on Maven Central.

    Support

    Of course, Pull Requests are welcome.

    DOWNLOAD this Library from

    Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
    over 430 million Knowledge Items
    Find more libraries
    Reuse Solution Kits and Libraries Curated by Popular Use Cases

    Save this library and start creating your kit

    Explore Related Topics

    Share this Page

    share link
    Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
    over 430 million Knowledge Items
    Find more libraries
    Reuse Solution Kits and Libraries Curated by Popular Use Cases

    Save this library and start creating your kit

    • © 2022 Open Weaver Inc.