question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Include "java.net.http" module in bundled JRE

See original GitHub issue

Is your feature request related to a problem? Please describe. With default DBeaver setup, I ran into below error when testing a driver uses JDK 11 HttpClient:

java.lang.ClassNotFoundException: java.net.http.HttpResponse$BodySubscriber
	at java.base/java.net.URLClassLoader.findClass(Unknown Source)
	at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
	at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
	at com.clickhouse.client.http.ClickHouseHttpClient.newConnection(ClickHouseHttpClient.java:42)
	at com.clickhouse.client.http.ClickHouseHttpClient.newConnection(ClickHouseHttpClient.java:24)
	at com.clickhouse.client.AbstractClient.getConnection(AbstractClient.java:144)
	at com.clickhouse.client.http.ClickHouseHttpClient.postRequest(ClickHouseHttpClient.java:75)
	at com.clickhouse.client.http.ClickHouseHttpClient.execute(ClickHouseHttpClient.java:116)
	at com.clickhouse.client.ClickHouseRequest.execute(ClickHouseRequest.java:1364)
	at com.clickhouse.jdbc.internal.ClickHouseConnectionImpl.<init>(ClickHouseConnectionImpl.java:189)
	at com.clickhouse.jdbc.ClickHouseDriver.connect(ClickHouseDriver.java:145)
	at com.clickhouse.jdbc.ClickHouseDriver.connect(ClickHouseDriver.java:41)
	at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.lambda$0(JDBCDataSource.java:184)
	at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.openConnection(JDBCDataSource.java:203)
	at org.jkiss.dbeaver.ext.generic.model.GenericDataSource.openConnection(GenericDataSource.java:136)
	at org.jkiss.dbeaver.model.impl.jdbc.JDBCExecutionContext.connect(JDBCExecutionContext.java:103)
	at org.jkiss.dbeaver.model.impl.jdbc.JDBCRemoteInstance.initializeMainContext(JDBCRemoteInstance.java:100)
	at org.jkiss.dbeaver.model.impl.jdbc.JDBCRemoteInstance.<init>(JDBCRemoteInstance.java:59)
	at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.initializeRemoteInstance(JDBCDataSource.java:111)
	at org.jkiss.dbeaver.ext.generic.model.GenericDataSource.<init>(GenericDataSource.java:108)
	at org.jkiss.dbeaver.ext.generic.model.meta.GenericMetaModel.createDataSourceImpl(GenericMetaModel.java:91)
	at org.jkiss.dbeaver.ext.generic.GenericDataSourceProvider.openDataSource(GenericDataSourceProvider.java:106)
	at org.jkiss.dbeaver.registry.DataSourceDescriptor.connect(DataSourceDescriptor.java:898)
	at org.jkiss.dbeaver.runtime.jobs.ConnectJob.run(ConnectJob.java:70)
	at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:105)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Describe the solution you’d like Include java.net.http module in bundled JRE. Is there any specific reason exclude the module?

Describe alternatives you’ve considered I had to manually switch to JDK11 located in a different directory.

Additional context N/A

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
n5a5commented, Dec 21, 2021

Module added.

1reaction
n5a5commented, Dec 9, 2021

I’ll fix this issue simultaneously with https://github.com/dbeaver/dbeaver/issues/14749

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use jdk.internal.net.http - java - Stack Overflow
I use openjdk11. I tried 2 things : 1/ I added to maven compiler plugin exports module <compilerArgs> <arg> ...
Read more >
Chapter 3. Creating a custom Java runtime environment for ...
base , java.logging , and sample module. You can distribute your application bundled with the custom runtime in custom-runtime . It includes ......
Read more >
Building Small JREs and Docker Images with Recent Versions ...
A quick look into the documentation reveals that HttpClient is part of the module java.net.http ( java --list-modules tells us which modules ......
Read more >
Package java.net.http - Oracle Help Center
Provides high-level client interfaces to HTTP (versions 1.1 and 2) and low-level client ... exceptionally, dependent stages that have not already completed.
Read more >
Exploring the New HTTP Client in Java - Baeldung
The core classes and interface providing the core functionality include: The HttpClient class, java.net.http.HttpClient; The HttpRequest ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found