HBase Forum

java.lang.ClassNotFoundException: org.apache.hadoop.hbase.ipc.WritableRpcEngine

  • #8921
    Subroto Sanyal
    Participant

    Hi ,

    When I call HBaseConfiguration.create(conf); I end up with the exception:

    java.lang.ClassNotFoundException: org.apache.hadoop.hbase.ipc.WritableRpcEngine
    	at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:867)
    	at org.apache.hadoop.hbase.ipc.HBaseRPC.getProtocolEngine(HBaseRPC.java:114)
    	at org.apache.hadoop.hbase.ipc.HBaseRPC.getProxy(HBaseRPC.java:335)
    	at org.apache.hadoop.hbase.ipc.HBaseRPC.getProxy(HBaseRPC.java:312)
    	at org.apache.hadoop.hbase.ipc.HBaseRPC.getProxy(HBaseRPC.java:364)
    	at org.apache.hadoop.hbase.ipc.HBaseRPC.waitForProxy(HBaseRPC.java:236)
    	at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getHRegionConnection(HConnectionManager.java:1279)
    	at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getHRegionConnection(HConnectionManager.java:1236)
    	at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getHRegionConnection(HConnectionManager.java:1223)
    	at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:919)
    	at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:815)
    	at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:783)
    	at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:916)
    	at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:819)
    	at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:783)
    	at org.apache.hadoop.hbase.client.HTable.finishSetup(HTable.java:247)
    	at org.apache.hadoop.hbase.client.HTable.(HTable.java:211)
    	at org.apache.hadoop.hbase.client.HTable.(HTable.java:169)
    	at org.apache.hadoop.hbase.mapreduce.TableInputFormat.setConf(TableInputFormat.java:92)

    I am not able to figure out how this class loading issue is coming up….
    I have tried to use same piece of client code with: hbase-0.92.1 from Apache community but, didn’t encounter the same problem.
    Need opinions/suggestion

    Cheers,
    Subroto Sanyal

to create new topics or reply. | New User Registration

  • Author
    Replies
  • #8923
    tedr
    Moderator

    Subroto,

    This looks like, either the class is not in the hbase jar that is on your classpath, or the the hbase jar isn’t on the classpath. So first, make sure that the hbase jar is on the classpath. You can check to see if the class is in the hbase jar by running the command:

    jar -tf | grep org.apache.hadoop.hbase.ipc.WritableRpcEngine

    Ted.

    #8925
    Subroto Sanyal
    Participant

    Hi Ted,

    The JAR in the class-path of the client is having the mentioned class.

    [root@ip-10-114-26-139 dist-specific]# jar -tf hbase-0.92.1.14.jar | grep org.apache.hadoop.hbase.ipc.WritableRpcEngine
    org/apache/hadoop/hbase/ipc/WritableRpcEngine$ClientCache.class
    org/apache/hadoop/hbase/ipc/WritableRpcEngine$Invoker.class
    org/apache/hadoop/hbase/ipc/WritableRpcEngine$Server.class
    org/apache/hadoop/hbase/ipc/WritableRpcEngine.class

    Cheers,
    Subroto Sanyal

    #8927
    Sasha J
    Moderator

    Subroto,
    the only explanation of this, as your program m still does not see that jar…
    Please, check if you override classpath accidentally when you run your program.
    Also, could you provide more detail on your setup, your environment configuration, etc.

    Thank you!
    Sasha

    #8988
    Subroto Sanyal
    Participant

    Hi Sasha and Ted,

    It was a classloader problem with my application code. 😛
    Thanks for your suggestions…. :-)

    Cheers,
    Subroto Sanyal

    #9040
    Sasha J
    Moderator

    Subroto,

    Good to hear you figgured it out!

    #29122

    I am facing the same issue.
    Subroto or anyone else :- Could you please share the solution for this?

    #29123

    I have embedded the jars hbase-0.94.8.jar and hadoop-core-1.0.4.jar in my osgi bundle.
    The hbase-0.94.8.jar does have the class org.apache.hadoop.hbase.ipc.WritableRpcEngine.
    so I am not sure what exactly the problem is.

    thanks in advance for any help.

    #29218
    tedr
    Moderator

    Hi Subroto,

    Could you tell us what you did to fix the classloader issue?

    Thanks,
    Ted.

    #29412
    Subroto Sanyal
    Participant

    The classloader which was suppose to load the mentioned class use to do a sort of mixing of different libraries and classes from different folders. The mixing use to ensure that latest version jars is at the top but, code went buggy and was leading to load an old version jar first.

    Cheers,
    Subroto Sanyal

    #29426
    tedr
    Moderator

    Hi Subroto,

    And what did you do to fix that, was it a code fix, or …?

    Thanks,
    Ted.

    #29485
    Subroto Sanyal
    Participant

    Hi Ted,

    It was a code fix in my application. Basically the fix was to order the the jars properly in the ClassLoader loading sequence.
    New version jar first and then old version jar.

    Cheers,
    Subroto Sanyal

    #29506
    tedr
    Moderator

    Hi Subroto,

    Thanks, that info will help others solve the same problem.

    Ted.

You must be to reply to this topic. | Create Account

Support from the Experts

A HDP Support Subscription connects you experts with deep experience running Apache Hadoop in production, at-scale on the most demanding workloads.

Enterprise Support »

Become HDP Certified

Real world training designed by the core architects of Hadoop. Scenario-based training courses are available in-classroom or online from anywhere in the world

Training »

Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.