[
https://issues.apache.org/jira/browse/FLINK-14508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16959534#comment-16959534
]
YING HOU commented on FLINK-14508:
----------------------------------
It is cause that flink-table-planner shade the dependency
'org.apache.calcite.avatica:avatica-core' into it,
!image-2019-10-25-15-57-26-129.png!
and relocation the package pattern 'com.google' to
'org.apache.flink.calcite.shaded.com.google'.
!image-2019-10-25-15-57-08-031.png!
So, the class 'com.google.protobuf.Message' which is used in
'org.apache.calcite.avatica.remote.ProtobufService' becomes to
'org.apache.flink.calcite.shaded.com.google.protobuf.Message', but
protobuf-java hasn't been shaded in the module flink-table-planner,
so it cause ClassNotFoundException.
My solution is that add a dependency of "protobuf-java" in my pom.xml and
configurate it in maven-shade-plugin as follow.
!image-2019-10-25-16-05-37-336.png!
> google protobuf is not shaded
> ------------------------------
>
> Key: FLINK-14508
> URL: https://issues.apache.org/jira/browse/FLINK-14508
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / Planner
> Affects Versions: 1.8.0, 1.8.1, 1.8.2
> Reporter: YING HOU
> Priority: Major
> Attachments: image-2019-10-23-16-55-00-959.png,
> image-2019-10-25-15-57-08-031.png, image-2019-10-25-15-57-26-129.png,
> image-2019-10-25-16-05-37-336.png
>
>
> I try to use phoenix in my flink project. When I use
> 'org.apache.phoenix.queryserver.client.Driver' as my jdbc driver which is
> inherited from 'org.apache.calcite.avatica.remote.Driver', I got a
> ClassNotFoundException as follow:
> !image-2019-10-23-16-55-00-959.png!
>
> I guess the protobuf-java may not be shaded in the module flink-table-planner
--
This message was sent by Atlassian Jira
(v8.3.4#803005)