-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.NoClassDefFoundError: org/apache/http/conn/HttpClientConnectionManager #4
Comments
我现在用的jdbc: <dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.2.5</version>
<scope>provided</scope>
</dependency> |
@jaykelin 你好,我按你说的设置pom.xml,还是报同样的错误,麻烦看下我的pom.xml与你的有什么不同: `
|
建议使用我提供的那个jdbc <dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.2.5</version>
<scope>provided</scope>
</dependency> 这个jar的版本是没有 HttpClientConnectionManager 的 |
@jaykelin 我用的就是你说的那个jdbc,是不是还需要修改代码呢
|
可以下载jdbc的代码,install到本地mvn仓库,完成jar依赖 |
Can you please help me? |
@fibersel clone clickhouse-jdbc from https://github.com/jaykelin/clickhouse-jdbc/tree/0.1-SNAPSHOT |
sorry, but i can't do make install, there is no any Makefile |
my foult. it's mvn install |
Here is full step-by-step guide for jar building:
(tests run on clickhouse instance, running on your machine at port 8123, so we skip it)
after these commands you will get jars at "target" folder
@jaykelin , put these instruction to README please, it will make our life easier :) |
@fibersel Thanks for the advice |
当我执行任务时报错:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/conn/HttpClientConnectionManager
at ru.yandex.clickhouse.ClickHouseConnectionImpl.(ClickHouseConnectionImpl.java:68)
at ru.yandex.clickhouse.ClickHouseDriver.connect(ClickHouseDriver.java:58)
at ru.yandex.clickhouse.ClickHouseDriver.connect(ClickHouseDriver.java:50)
at ru.yandex.clickhouse.ClickHouseDriver.connect(ClickHouseDriver.java:32)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at com.kugou.loader.clickhouse.ClickhouseClient.(ClickhouseClient.java:45)
at com.kugou.loader.clickhouse.ClickhouseClientHolder.getClickhouseClient(ClickhouseClientHolder.java:65)
at com.kugou.loader.clickhouse.ClickhouseHdfsLoader.initClickhouseParameters(ClickhouseHdfsLoader.java:223)
at com.kugou.loader.clickhouse.ClickhouseHdfsLoader.run(ClickhouseHdfsLoader.java:121)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at com.kugou.loader.clickhouse.ClickhouseHdfsLoader.main(ClickhouseHdfsLoader.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Caused by: java.lang.ClassNotFoundException: org.apache.http.conn.HttpClientConnectionManager
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 18 more
我看到有人说是httpclient版本问题,
我修改pom.xml中版本为4.5.5还是不行:
org.apache.httpcomponents
httpclient
4.5.5
provided
ru.yandex.clickhouse
clickhouse-jdbc
0.1.40
请问是什么原因呢?求解答下
The text was updated successfully, but these errors were encountered: