Skip to main content
Khairul_Hasan
Gold ⭐️
October 9, 2022
Solved

Can't find method newStub in org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService!

We have newly install CDP-DC 7.1.7 and try to load data using a spark jobs but getting the errors.

----Payload

java -cp /etc/hadoop/conf.cloudera.hdfs/ssl-client.xml:/etc/hbase/conf.cloudera.hbase/hbase-site.xml:/etc/hadoop/conf.cloudera.hdfs/core-site.xml:/etc/hadoop/conf.cloudera.hdfs/hdfs-site.xm:/data/scripts/LeaApp-1.0-SNAPSHOT.jar net.ba.lea.transformation.FileActions "/data/scripts/msc/IN/" "/tmp/nss_processing/" "/data/scripts/msc/reject/" "250" "LEA.DBM_CDR_FILE_HEAD" "NSS" "jdbc:phoenix:gzvlcdpnode01.ba.net:2181:/hbase:phoenix/gzvlcdpnode02@BA.NET:/etc/security/keytab/phoenix.keytab"

error :

Can't find method newStub in org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService!

--------------------------------

But the same code is working fine with CDP-DC 7.1.3.

We have changed  the version only.

Please guide us .

smdas
smdasAnswer
Gold ⭐️⭐️
October 11, 2022

Hello @Khairul_Hasan 

 

Thanks for engaging Cloudera Community. Based on the Post, Your Team is receiving [1] while running the Command [2] in CDP v7.1.7. The Same Command was running with CDP v7.1.3. 

 

If you include Verbose for ClassLoading (Similar to "-verbose:class"), Your Team would confirm the Jar from which the Method is loaded. If your Team can pass the Phoenix Client & Phoenix Server jar explicitly in the ClassPath (The Path would be similar to "/opt/cloudera/parcels/<PhoenixParcelDir>/lib/phoenix/<PhoenixClientJar>" & "/opt/cloudera/parcels/<PhoenixParcelDir>/lib/phoenix/<PhoenixServerJar>"), We expect the Error to be managed. Kindly review the same & share the Outcome. 

 

Regards, Smarak

 

[1] Can't find method newStub in org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService!
[2] java -cp /etc/hadoop/conf.cloudera.hdfs/ssl-client.xml:/etc/hbase/conf.cloudera.hbase/hbase-site.xml:/etc/hadoop/conf.cloudera.hdfs/core-site.xml:/etc/hadoop/conf.cloudera.hdfs/hdfs-site.xm:/data/scripts/LeaApp-1.0-SNAPSHOT.jar net.ba.lea.transformation.FileActions "/data/scripts/msc/IN/" "/tmp/nss_processing/" "/data/scripts/msc/reject/" "250" "LEA.DBM_CDR_FILE_HEAD" "NSS" "jdbc:phoenix:gzvlcdpnode01.ba.net:2181:/hbase:phoenix/gzvlcdpnode02@BA.NET:/etc/security/keytab/phoenix.keytab"

4 replies

smdas
Gold ⭐️⭐️
smdasAnswer
Gold ⭐️⭐️
October 11, 2022

Hello @Khairul_Hasan 

 

Thanks for engaging Cloudera Community. Based on the Post, Your Team is receiving [1] while running the Command [2] in CDP v7.1.7. The Same Command was running with CDP v7.1.3. 

 

If you include Verbose for ClassLoading (Similar to "-verbose:class"), Your Team would confirm the Jar from which the Method is loaded. If your Team can pass the Phoenix Client & Phoenix Server jar explicitly in the ClassPath (The Path would be similar to "/opt/cloudera/parcels/<PhoenixParcelDir>/lib/phoenix/<PhoenixClientJar>" & "/opt/cloudera/parcels/<PhoenixParcelDir>/lib/phoenix/<PhoenixServerJar>"), We expect the Error to be managed. Kindly review the same & share the Outcome. 

 

Regards, Smarak

 

[1] Can't find method newStub in org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService!
[2] java -cp /etc/hadoop/conf.cloudera.hdfs/ssl-client.xml:/etc/hbase/conf.cloudera.hbase/hbase-site.xml:/etc/hadoop/conf.cloudera.hdfs/core-site.xml:/etc/hadoop/conf.cloudera.hdfs/hdfs-site.xm:/data/scripts/LeaApp-1.0-SNAPSHOT.jar net.ba.lea.transformation.FileActions "/data/scripts/msc/IN/" "/tmp/nss_processing/" "/data/scripts/msc/reject/" "250" "LEA.DBM_CDR_FILE_HEAD" "NSS" "jdbc:phoenix:gzvlcdpnode01.ba.net:2181:/hbase:phoenix/gzvlcdpnode02@BA.NET:/etc/security/keytab/phoenix.keytab"

Translate
smdas
Gold ⭐️⭐️
Gold ⭐️⭐️
October 14, 2022

Greetings @Khairul_Hasan 

 

Hope you are doing well. We wish to follow-up on the above Post. Kindly let us know the Outcome of the above ask from our side. Note that in 7.1.3, CDP uses Phoenix 5.0 & in 7.1.7, CDP have Phoenix 5.1. Henceforth, our ask to include the Phoenix Server & Client Jar explicitly. 

 

Regards, Smarak

Translate
DianaTorres
Community Manager
Community Manager
October 17, 2022

@Khairul_Hasan Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future. Thanks

 

Translate
Regards, Diana Torres, Senior Community Moderator
smdas
Gold ⭐️⭐️
Gold ⭐️⭐️
October 21, 2022

Hello @Khairul_Hasan 

 

We are marking the Post as Closed as we didn't hear from your side on our Update dated 2022-10-10. If your team have any concerns, Feel free to Update this Post. If your team adopted any other approach to resolve the issue, We would appreciate if your team can share the finer details for our wider community. 

 

Regards, Smarak

Translate