[
https://issues.apache.org/jira/browse/PHOENIX-3025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15348915#comment-15348915
]
Sergey Soldatov commented on PHOENIX-3025:
------------------------------------------
*Sigh*. [~enis], [~jamestaylor], [~elserj] Yet another shading problem with
hbase/protobuf. The reason why it fails - the documentation recommends to put
hbase-protocol into the classpath for MR job. That's how the original hbase
classes come on the scene and cause problems. hbase generated files come from
hbase-protocol and of course they expect to see , they call not shaded
protobuf classes. some from phoenix-client. I don't know whether the
requirement for adding hbase-protocol jar into HADOOP_CLASSPATH is still valid
since for me it works fine without it (I add only hbase conf into the
classpath), but it seems that to solve this problem we need protobuf unshaded
(tested) or shade hbase classes (I have a strong feeling that it would break
almost everything in phoenix)
> CsvBulkloadTool is failing with java.lang.IncompatibleClassChangeError
> ----------------------------------------------------------------------
>
> Key: PHOENIX-3025
> URL: https://issues.apache.org/jira/browse/PHOENIX-3025
> Project: Phoenix
> Issue Type: Bug
> Reporter: Rajeshbabu Chintaguntla
> Assignee: Sergey Soldatov
> Priority: Blocker
> Fix For: 4.8.0
>
>
> Getting following error while running CsvBulkloadTool
> {noformat}
> 16/06/24 21:39:14 INFO zookeeper.ClientCnxn: Session establishment complete
> on server localhost/127.0.0.1:2181, sessionid = 0x15582fe70650014, negotiated
> timeout = 40000
> Exception in thread "main" java.sql.SQLException: ERROR 103 (08004): Unable
> to establish connection.
> at
> org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:454)
> at
> org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:145)
> at
> org.apache.phoenix.query.ConnectionQueryServicesImpl.openConnection(ConnectionQueryServicesImpl.java:393)
> at
> org.apache.phoenix.query.ConnectionQueryServicesImpl.access$300(ConnectionQueryServicesImpl.java:219)
> at
> org.apache.phoenix.query.ConnectionQueryServicesImpl$13.call(ConnectionQueryServicesImpl.java:2321)
> at
> org.apache.phoenix.query.ConnectionQueryServicesImpl$13.call(ConnectionQueryServicesImpl.java:2300)
> at
> org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:78)
> at
> org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:2300)
> at
> org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:231)
> at
> org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.createConnection(PhoenixEmbeddedDriver.java:135)
> at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:202)
> at java.sql.DriverManager.getConnection(DriverManager.java:571)
> at java.sql.DriverManager.getConnection(DriverManager.java:187)
> at org.apache.phoenix.util.QueryUtil.getConnection(QueryUtil.java:340)
> at org.apache.phoenix.util.QueryUtil.getConnection(QueryUtil.java:332)
> at
> org.apache.phoenix.mapreduce.AbstractBulkLoadTool.loadData(AbstractBulkLoadTool.java:207)
> at
> org.apache.phoenix.mapreduce.AbstractBulkLoadTool.run(AbstractBulkLoadTool.java:181)
> at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
> at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
> at
> org.apache.phoenix.mapreduce.CsvBulkLoadTool.main(CsvBulkLoadTool.java:101)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
> at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
> Caused by: java.io.IOException: java.lang.reflect.InvocationTargetException
> at
> org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(ConnectionFactory.java:240)
> at
> org.apache.hadoop.hbase.client.ConnectionManager.createConnection(ConnectionManager.java:431)
> at
> org.apache.hadoop.hbase.client.ConnectionManager.createConnectionInternal(ConnectionManager.java:340)
> at
> org.apache.hadoop.hbase.client.HConnectionManager.createConnection(HConnectionManager.java:144)
> at
> org.apache.phoenix.query.HConnectionFactory$HConnectionFactoryImpl.createConnection(HConnectionFactory.java:47)
> at
> org.apache.phoenix.query.ConnectionQueryServicesImpl.openConnection(ConnectionQueryServicesImpl.java:391)
> ... 23 more
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
> at
> org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(ConnectionFactory.java:238)
> ... 28 more
> Caused by: java.lang.IncompatibleClassChangeError: Class
> org.apache.hadoop.hbase.protobuf.generated.ClusterIdProtos$ClusterId$Builder
> does not implement the requested interface
> org.apache.phoenix.shaded.com.google.protobuf.Message$Builder
> at
> org.apache.hadoop.hbase.protobuf.ProtobufUtil.mergeFrom(ProtobufUtil.java:3180)
> at org.apache.hadoop.hbase.ClusterId.parseFrom(ClusterId.java:69)
> at
> org.apache.hadoop.hbase.zookeeper.ZKClusterId.readClusterIdZNode(ZKClusterId.java:75)
> at
> org.apache.hadoop.hbase.client.ZooKeeperRegistry.getClusterId(ZooKeeperRegistry.java:105)
> at
> org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.retrieveClusterId(ConnectionManager.java:905)
> at
> org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.<init>(ConnectionManager.java:648)
> ... 33 more
> {noformat}
> [~sergey.soldatov] any idea? ping [[email protected]] It seems like blocker
> for release.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)