Question

Unable to do mapping in connect hadoop rule

Pega to Hadoop connectivity is established and able to see the available tables in drop down , but I am not able to preview the table rows to do the mapping.Found below error in tracer. Can someone please help on why this is happening.

[Rule-Connect-HBase.pyMessageLabel]Flow_PreProcessFail pzLoadTablePreview java.lang.NoSuchMethodError: org/apache/hadoop/hbase/client/HTable. (Lorg/apache/hadoop/hbase/TableName;Lorg/apache/hadoop/hbase/client/HConnection;)V (loaded from pegajdbc://458347205:0/hbase-client-1.1.2.2.6.5.0-292.jar by com.pega.pegarules.bootstrap.loader.PRAppLoader@31fcf208) called from class com.pega.bigdata.hbase.client.internal.HTableImpl (loaded from pegajdbc://458347205:0/bigdata-connector-7.3.1.jar by com.pega.pegarules.bootstrap.loader.PRAppLoader@31fcf208).

Comments

Keep up to date on this post and subscribe to comments

September 13, 2019 - 8:33am

This looks like some hadoop/hbase client jar incompatibility (class conflict). You are running 7.3.1, use SMA java class lookup utility to check the relevant classes in the error stack (e.g., class: org.apache.hadoop.hbase.client.HTable). Please attach the screenshots of this exercise.

September 17, 2019 - 6:10am
Response to KevinZheng_GCS

getting below information for  com.pega.bigdata.hbase.client.internal.HTableImpl  class

But the class org.apache.hadoop.hbase.client.HTableInterface is present in the jar which is imported, but when I checked for org.apache.hadoop.hbase.client.HTableInterface in lookup it says class not found.

Exception during engine invocation: com.pega.pegarules.management.internal.ETierRuntimeEnvironmentAPI.LookupJavaClass
java.lang.NoClassDefFoundError: org.apache.hadoop.hbase.client.HTableInterface
	at java.lang.Class.forNameImpl(Native Method)
	at java.lang.Class.forName(Class.java:278)
	at com.pega.pegarules.pub.util.JavaUtils.getClassLocation(JavaUtils.java:57)
	at com.pega.pegarules.management.internal.ETierRuntimeEnvironmentAPI._getClassLocation_privact(ETierRuntimeEnvironmentAPI.java:116)
	at com.pega.pegarules.management.internal.ETierRuntimeEnvironmentAPI.LookupJavaClass(ETierRuntimeEnvironmentAPI.java:94)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at com.pega.pegarules.management.internal.MB2EngineAccess.invoke(MB2EngineAccess.java:169)
	at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl._invoke_privact(EngineImpl.java:408)
	at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.run(EngineImpl.java:393)
	at com.pega.pegarules.session.internal.PRSessionProviderImpl.performTargetActionWithLock(PRSessionProviderImpl.java:1327)
	at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:1075)
	at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:884)
	at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:851)
	at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl._invokeEngine_privact(EngineImpl.java:339)
	at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.invokeEngine(EngineImpl.java:274)
	at com.pega.pegarules.session.internal.engineinterface.etier.ejb.EngineBean.invokeEngine(EngineBean.java:225)
	at sun.reflect.GeneratedMethodAccessor80.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:370)
	at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:411)
	at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethodPropagatingThrowable(AppServerBridgeToPega.java:224)
	at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethodPropagatingException(AppServerBridgeToPega.java:246)
	at com.pega.pegarules.internal.etier.ejb.EngineBeanBoot.invokeEngine(EngineBeanBoot.java:168)
	at com.pega.pegarules.internal.etier.interfaces.EJSLocalStatelessEngineBMT_f2439d86.invokeEngine(Unknown Source)
	at com.pega.pegarules.management.internal.MBeanHelper.invokeOperation(MBeanHelper.java:77)
	at com.pega.pegarules.management.internal.ETierRuntimeEnvironment.LookupJavaClass(ETierRuntimeEnvironment.java:77)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:83)
	at sun.reflect.GeneratedMethodAccessor59.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:287)
	at javax.management.modelmbean.RequiredModelMBean$4.run(RequiredModelMBean.java:1263)
	at java.security.AccessController.doPrivileged(AccessController.java:620)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
	at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1257)
	at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:1096)
	at com.pega.pegarules.priv.management.PegaModelMBean.invoke(PegaModelMBean.java:121)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:831)
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:813)
	at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1350)
	at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
	at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1243)
	at com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:181)
	at sun.reflect.GeneratedMethodAccessor187.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at com.ibm.ws.management.connector.soap.SOAPConnector.invoke(SOAPConnector.java:488)
	at com.ibm.ws.management.connector.soap.SOAPConnector.service(SOAPConnector.java:322)
	at com.ibm.ws.management.connector.soap.SOAPConnection.handleRequest(SOAPConnection.java:65)
	at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:733)
	at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:522)
	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.client.HTableInterface
	at com.pega.pegarules.internal.bootstrap.phase2.PRBaseLoader.findClass(PRBaseLoader.java:308)
	at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:846)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:825)
	at com.pega.pegarules.internal.bootstrap.phase2.PRBaseLoader.loadClass(PRBaseLoader.java:233)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:805)
	at com.pega.pegarules.bootstrap.loader.PRAppLoader.loadClass(PRAppLoader.java:765)
	at com.pega.pegarules.bootstrap.loader.PRAppLoader.loadClass(PRAppLoader.java:618)
	... 60 more

September 17, 2019 - 7:46am

Check the classes involved in here:

org/apache/hadoop/hbase/client/HTable. (Lorg/apache/hadoop/hbase/TableName;Lorg/apache/hadoop/hbase/client/HConnection;)

and show the output of each class (three of those). Normally nosuchmetheoderror happens when one of the classes in the arguments are not compatible. You must have imported a lot of your own jars, if you can connect outside Pega (ie. use an independent sample java client outside Pega), that would be a good first step. Finding out class conflict can be a pain too, feel free to open a SR with GCS if so desired.