Home Forums HBase java.lang.ClassNotFoundException: org.apache.hadoop.hbase.ipc.WritableRpcEngine

This topic contains 12 replies, has 4 voices, and was last updated by  tedr 1 year ago.

  • Creator
    Topic
  • #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

Viewing 12 replies - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.

  • Author
    Replies
  • #29506

    tedr
    Moderator

    Hi Subroto,

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

    Ted.

    Collapse
    #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

    Collapse
    #29426

    tedr
    Moderator

    Hi Subroto,

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

    Thanks,
    Ted.

    Collapse
    #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

    Collapse
    #29218

    tedr
    Moderator

    Hi Subroto,

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

    Thanks,
    Ted.

    Collapse
    #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.

    Collapse
    #29122

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

    Collapse
    #9040

    Sasha J
    Moderator

    Subroto,

    Good to hear you figgured it out!

    Collapse
    #8988

    Subroto Sanyal
    Participant

    Hi Sasha and Ted,

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

    Cheers,
    Subroto Sanyal

    Collapse
    #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

    Collapse
    #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

    Collapse
    #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.

    Collapse
Viewing 12 replies - 1 through 12 (of 12 total)