Hi:

I just installed a Hbase 0.19.3. 'Hbase shell' works fine after the
installation, and I managed to create a table, and input a few rows through
the shell.

However, when I tried to run my java program to read rows, I got the
following error.

the code:
        HBaseConfiguration config = new HBaseConfiguration();
        if(config == null) {
                System.out.println("configuration error");
                return post;
        }
        HTable table = new HTable(config, "t1");                        <<<<
line 18 where the error happens.

the error message:

Exception in thread "main" java.lang.NullPointerException
        at
java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)
        at
org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:90)
        at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:110)
        at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:98)
        at MyClient.main(MyClient.java:18)


I am new to HBase, can anyone help me figure out what went wrong? Thanks a
lot.

Regards


-- 
tp

Reply via email to